Changeset 3769:14c294155cad in roaraudio for libroar/vio.c
- Timestamp:
- 05/05/10 10:55:36 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/vio.c
r3517 r3769 174 174 } 175 175 176 // specal commands: 177 int roar_vio_accept (struct roar_vio_calls * calls, struct roar_vio_calls * dst) { 178 if (dst == NULL || calls == NULL) 179 return -1; 180 181 return roar_vio_ctl(dst, ROAR_VIO_CTL_ACCEPT, calls); 182 } 183 176 184 // converters: 177 185 int roar_vio_open_file (struct roar_vio_calls * calls, char * filename, int flags, mode_t mode) { … … 331 339 332 340 int roar_vio_basic_ctl (struct roar_vio_calls * vio, int cmd, void * data) { 341 int fh; 333 342 334 343 if ( vio == NULL || cmd == -1 ) … … 352 361 return 0; 353 362 break; 363 case ROAR_VIO_CTL_ACCEPT: 364 fh = accept(roar_vio_get_fh(vio), NULL, 0); 365 if ( fh == -1 ) 366 return -1; 367 368 // most proably a socket. 369 if ( roar_vio_open_fh_socket(data, fh) == -1 ) { 370 #ifdef ROAR_TARGET_WIN32 371 closesocket(fh); 372 #else 373 close(fh); 374 #endif 375 return -1; 376 } 377 378 return 0; 379 break; 354 380 } 355 381
Note: See TracChangeset
for help on using the changeset viewer.