Changeset 1465:f6abf97c2fce in roaraudio


Ignore:
Timestamp:
03/29/09 22:20:56 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

only use select based methode if we have select()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/simple.c

    r1396 r1465  
    119119 
    120120int roar_simple_new_stream_obj (struct roar_connection * con, struct roar_stream * s, int rate, int channels, int bits, int codec, int dir) { 
    121  struct roar_message    mes; 
    122121 char file[80] = {0}; 
    123122 int fh = -1, listen = -1; 
     
    130129 struct sockaddr_in   socket_addr; 
    131130 socklen_t            len            = sizeof(struct sockaddr_in); 
     131#ifdef ROAR_HAVE_SELECT 
    132132 fd_set fds; 
    133133 struct timeval timeout = {10, 0}; 
     134 struct roar_message    mes; 
     135#endif 
    134136#ifdef ROAR_HAVE_UNIX 
    135137 int socks[2]; // for socketpair() 
     
    213215 
    214216 if ( type != ROAR_SOCKET_TYPE_UNIX ) { 
     217#ifdef ROAR_HAVE_SELECT 
    215218  if ( roar_stream_connect_to_ask(con, s, type, file, port) != -1 ) { 
    216219 
     
    244247 
    245248  close(listen); 
     249#else 
     250  return -1; 
     251#endif 
    246252 } else { // this is type == ROAR_SOCKET_TYPE_UNIX 
    247253#ifdef ROAR_HAVE_UNIX 
Note: See TracChangeset for help on using the changeset viewer.