Changeset 1338:b1bdb4811261 in roaraudio


Ignore:
Timestamp:
03/23/09 14:36:20 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

support to convert a file: into a unix: object and shutdown() sockets if a unidirection connection is requested

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/vio_socket.c

    r1337 r1338  
    126126 } 
    127127 
     128 // there is no problem if the shutdown()s fail. 
     129 // some socket domains don't support unidirectional connections 
     130 // this just free()s some kernel buffers :) 
     131 switch (def->o_flags & (O_RDONLY|O_WRONLY|O_RDWR)) { 
     132  case O_RDONLY: 
     133    shutdown(fh, SHUT_WR); 
     134   break; 
     135  case O_WRONLY: 
     136    shutdown(fh, SHUT_RD); 
     137   break; 
     138 } 
     139 
    128140 return 0; 
    129141} 
     
    274286   return -1; 
    275287  } else { 
     288   if ( def->type == ROAR_VIO_DEF_TYPE_FILE ) 
     289    return roar_vio_socket_init_unix_def(def, def->d.file); 
     290 
    276291   return -1; 
    277292  } 
Note: See TracChangeset for help on using the changeset viewer.