[sr-dev] Re: [kamailio/kamailio] Using PATH makes nathelper to send the SIP ping to itself (#2011)

2024-01-12 Thread github-actions[bot] via sr-dev
Closed #2011 as not planned.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2011#event-11475914261
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] unistr.h: No such file or directory (#2020)

2024-01-12 Thread Sergey Safarov via sr-dev
I think yes, required install "libunistring-devel"

https://github.com/kamailio/kamailio/blob/master/pkg/kamailio/obs/kamailio.spec#L1097-L1101

On Thu, Jan 11, 2024 at 11:58 AM ljql2001 via sr-dev <
sr-dev@lists.kamailio.org> wrote:

> Also, should install "libunistring-devel" instead of "libunistring-dev" on
> CentOS.
>
> —
> Reply to this email directly, view it on GitHub
> ,
> or unsubscribe
> 
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: 
> ___
> Kamailio (SER) - Development Mailing List
> To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
>
___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:cb92b6a2: topos: prefix global variable

2024-01-12 Thread Daniel-Constantin Mierla via sr-dev
Module: kamailio
Branch: master
Commit: cb92b6a23d622b06bcb18195b5c0525fcd273e7a
URL: 
https://github.com/kamailio/kamailio/commit/cb92b6a23d622b06bcb18195b5c0525fcd273e7a

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2024-01-12T19:53:57+01:00

topos: prefix global variable

---

Modified: src/modules/topos/topos_mod.c

---

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

---

diff --git a/src/modules/topos/topos_mod.c b/src/modules/topos/topos_mod.c
index 7bcb2fea3c9..e37ca847beb 100644
--- a/src/modules/topos/topos_mod.c
+++ b/src/modules/topos/topos_mod.c
@@ -134,7 +134,7 @@ str _tps_xavu_field_contact_host = STR_NULL;
 str _tps_context_param = STR_NULL;
 str _tps_context_value = STR_NULL;
 
-sanity_api_t scb;
+static sanity_api_t _tps_scb;
 
 int tps_msg_received(sr_event_param_t *evp);
 int tps_msg_sent(sr_event_param_t *evp);
@@ -297,7 +297,7 @@ static int mod_init(void)
}
 
