Changeset 1476:bcb075f757c8 in roaraudio
- Timestamp:
- 03/30/09 19:40:10 (15 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- libroar
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/simple.c
r1470 r1476 99 99 int fh; 100 100 101 if ( (fh = roar_simple_stream_obj(s, rate, channels, bits, codec, NULL /* server, we hope this goes ok here... */,101 if ( (fh = roar_simple_stream_obj(s, rate, channels, bits, codec, NULL /* server, we hope this is ok here... */, 102 102 dir, "libroar temp stream")) == -1 ) 103 103 return -1; 104 104 105 105 if ( roar_stream_attach_simple(con, s, roar_get_clientid(con)) == -1 ) { 106 #ifdef ROAR_HAVE_IO_POSIX 106 107 close(fh); 108 #endif /* no else as we return -1 anyway */ 107 109 return -1; 108 110 } … … 143 145 #endif 144 146 147 #ifdef ROAR_HAVE_BSDSOCKETS 145 148 if ( getsockname(con->fh, (struct sockaddr *)&socket_addr, &len) == -1 ) { 146 149 return -1; 147 150 } 151 #else 152 return -1; 153 #endif 148 154 149 155 if ( len == 0 ) { … … 323 329 324 330 int roar_simple_close(int fh) { 331 #ifdef ROAR_HAVE_IO_POSIX 325 332 return close(fh); 333 #else 334 return -1; 335 #endif 326 336 } 327 337 -
libroar/socket.c
r1443 r1476 456 456 int ret; 457 457 #endif 458 #if defined(ROAR_HAVE_IPV4) || defined(ROAR_HAVE_IPV6) || defined(ROAR_HAVE_UNIX) || defined(ROAR_HAVE_IPX) 458 459 union { 459 460 struct sockaddr sa; … … 471 472 #endif 472 473 } socket_addr; 474 #endif 473 475 #if defined(ROAR_HAVE_IPV4) || defined(ROAR_HAVE_IPV6) 474 476 struct hostent * he; … … 626 628 } 627 629 628 if ( mode == MODE_LISTEN ) 630 if ( mode == MODE_LISTEN ) { 631 #ifdef ROAR_HAVE_BSDSOCKETS 629 632 if ( listen(fh, ROAR_SOCKET_QUEUE_LEN) == -1 ) { 630 633 close(fh); 631 634 return -1; 632 635 } 636 #else 637 return -1; 638 #endif 639 } 633 640 634 641 return fh; … … 682 689 683 690 int roar_socket_open_file (int mode, char * host, int port) { 691 #ifdef ROAR_HAVE_IO_POSIX 684 692 int fh; 685 693 … … 692 700 693 701 return fh; 702 #else 703 return -1; 704 #endif 694 705 } 695 706
Note: See TracChangeset
for help on using the changeset viewer.