Module: kamailio
Branch: 5.4
Commit: 49d833852bdcdc7c37ebd8d8d4e8cfb5ef149613
URL:
https://github.com/kamailio/kamailio/commit/49d833852bdcdc7c37ebd8d8d4e8cfb…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-12-01T09:44:57+01:00
dlgs: fixed return value for dlgs_tags_count()
(cherry picked from commit 057383f0b780b8317831f72c7c9f64786cc5a25e)
---
Modified: src/modules/dlgs/dlgs_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/49d833852bdcdc7c37ebd8d8d4e8cfb…
Patch:
https://github.com/kamailio/kamailio/commit/49d833852bdcdc7c37ebd8d8d4e8cfb…
---
diff --git a/src/modules/dlgs/dlgs_mod.c b/src/modules/dlgs/dlgs_mod.c
index c7f60fcab8..503dd8c197 100644
--- a/src/modules/dlgs/dlgs_mod.c
+++ b/src/modules/dlgs/dlgs_mod.c
@@ -341,8 +341,11 @@ static int w_dlgs_tags_rm(sip_msg_t *msg, char *ptags, char *p2)
*/
static int ki_dlgs_tags_count(sip_msg_t *msg, str *vtags)
{
- if(dlgs_tags_count(msg, vtags)<0) {
- return -1;
+ int ret;
+
+ ret = dlgs_tags_count(msg, vtags);
+ if(ret<=0) {
+ return (ret-1);
}
return 1;
}