Changeset 1337:133222591226 in roaraudio for libroar/vio_dstr.c
- Timestamp:
- 03/23/09 14:26:01 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/vio_dstr.c
r1335 r1337 430 430 next->def->d.fh = tmp[1]; 431 431 break; 432 #ifdef ROAR_HAVE_UNIX 432 433 case ROAR_VIO_DSTR_OBJT_UNIX: 433 434 c->need_vio = 0; 434 435 next->def = &(next->store_def); 435 436 436 if ( c->def != NULL ) { 437 roar_vio_dstr_init_defaults(next->def, ROAR_VIO_DEF_TYPE_SOCKET, c->def->o_flags, c->def->o_mode); 438 } else { 439 roar_vio_dstr_init_defaults(next->def, ROAR_VIO_DEF_TYPE_SOCKET, O_WRONLY, 0644); 437 if ( c->dst == NULL ) { // we don't have a destination? -> slow way 438 if ( roar_vio_socket_init_dstr_def(next->def, c->dst, AF_UNIX, SOCK_STREAM, c->def) == -1 ) 439 return -1; 440 } else { // we have a destination? -> fast way 441 if ( c->def != NULL ) { 442 roar_vio_dstr_init_defaults(next->def, ROAR_VIO_DEF_TYPE_SOCKET, c->def->o_flags, c->def->o_mode); 443 } else { 444 roar_vio_dstr_init_defaults(next->def, ROAR_VIO_DEF_TYPE_SOCKET, O_WRONLY, 0644); 445 } 446 447 if ( roar_vio_socket_init_unix_def(next->def, c->dst) == -1 ) 448 return -1; 440 449 } 441 442 if ( roar_vio_socket_init_unix_def(next->def, c->dst) == -1 ) 443 return -1; 444 break; 450 break; 451 #endif 445 452 case ROAR_VIO_DSTR_OBJT_SOCKET: 446 453 c->need_vio = 0; … … 532 539 } 533 540 541 if ( roar_vio_init_calls(tc) == -1 ) { 542 free(tc); 543 _ret(-1); 544 } 545 534 546 if ( roar_vio_stack_add(calls, tc) == -1 ) { 535 547 _ret(-1); … … 548 560 if ( c->need_vio ) { 549 561 if ( (tc = malloc(sizeof(struct roar_vio_calls))) == NULL ) { 562 _ret(-1); 563 } 564 565 if ( roar_vio_init_calls(tc) == -1 ) { 566 free(tc); 550 567 _ret(-1); 551 568 }
Note: See TracChangeset
for help on using the changeset viewer.