Module: kamailio
Branch: 5.4
Commit: 4bee05821e9a9a1c72b73da8d1aae82735802602
URL:
https://github.com/kamailio/kamailio/commit/4bee05821e9a9a1c72b73da8d1aae82…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-10-14T10:36:45+02:00
dlgs: proper return for tags counting
- GH #2884
(cherry picked from commit 1f12e2a03856f9c2d12cf62c1e65e84380729a06)
(cherry picked from commit b6484e4614ebc0f3fd54224ba9470d6c5b322a6f)
---
Modified: src/modules/dlgs/dlgs_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/4bee05821e9a9a1c72b73da8d1aae82…
Patch:
https://github.com/kamailio/kamailio/commit/4bee05821e9a9a1c72b73da8d1aae82…
---
diff --git a/src/modules/dlgs/dlgs_mod.c b/src/modules/dlgs/dlgs_mod.c
index 503dd8c197..46de9d5c44 100644
--- a/src/modules/dlgs/dlgs_mod.c
+++ b/src/modules/dlgs/dlgs_mod.c
@@ -344,10 +344,7 @@ static int ki_dlgs_tags_count(sip_msg_t *msg, str *vtags)
int ret;
ret = dlgs_tags_count(msg, vtags);
- if(ret<=0) {
- return (ret-1);
- }
- return 1;
+ return (ret<=0)?(ret-1):ret;
}
/**