summaryrefslogtreecommitdiff
path: root/pjlib/src/pj/errno.c
diff options
context:
space:
mode:
Diffstat (limited to 'pjlib/src/pj/errno.c')
-rw-r--r--pjlib/src/pj/errno.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/pjlib/src/pj/errno.c b/pjlib/src/pj/errno.c
index e36b3266..40ac9779 100644
--- a/pjlib/src/pj/errno.c
+++ b/pjlib/src/pj/errno.c
@@ -128,6 +128,14 @@ PJ_DEF(pj_status_t) pj_register_strerror( pj_status_t start,
if (IN_RANGE(start, err_msg_hnd[i].begin, err_msg_hnd[i].end) ||
IN_RANGE(start+space-1, err_msg_hnd[i].begin, err_msg_hnd[i].end))
{
+ if (err_msg_hnd[i].begin == start &&
+ err_msg_hnd[i].end == (start+space) &&
+ err_msg_hnd[i].strerror == f)
+ {
+ /* The same range and handler has already been registered */
+ return PJ_SUCCESS;
+ }
+
return PJ_EEXISTS;
}
}