Changeset 5438:4eb05969f66c in roaraudio for libroar/roardl.c
- Timestamp:
- 03/20/12 17:00:08 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/roardl.c
r5431 r5438 110 110 int roar_dl_para_ref (struct roar_dl_librarypara * para) { 111 111 if ( para == NULL ) { 112 ROAR_DBG("roar_dl_para_ref(para=%p) = -1 // error=FAULT", para); 112 113 roar_err_set(ROAR_ERROR_FAULT); 113 114 return -1; … … 116 117 para->refc++; 117 118 119 ROAR_DBG("roar_dl_para_ref(para=%p) = 0", para); 118 120 return 0; 119 121 } … … 121 123 int roar_dl_para_unref (struct roar_dl_librarypara * para) { 122 124 if ( para == NULL ) { 125 ROAR_DBG("roar_dl_para_unref(para=%p) = -1 // error=FAULT", para); 123 126 roar_err_set(ROAR_ERROR_FAULT); 124 127 return -1; … … 127 130 para->refc--; 128 131 129 if ( para->refc ) 132 if ( para->refc ) { 133 ROAR_DBG("roar_dl_para_unref(para=%p) = 0", para); 130 134 return 0; 135 } 131 136 132 137 if ( para->notifycore != NULL ) … … 140 145 roar_mm_free(para); 141 146 147 ROAR_DBG("roar_dl_para_unref(para=%p) = 0", para); 142 148 return 0; 143 149 } … … 408 414 int roar_dl_ref (struct roar_dl_lhandle * lhandle) { 409 415 if ( (void*)lhandle < (void*)128 ) { 416 ROAR_DBG("roar_dl_ref(lhandle=%p) = -1 // error=BADFH", lhandle); 410 417 roar_err_set(ROAR_ERROR_BADFH); 411 418 return -1; … … 414 421 lhandle->refc++; 415 422 423 ROAR_DBG("roar_dl_ref(lhandle=%p) = 0", lhandle); 416 424 return 0; 417 425 } … … 421 429 422 430 if ( (void*)lhandle < (void*)128 ) { 431 ROAR_DBG("roar_dl_unref(lhandle=%p) = -1 // error=BADFH", lhandle); 423 432 roar_err_set(ROAR_ERROR_BADFH); 424 433 return -1; 425 434 } 426 435 427 lhandle->refc++; 428 429 if ( lhandle->refc ) 436 lhandle->refc--; 437 438 if ( lhandle->refc ) { 439 ROAR_DBG("roar_dl_unref(lhandle=%p) = 0", lhandle); 430 440 return 0; 441 } 431 442 432 443 if ( lhandle->lib != NULL && lhandle->lib->unload != NULL ) { … … 457 468 roar_mm_free(lhandle); 458 469 470 ROAR_DBG("roar_dl_unref(lhandle=%p) = %i", lhandle, ret); 459 471 return ret; 460 472 }
Note: See TracChangeset
for help on using the changeset viewer.