Changeset 1349:9582e89c7130 in roaraudio for libroar/vio_socket.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_socket.c

    r1348 r1349  
    200200 if ( hint == -1 && odef != NULL ) { // if we still don't know what this is we try 
    201201                                     // to use the parent objects request 
     202  ROAR_WARN("roar_vio_socket_init_dstr_def(*): hint=-1 && odef!=NULL"); 
    202203  if ( odef->type == ROAR_VIO_DEF_TYPE_SOCKET ) { 
     204   ROAR_WARN("roar_vio_socket_init_dstr_def(*): hint=-1 && odef!=NULL, using hint from odef"); 
    203205   hint = odef->d.socket.domain; 
    204206  } 
     
    411413int     roar_vio_socket_init_inet4host_def(struct roar_vio_defaults * def) { 
    412414 struct hostent     * he; 
     415 char               * ed; 
    413416 
    414417 if ( def == NULL ) 
     
    417420 if ( def->d.socket.host == NULL ) 
    418421  return -1; 
     422 
     423 if ( (ed = strstr(def->d.socket.host, "/")) != NULL ) 
     424  *ed = 0; 
    419425 
    420426 if ( (he = gethostbyname(def->d.socket.host)) == NULL ) { 
    421427  ROAR_ERR("roar_vio_socket_init_inet4host_def(*): Can\'t resolve host name '%s'", 
    422428                    def->d.socket.host); 
    423   return -1; 
    424  } 
     429  if ( ed != NULL ) *ed = '/'; 
     430  return -1; 
     431 } 
     432 
     433 if ( ed != NULL ) *ed = '/'; 
    425434 
    426435 memcpy((struct in_addr *)&def->d.socket.sa.in.sin_addr, he->h_addr, sizeof(struct in_addr)); 
Note: See TracChangeset for help on using the changeset viewer.