if(_tps_sanity_checks != 0) {
-   if(sanity_load_api(&scb) < 0) {
+   if(sanity_load_api(&_tps_scb) < 0) {
LM_ERR("cannot bind to sanity module\n");
goto error;
}
@@ -539,7 +539,7 @@ int tps_msg_received(sr_event_param_t *evp)
 
if(msg.first_line.type == SIP_REQUEST) {
if(_tps_sanity_checks != 0) {
-   if(scb.check_defaults(&msg) < 1) {
+   if(_tps_scb.check_defaults(&msg) < 1) {
LM_ERR("sanity checks failed\n");
goto done;
}

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:1c13e99e: topoh: prefix global variable

2024-01-12 Thread Daniel-Constantin Mierla via sr-dev
Module: kamailio
Branch: master
Commit: 1c13e99efb119f75ddbd6a0aa4798cd27accbff5
URL: 
https://github.com/kamailio/kamailio/commit/1c13e99efb119f75ddbd6a0aa4798cd27accbff5

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2024-01-12T20:02:14+01:00

topoh: prefix global variable

---

Modified: src/modules/topoh/topoh_mod.c

---

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

---

diff --git a/src/modules/topoh/topoh_mod.c b/src/modules/topoh/topoh_mod.c
index 02098b1c1b0..fe63bf88c7f 100644
--- a/src/modules/topoh/topoh_mod.c
+++ b/src/modules/topoh/topoh_mod.c
@@ -95,7 +95,7 @@ int _th_use_mode = 0;
 
 struct str_hash_table *th_socket_hash_table;
 
-sanity_api_t scb;
+static sanity_api_t _tph_scb;
 
 int th_msg_received(sr_event_param_t *evp);
 int th_msg_sent(sr_event_param_t *evp);
@@ -186,7 +186,7 @@ static int mod_init(void)
}
 
if(th_sanity_checks != 0) {
-   if(sanity_load_api(&scb) < 0) {
+   if(sanity_load_api(&_tph_scb) < 0) {
LM_ERR("cannot bind to sanity module\n");
goto error;
}
@@ -515,7 +515,7 @@ int th_msg_received(sr_event_param_t *evp)
th_cookie_value.len = 2;
if(msg.first_line.type == SIP_REQUEST) {
if(th_sanity_checks != 0) {
-   if(scb.check_defaults(&msg) < 1) {
+   if(_tph_scb.check_defaults(&msg) < 1) {
LM_ERR("sanity checks failed\n");
goto done;
}

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:987e21a9: xhttp: prefix for global variable

2024-01-12 Thread Daniel-Constantin Mierla via sr-dev
Module: kamailio
Branch: master
Commit: 987e21a914edcebc9eafe21af19c8a476bf73b06
URL: 
https://github.com/kamailio/kamailio/commit/987e21a914edcebc9eafe21af19c8a476bf73b06

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2024-01-12T19:50:28+01:00

xhttp: prefix for global variable

---

Modified: src/modules/xhttp/xhttp_mod.c

---

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

---

diff --git a/src/modules/xhttp/xhttp_mod.c b/src/modules/xhttp/xhttp_mod.c
index 0660d409af6..af27baffa41 100644
--- a/src/modules/xhttp/xhttp_mod.c
+++ b/src/modules/xhttp/xhttp_mod.c
@@ -65,7 +65,7 @@ static char *xhttp_url_skip = NULL;
 static regex_t xhttp_url_skip_regexp;
 
 /** SL API structure */
-sl_api_t slb;
+static sl_api_t _xhttp_slb;
 
 static str xhttp_event_callback = STR_NULL;
 
@@ -149,7 +149,7 @@ static int mod_init(void)
}
 
/* bind the SL API */
-   if(sl_load_api(&slb) != 0) {
+   if(sl_load_api(&_xhttp_slb) != 0) {
LM_ERR("cannot bind to SL API\n");
return -1;
}
@@ -424,7 +424,7 @@ static int xhttp_send_reply(
LM_DBG("response with body: %.*s\n", body->len, body->s);
}
LM_DBG("sending out response: %d %.*s\n", code, reason->len, reason->s);
-   if(slb.sreply(msg, code, reason) < 0) {
+   if(_xhttp_slb.sreply(msg, code, reason) < 0) {
LM_ERR("Error while sending reply\n");
return -1;
}

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:0479c40f: mohqueue: rename local variables to prevent shadowing the global

2024-01-12 Thread Daniel-Constantin Mierla via sr-dev
Module: kamailio
Branch: master
Commit: 0479c40fe6fd6765de92eea8f9e0bf04dea8cbd0
URL: 
https://github.com/kamailio/kamailio/commit/0479c40fe6fd6765de92eea8f9e0bf04dea8cbd0

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2024-01-12T14:37:02+01:00

mohqueue: rename local variables to prevent shadowing the global

---

Modified: src/modules/mohqueue/mohq_funcs.c

---

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

---

diff --git a/src/modules/mohqueue/mohq_funcs.c 
b/src/modules/mohqueue/mohq_funcs.c
index 75130381746..599e5eb8a1a 100644
--- a/src/modules/mohqueue/mohq_funcs.c
+++ b/src/modules/mohqueue/mohq_funcs.c
@@ -1278,17 +1278,17 @@ int form_rtp_SDP(str *pstr, call_lst *pcall, char *pSDP)
 **/
 
char *pfncname = "form_rtp_SDP: ";
-   rtpmap **pmohfiles =
+   rtpmap **lpmohfiles =
find_MOH(pcall->pmohq->mohq_mohdir, 
pcall->pmohq->mohq_mohfile);
-   if(!pmohfiles[0]) {
+   if(!lpmohfiles[0]) {
LM_ERR("%sUnable to find any MOH files for queue (%s)!\n", 
pfncname,
pcall->pmohq->mohq_name);
return 0;
}
int nsize = strlen(pSDP) + 2;
int nidx;
-   for(nidx = 0; pmohfiles[nidx]; nidx++) {
-   nsize += strlen(pmohfiles[nidx]->pencode) // encode length
+   for(nidx = 0; lpmohfiles[nidx]; nidx++) {
+   nsize += strlen(lpmohfiles[nidx]->pencode) // encode length
 + 19; // space, type number, "a=rtpmap:%d ", 
EOL
}
 
@@ -1707,7 +1707,7 @@ void reinvite_msg(sip_msg_t *pmsg, call_lst *pcall)
 * o look for hold condition and matching payload type
 **/
 
-   rtpmap **pmohfiles =
+   rtpmap **lpmohfiles =
find_MOH(pcall->pmohq->mohq_mohdir, 
pcall->pmohq->mohq_mohfile);
int bhold = 0;
int bmatch = 0;
@@ -1749,8 +1749,8 @@ void reinvite_msg(sip_msg_t *pmsg, call_lst *pcall)
ppayload = ppayload->next) {
int ntype = atoi(ppayload->rtp_payload.s);
int nidx;
-   for(nidx = 0; pmohfiles[nidx]; nidx++) {
-   if(pmohfiles[nidx]->ntype == ntype) {
+   for(nidx = 0; lpmohfiles[nidx]; nidx++) {
+   if(lpmohfiles[nidx]->ntype == ntype) {
bmatch = 1;
break;
}

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:0ea60341: avp: rename local variable to prevent shadowing the global structure

2024-01-12 Thread Daniel-Constantin Mierla via sr-dev
Module: kamailio
Branch: master
Commit: 0ea603413de9505b5312e5930168102e816dced3
URL: 
https://github.com/kamailio/kamailio/commit/0ea603413de9505b5312e5930168102e816dced3

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2024-01-12T13:10:33+01:00

avp: rename local variable to prevent shadowing the global structure

---

Modified: src/modules/avp/avp.c

---

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

---

diff --git a/src/modules/avp/avp.c b/src/modules/avp/avp.c
index 38fa08fe1cb..d04fe47f880 100644
--- a/src/modules/avp/avp.c
+++ b/src/modules/avp/avp.c
@@ -1454,7 +1454,7 @@ static int attr_hdr_body2attrs2(
 
 static int attr_hdr_body2attrs_fixup(void **param, int param_no)
 {
-   char *c, *params;
+   char *c, *sparams;
hdr_name_t *h = NULL;
int n;
str *s;
@@ -1467,9 +1467,9 @@ static int attr_hdr_body2attrs_fixup(void **param, int 
param_no)
c);
return E_CFG;
} else {
-   params = strchr(c, PARAM_DELIM);
-   if(params)
-   n = params - c;
+   sparams = strchr(c, PARAM_DELIM);
+   if(sparams)
+   n = sparams - c;
else
n = strlen(c);
if(n == 0) {
@@ -1486,10 +1486,10 @@ static int attr_hdr_body2attrs_fixup(void **param, int 
param_no)
h->name.s.s = (char *)h + sizeof(hdr_name_t);
memcpy(h->name.s.s, c, n + 1);
}
-   if(params) {
+   if(sparams) {
h->val_types = 0;
-   while(*params) {
-   switch(*params) {
+   while(*sparams) {
+   switch(*sparams) {
case 'i':
case 'I':
h->val_types = VAL_TYPE_INT;
@@ -1504,11 +1504,11 @@ static int attr_hdr_body2attrs_fixup(void **param, int 
param_no)
LOG(L_ERR,

"attr_hdr_body2attrs_fixup: bad field param "
"modifier near 
'%s'\n",
-   params);
+   sparams);
pkg_free(h);
return E_CFG;
}
-   params++;
+   sparams++;
}
if(!h->val_types) {
LOG(L_ERR, "attr_hdr_body2attrs_fixup: no field 
param modifier "

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] dmq_usrloc: DMQ also copies and sends attributes related to contacts (PR #3679)

2024-01-12 Thread Xenofon Karamanos via sr-dev
@xkaraman pushed 2 commits.

b6e9fe81e4464d462dfb3b0dc5f469565cd63b1e  dmq_usrloc: Transfer attributes
709fa172980f018a9ae2b502f2d3bdef531c3080  usrloc: Modify destroy order and 
contact xavp

-- 
View it on GitHub:
https://github.com/kamailio/kamailio/pull/3679/files/5e486e0e87446ecb018878cd10f780f63b598643..709fa172980f018a9ae2b502f2d3bdef531c3080
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-12 Thread Dennis via sr-dev
> I meant for the case/flag DS_MATCH_FULLADDRSOCK: a destination record that 
> matches **only** the socket is selected against one that matches 
> address+port+proto.

Using DS_MATCH_TRY_FULL ADDR SOCK, at least an ip must also be matched, and in 
this mode we do not interrupt the serach cycle, trying to find a more complete 
match, so the ip+socket combination will be valid, but not only the socket 
match. If i am right understand the question.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-119042
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-12 Thread Daniel-Constantin Mierla via sr-dev
I meant for the case/flag DS_MATCH_FULLADDRSOCK: a destination record that 
matches **only** the socket is selected against one that matches 
address+port+proto.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1888669573
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-12 Thread Dennis via sr-dev
> If I understand the code correctly, a destination record that matches only 
> the socket is selected against one that matches address/port/proto? Is it 
> like that and if yes, is it the expected result?

Yes, it is a separate flag - DS_MATCH_SOCKET (8), it work like 
ds_is_from_list(-1,0), but socket is take in account also (if specified in the 
configuration).



-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1888650488
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org