Module: kamailio
Branch: master
Commit: 7971d825361bee29d65fcea69f2978d7af31eeaa
URL:
https://github.com/kamailio/kamailio/commit/7971d825361bee29d65fcea69f2978d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-05-23T09:41:13+02:00
ipops: create container items if not found for srv and naptr functions
- GH #3419
---
Modified: src/modules/ipops/ipops_pv.c
---
Diff:
https://github.com/kamailio/kamailio/commit/7971d825361bee29d65fcea69f2978d…
Patch:
https://github.com/kamailio/kamailio/commit/7971d825361bee29d65fcea69f2978d…
---
diff --git a/src/modules/ipops/ipops_pv.c b/src/modules/ipops/ipops_pv.c
index 784c6a28ada..c6374b6ab7c 100644
--- a/src/modules/ipops/ipops_pv.c
+++ b/src/modules/ipops/ipops_pv.c
@@ -631,7 +631,7 @@ static sr_srv_item_t *_sr_srv_list = NULL;
*
* INPUT:
* Arg (1) = pvid string pointer
- * Arg (2) = find flag; <>0=search only
+ * Arg (2) = find flag; 0 - add if not found; 1 - search only
* OUTPUT: srv record pointer; NULL=not found
**********/
@@ -1020,7 +1020,7 @@ int srv_update_pv(str *srvcname, str *pvid)
LM_DBG("service name missing: %.*s\n", srvcname->len, srvcname->s);
return -2;
}
- pitem = sr_srv_add_item(pvid, 1);
+ pitem = sr_srv_add_item(pvid, 0);
if(!pitem) {
LM_DBG("pvid not found: %.*s\n", pvid->len, pvid->s);
return -3;
@@ -1181,7 +1181,7 @@ static sr_naptr_item_t *_sr_naptr_list = NULL;
*
* INPUT:
* Arg (1) = pvid string pointer
- * Arg (2) = find flag; <>0=search only
+ * Arg (2) = find flag; 0 - add if not found, 1 - search only
* OUTPUT: naptr record pointer; NULL=not found
**********/
@@ -1482,7 +1482,7 @@ int naptr_update_pv(str *naptrname, str *pvid)
LM_DBG("naptr name missing: %.*s\n", naptrname->len, naptrname->s);
return -2;
}
- pitem = sr_naptr_add_item(pvid, 1);
+ pitem = sr_naptr_add_item(pvid, 0);
if(!pitem) {
LM_DBG("pvid not found: %.*s\n", pvid->len, pvid->s);
return -3;