summaryrefslogtreecommitdiff
path: root/pjmedia/src/pjmedia-audiodev
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2011-03-16 07:34:16 +0000
committerNanang Izzuddin <nanang@teluu.com>2011-03-16 07:34:16 +0000
commit2a9988f3e4c9b8d40ffebaa4427908de29324711 (patch)
tree0fec17a1ff6201f61e16e3bb03821c62080be372 /pjmedia/src/pjmedia-audiodev
parente8673ffff74a0e9a63ce789e884a98a369bc8cc3 (diff)
Fix #1212:
- Updated pj_register_strerror() to just return PJ_SUCCESS when the same range and handler is being re-registered. - Removed the usage of static flag of error string handler registration in some modules, which prevent the re-registration of the handler, e.g: in restarting pjsua, as such flags never got reseted. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3455 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/src/pjmedia-audiodev')
-rw-r--r--pjmedia/src/pjmedia-audiodev/audiodev.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/pjmedia/src/pjmedia-audiodev/audiodev.c b/pjmedia/src/pjmedia-audiodev/audiodev.c
index 26288616..1614955d 100644
--- a/pjmedia/src/pjmedia-audiodev/audiodev.c
+++ b/pjmedia/src/pjmedia-audiodev/audiodev.c
@@ -364,7 +364,7 @@ static void deinit_driver(unsigned drv_idx)
PJ_DEF(pj_status_t) pjmedia_aud_subsys_init(pj_pool_factory *pf)
{
unsigned i;
- pj_status_t status = PJ_SUCCESS;
+ pj_status_t status;
/* Allow init() to be called multiple times as long as there is matching
* number of shutdown().
@@ -374,9 +374,10 @@ PJ_DEF(pj_status_t) pjmedia_aud_subsys_init(pj_pool_factory *pf)
}
/* Register error subsystem */
- pj_register_strerror(PJMEDIA_AUDIODEV_ERRNO_START,
- PJ_ERRNO_SPACE_SIZE,
- &pjmedia_audiodev_strerror);
+ status = pj_register_strerror(PJMEDIA_AUDIODEV_ERRNO_START,
+ PJ_ERRNO_SPACE_SIZE,
+ &pjmedia_audiodev_strerror);
+ pj_assert(status == PJ_SUCCESS);
/* Init */
aud_subsys.pf = pf;