Module: kamailio
Branch: master
Commit: ef5e889dce3e2ff077b300f183b6d3262aeab9f8
URL:
https://github.com/kamailio/kamailio/commit/ef5e889dce3e2ff077b300f183b6d32…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-02T13:17:17+01:00
pdt: return 0 when add_to_tree() detect duplicated prefix with pdt mode 1
- GH #3626
---
Modified: src/modules/pdt/pdtree.c
---
Diff:
https://github.com/kamailio/kamailio/commit/ef5e889dce3e2ff077b300f183b6d32…
Patch:
https://github.com/kamailio/kamailio/commit/ef5e889dce3e2ff077b300f183b6d32…
---
diff --git a/src/modules/pdt/pdtree.c b/src/modules/pdt/pdtree.c
index b211ca6611d..5e60fe216e9 100644
--- a/src/modules/pdt/pdtree.c
+++ b/src/modules/pdt/pdtree.c
@@ -121,7 +121,7 @@ int add_to_tree(pdt_tree_t *pt, str *sp, str *sd)
if(_pdt_mode & 1) {
LM_DBG("prefix already allocated [%.*s/[%.*s] - ignoring\n",
sp->len, sp->s, sd->len, sd->s);
- return -1;
+ return 0;
} else {
LM_ERR("prefix already allocated [%.*s/[%.*s]\n", sp->len, sp->s,
sd->len, sd->s);