Changeset 1349:9582e89c7130 in roaraudio for libroar/vio_dstr.c


Ignore:
Timestamp:
03/23/09 18:13:26 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

changed a lot, got gopher working :), need cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/vio_dstr.c

    r1337 r1349  
    9696 {ROAR_VIO_DSTR_OBJT_GOPHER,     "gopher", 
    9797      {ROAR_VIO_DEF_TYPE_EOL}}, 
     98 {ROAR_VIO_DSTR_OBJT_GOPHER_PLUS,"gopher+", 
     99      {ROAR_VIO_DEF_TYPE_EOL}}, 
    98100 
    99101 {ROAR_VIO_DSTR_OBJT_GZIP,       "gzip", 
     
    496498    break; 
    497499#endif 
     500   case ROAR_VIO_DSTR_OBJT_HTTP09: 
     501   case ROAR_VIO_DSTR_OBJT_HTTP10: 
     502   case ROAR_VIO_DSTR_OBJT_HTTP11: 
     503     c->need_vio = 1; 
     504     next->def = &(next->store_def); 
     505 
     506     if ( roar_vio_proto_init_def(next->def, c->dst, ROAR_VIO_PROTO_P_HTTP, c->def) == -1 ) 
     507      return -1; 
     508    break; 
     509   case ROAR_VIO_DSTR_OBJT_GOPHER: 
     510   case ROAR_VIO_DSTR_OBJT_GOPHER_PLUS: 
     511     c->need_vio = 1; 
     512     next->def = &(next->store_def); 
     513 
     514     if ( roar_vio_proto_init_def(next->def, c->dst, ROAR_VIO_PROTO_P_GOPHER, c->def) == -1 ) 
     515      return -1; 
     516    break; 
    498517   default: 
    499518    return -1; 
     
    501520 
    502521  if ( next != NULL ) { 
    503    ROAR_DBG("roar_vio_dstr_set_defaults(*): i=%i, c->type=0x%.4x(%s): next->def=%p, next->def->type=%i", i, 
     522   ROAR_WARN("roar_vio_dstr_set_defaults(*): i=%i, c->type=0x%.4x(%s): next->def=%p, next->def->type=%i", i, 
    504523                    c->type & 0xFFFF, roar_vio_dstr_get_name(c->type), 
    505524                    next->def, next->def == NULL ? -1 : next->def->type); 
     525   if ( next->def != NULL ) { 
     526    ROAR_WARN("roar_vio_dstr_set_defaults(*): i=%i, c->type=0x%.4x(%s): next->def->o_flags=%i", i, 
     527                     c->type & 0xFFFF, roar_vio_dstr_get_name(c->type), 
     528                     next->def->o_flags); 
     529   } 
    506530  } else { 
    507    ROAR_DBG("roar_vio_dstr_set_defaults(*): i=%i, c->type=0x%.4x(%s): next=NULL", i, 
     531   ROAR_WARN("roar_vio_dstr_set_defaults(*): i=%i, c->type=0x%.4x(%s): next=NULL", i, 
    508532                    c->type & 0xFFFF, roar_vio_dstr_get_name(c->type)); 
    509533  } 
     
    558582 
    559583 for (i = 0; (c = &chain[i])->type != ROAR_VIO_DSTR_OBJT_EOL; i++) { 
     584  ROAR_WARN("roar_vio_dstr_build_chain(*): i=%i, c->type=0x%.4x(%s): need_vio=%i", i, 
     585                   c->type & 0xFFFF, roar_vio_dstr_get_name(c->type), c->need_vio); 
     586 
    560587  if ( c->need_vio ) { 
    561588   if ( (tc = malloc(sizeof(struct roar_vio_calls))) == NULL ) { 
     
    572599   } 
    573600 
     601 
    574602   switch (c->type) { 
    575603    case ROAR_VIO_DSTR_OBJT_PASS: 
     
    591619    case ROAR_VIO_DSTR_OBJT_PGP: 
    592620      if ( roar_vio_open_pgp_decrypt(tc, prev, NULL) == -1 ) { 
     621       _ret(-1); 
     622      } 
     623     break; 
     624    case ROAR_VIO_DSTR_OBJT_HTTP09: 
     625    case ROAR_VIO_DSTR_OBJT_HTTP10: 
     626    case ROAR_VIO_DSTR_OBJT_HTTP11: 
     627      ROAR_WARN("roar_vio_dstr_build_chain(*): HTTP*"); 
     628      if ( roar_vio_open_proto(tc, prev, c->dst, ROAR_VIO_PROTO_P_HTTP, i == 0 ? NULL : chain[i-1].def) == -1 ) { 
     629       _ret(-1); 
     630      } 
     631     break; 
     632    case ROAR_VIO_DSTR_OBJT_GOPHER: 
     633    case ROAR_VIO_DSTR_OBJT_GOPHER_PLUS: 
     634      ROAR_WARN("roar_vio_dstr_build_chain(*): GOPHER*"); 
     635      if ( roar_vio_open_proto(tc, prev, c->dst, ROAR_VIO_PROTO_P_GOPHER, i == 0 ? NULL : chain[i-1].def) == -1 ) { 
    593636       _ret(-1); 
    594637      } 
Note: See TracChangeset for help on using the changeset viewer.