Changeset 5231:8b30ddb689b8 in roaraudio for libroar
- Timestamp:
- 11/12/11 14:31:25 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/basic.c
r5228 r5231 286 286 memset(con, 0, sizeof(struct roar_connection)); 287 287 288 con->flags = ROAR_CON_FLAGS_FH; 289 con->__fh = fh; 290 291 if ( roar_vio_open_fh_socket(&(con->viocon), fh) != -1 ) 288 if ( roar_vio_open_fh_socket(&(con->viocon), fh) != -1 ) { 292 289 con->flags |= ROAR_CON_FLAGS_VIO; 290 } 293 291 294 292 roar_err_set(ROAR_ERROR_NONE); … … 297 295 298 296 int roar_get_connection_fh (struct roar_connection * con) { 297 int fh; 298 299 ROAR_DBG("roar_get_connection_fh(con=%p) = ?", con); 300 299 301 roar_debug_warn_sysio("roar_get_connection_fh", "roar_get_connection_vio2", NULL); 300 302 … … 302 304 return -1; 303 305 304 if ( !(con->flags & ROAR_CON_FLAGS_FH) ) 305 return -1; 306 307 return con->__fh; 308 } 309 310 int roar_get_connection_vio (struct roar_connection * con, struct roar_vio_calls * vio) { 311 roar_debug_warn_obsolete("roar_get_connection_vio", "roar_get_connection_vio2", NULL); 312 313 if ( con == NULL || vio == NULL ) 314 return -1; 315 316 if ( !(con->flags & ROAR_CON_FLAGS_FH) ) 317 return -1; 318 319 return roar_vio_open_fh_socket(vio, con->__fh); 306 ROAR_DBG("roar_get_connection_fh(con=%p) = ?", con); 307 308 if ( roar_vio_ctl(&(con->viocon), ROAR_VIO_CTL_GET_FH, &fh) == -1 ) 309 return -1; 310 311 ROAR_DBG("roar_get_connection_fh(con=%p) = %i", con, fh); 312 313 return fh; 320 314 } 321 315 … … 359 353 void (*cb)(struct roar_connection * con, 360 354 struct roar_message * mes, 355 void * data, 361 356 void * userdata), 362 357 void * userdata) { … … 365 360 366 361 con->cb = cb; 367 con-> userdata = userdata;362 con->cb_userdata = userdata; 368 363 369 364 return 0;
Note: See TracChangeset
for help on using the changeset viewer.