[sr-dev] git:5.0:a6acbf20: registrar: do not return 0 in some cases of failure for save()
Daniel-Constantin Mierla
miconda at gmail.com
Mon Oct 30 10:39:41 CET 2017
Module: kamailio
Branch: 5.0
Commit: a6acbf20d943bec39d4e09b5e0b3fd3ca9a72966
URL: https://github.com/kamailio/kamailio/commit/a6acbf20d943bec39d4e09b5e0b3fd3ca9a72966
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-10-30T10:39:06+01:00
registrar: do not return 0 in some cases of failure for save()
(cherry picked from commit 9e5820f0c98b86824fcafe128fbfe0d37173479a)
---
Modified: src/modules/registrar/save.c
---
Diff: https://github.com/kamailio/kamailio/commit/a6acbf20d943bec39d4e09b5e0b3fd3ca9a72966.diff
Patch: https://github.com/kamailio/kamailio/commit/a6acbf20d943bec39d4e09b5e0b3fd3ca9a72966.patch
---
diff --git a/src/modules/registrar/save.c b/src/modules/registrar/save.c
index 4ed6e7539e..1432efed64 100644
--- a/src/modules/registrar/save.c
+++ b/src/modules/registrar/save.c
@@ -1008,9 +1008,9 @@ int save(struct sip_msg* _m, udomain_t* _d, int _cflags, str *_uri)
if (is_route_type(REQUEST_ROUTE) && !is_cflag_set(REG_SAVE_NORPL_FL) )
reg_send_reply(_m);
if (R_TOO_MANY == rerrno)
- return -2;
+ return -2;
/* for all other */
- return 0;
+ return -1;
}
/* Return values:
@@ -1018,7 +1018,7 @@ int save(struct sip_msg* _m, udomain_t* _d, int _cflags, str *_uri)
-2 Error in unregistering user
-3 Contacts for AOR not found
*/
-
+
int unregister(struct sip_msg* _m, udomain_t* _d, str* _uri, str *_ruid)
{
str aor = {0, 0};
More information about the sr-dev
mailing list