Changeset 5365:fa05e52423d9 in roaraudio for libroar
- Timestamp:
- 12/19/11 19:00:15 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/basic.c
r5360 r5365 293 293 } 294 294 295 int roar_connect_fh (struct roar_connection * con, int fh) { 296 297 if ( con == NULL || fh == -1 ) { 295 int roar_connect_none (struct roar_connection * con) { 296 if ( con == NULL ) { 298 297 roar_err_set(ROAR_ERROR_INVAL); 299 298 return -1; 300 299 } 301 302 // specal hack to set an ilegal value used internaly in libroar:303 if ( fh == -2 )304 fh = -1;305 300 306 301 memset(con, 0, sizeof(struct roar_connection)); … … 317 312 con->viocon = &(con->viocon_store); 318 313 314 // con->flags |= ROAR_CON_FLAGS_VIO; 315 316 roar_err_set(ROAR_ERROR_NONE); 317 return 0; 318 } 319 320 int roar_connect_vio (struct roar_connection * con, struct roar_vio_calls * vio) { 321 if ( con == NULL || vio == NULL ) { 322 roar_err_set(ROAR_ERROR_INVAL); 323 return -1; 324 } 325 326 if ( roar_connect_none(con) == -1 ) 327 return -1; 328 329 con->viocon = vio; 330 con->flags |= ROAR_CON_FLAGS_VIO; 331 332 return -1; 333 } 334 335 int roar_connect_fh (struct roar_connection * con, int fh) { 336 337 if ( con == NULL || fh == -1 ) { 338 roar_err_set(ROAR_ERROR_INVAL); 339 return -1; 340 } 341 342 if ( roar_connect_none(con) == -1 ) 343 return -1; 344 345 // specal hack to set an ilegal value used internaly in libroar: 346 if ( fh == -2 ) 347 fh = -1; 348 319 349 if ( roar_vio_open_fh_socket(con->viocon, fh) != -1 ) { 320 350 con->flags |= ROAR_CON_FLAGS_VIO;
Note: See TracChangeset
for help on using the changeset viewer.