Changeset 1349:9582e89c7130 in roaraudio for libroar/vio_socket.c
- Timestamp:
- 03/23/09 18:13:26 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/vio_socket.c
r1348 r1349 200 200 if ( hint == -1 && odef != NULL ) { // if we still don't know what this is we try 201 201 // to use the parent objects request 202 ROAR_WARN("roar_vio_socket_init_dstr_def(*): hint=-1 && odef!=NULL"); 202 203 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"); 203 205 hint = odef->d.socket.domain; 204 206 } … … 411 413 int roar_vio_socket_init_inet4host_def(struct roar_vio_defaults * def) { 412 414 struct hostent * he; 415 char * ed; 413 416 414 417 if ( def == NULL ) … … 417 420 if ( def->d.socket.host == NULL ) 418 421 return -1; 422 423 if ( (ed = strstr(def->d.socket.host, "/")) != NULL ) 424 *ed = 0; 419 425 420 426 if ( (he = gethostbyname(def->d.socket.host)) == NULL ) { 421 427 ROAR_ERR("roar_vio_socket_init_inet4host_def(*): Can\'t resolve host name '%s'", 422 428 def->d.socket.host); 423 return -1; 424 } 429 if ( ed != NULL ) *ed = '/'; 430 return -1; 431 } 432 433 if ( ed != NULL ) *ed = '/'; 425 434 426 435 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.