[sr-dev] git:5.5:b6484e46: dlgs: proper return for tags counting

Daniel-Constantin Mierla miconda at gmail.com
Thu Oct 14 10:35:48 CEST 2021


Module: kamailio
Branch: 5.5
Commit: b6484e4614ebc0f3fd54224ba9470d6c5b322a6f
URL: https://github.com/kamailio/kamailio/commit/b6484e4614ebc0f3fd54224ba9470d6c5b322a6f

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-10-14T10:35:32+02:00

dlgs: proper return for tags counting

- GH #2884

(cherry picked from commit 1f12e2a03856f9c2d12cf62c1e65e84380729a06)

---

Modified: src/modules/dlgs/dlgs_mod.c

---

Diff:  https://github.com/kamailio/kamailio/commit/b6484e4614ebc0f3fd54224ba9470d6c5b322a6f.diff
Patch: https://github.com/kamailio/kamailio/commit/b6484e4614ebc0f3fd54224ba9470d6c5b322a6f.patch

---

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;
 }
 
 /**




More information about the sr-dev mailing list