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: https://svn.pjsip.org/repos/pjproject/trunk@3455 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjsip/src/pjsip-simple/evsub.c b/pjsip/src/pjsip-simple/evsub.c
index bf26a3d..dc662aa 100644
--- a/pjsip/src/pjsip-simple/evsub.c
+++ b/pjsip/src/pjsip-simple/evsub.c
@@ -287,8 +287,10 @@
{ "NOTIFY", 6}
};
- pj_register_strerror(PJSIP_SIMPLE_ERRNO_START, PJ_ERRNO_SPACE_SIZE,
- &pjsipsimple_strerror);
+ status = pj_register_strerror(PJSIP_SIMPLE_ERRNO_START,
+ PJ_ERRNO_SPACE_SIZE,
+ &pjsipsimple_strerror);
+ pj_assert(status == PJ_SUCCESS);
PJ_ASSERT_RETURN(endpt != NULL, PJ_EINVAL);
PJ_ASSERT_RETURN(mod_evsub.mod.id == -1, PJ_EINVALIDOP);