kamailio.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
List overview
Download
sr-dev
April 2021
----- 2024 -----
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
sr-dev@lists.kamailio.org
14 participants
303 discussions
Start a n
N
ew thread
git:5.5:f3cf66fa: dmq: docs - fix section id for dmq.remove rpc command
by Daniel-Constantin Mierla
Module: kamailio Branch: 5.5 Commit: f3cf66fafaba73b245b5e8179c290da936f6418e URL:
https://github.com/kamailio/kamailio/commit/f3cf66fafaba73b245b5e8179c290da…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2021-04-27T10:00:28+02:00 dmq: docs - fix section id for dmq.remove rpc command (cherry picked from commit 2c473f7c2eccf4ef79f23f9cecd122e861395a00) --- Modified: src/modules/dmq/doc/dmq_admin.xml --- Diff:
https://github.com/kamailio/kamailio/commit/f3cf66fafaba73b245b5e8179c290da…
Patch:
https://github.com/kamailio/kamailio/commit/f3cf66fafaba73b245b5e8179c290da…
--- diff --git a/src/modules/dmq/doc/dmq_admin.xml b/src/modules/dmq/doc/dmq_admin.xml index ebc6f44e1a..661fd4b847 100644 --- a/src/modules/dmq/doc/dmq_admin.xml +++ b/src/modules/dmq/doc/dmq_admin.xml @@ -522,7 +522,7 @@ modparam("dmq", "ping_interval", 90) </programlisting> </example> </section> - <section id="dmq.r.list_nodes"> + <section id="dmq.r.remove"> <title>dmq.remove</title> <para> Remove a DMQ node by address.
3 years, 7 months
1
0
0
0
git:master:3f25ef01: dispatcher: docs - set xmlns for include tags
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 3f25ef01c5cc3adb02dd1bfecdfd4c3ce80cef47 URL:
https://github.com/kamailio/kamailio/commit/3f25ef01c5cc3adb02dd1bfecdfd4c3…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2021-04-27T09:59:29+02:00 dispatcher: docs - set xmlns for include tags --- Modified: src/modules/dispatcher/doc/dispatcher.xml Modified: src/modules/dispatcher/doc/dispatcher_admin.xml --- Diff:
https://github.com/kamailio/kamailio/commit/3f25ef01c5cc3adb02dd1bfecdfd4c3…
Patch:
https://github.com/kamailio/kamailio/commit/3f25ef01c5cc3adb02dd1bfecdfd4c3…
--- diff --git a/src/modules/dispatcher/doc/dispatcher.xml b/src/modules/dispatcher/doc/dispatcher.xml index 3888e5f281..af040e737d 100644 --- a/src/modules/dispatcher/doc/dispatcher.xml +++ b/src/modules/dispatcher/doc/dispatcher.xml @@ -6,12 +6,9 @@ <!ENTITY % docentities SYSTEM "../../../../doc/docbook/entities.xml"> %docentities; -<!ENTITY % xinclude SYSTEM "
http://www.docbook.org/xml/4.4/xinclude.mod
" > -%xinclude; - ]> -<book xmlns:xi="
http://www.w3.org/2001/XInclude
"> +<book> <bookinfo> <title>DISPATCHER Module</title> <productname class="trade">&kamailioname;</productname> @@ -97,7 +94,7 @@ </bookinfo> <toc/> - <xi:include href="dispatcher_admin.xml"/> - <xi:include href="dispatcher_faq.xml"/> + <xi:include xmlns:xi="
http://www.w3.org/2001/XInclude
" href="dispatcher_admin.xml"/> + <xi:include xmlns:xi="
http://www.w3.org/2001/XInclude
" href="dispatcher_faq.xml"/> </book> diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml index 45f93a3121..0ac1a430e6 100644 --- a/src/modules/dispatcher/doc/dispatcher_admin.xml +++ b/src/modules/dispatcher/doc/dispatcher_admin.xml @@ -1,18 +1,15 @@ <?xml version="1.0" encoding='ISO-8859-1'?> -<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "
http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd
" [ - + <!-- Include general documentation entities --> <!ENTITY % docentities SYSTEM "../../../../doc/docbook/entities.xml"> %docentities; -<!ENTITY % xinclude SYSTEM "
http://www.docbook.org/xml/4.4/xinclude.mod
" > -%xinclude; - ]> <!-- Module User's Guide --> -<chapter xmlns:xi="
http://www.w3.org/2001/XInclude
"> +<chapter> <title>&adminguide;</title> @@ -2215,7 +2212,7 @@ setid(int) destination(sip uri) flags(int,opt) priority(int,opt) attrs(str,opt) <title>dispatcher list file</title> <programlisting format="linespecific"> ... -<xi:include href="dispatcher.list" parse="text"/> +<xi:include xmlns:xi="
http://www.w3.org/2001/XInclude
" href="dispatcher.list" parse="text"/> ... </programlisting> </example> @@ -2231,7 +2228,7 @@ setid(int) destination(sip uri) flags(int,opt) priority(int,opt) attrs(str,opt) <title>&kamailio; config script - sample dispatcher usage</title> <programlisting format="linespecific"> ... -<xi:include href="dispatcher.cfg" parse="text"/> +<xi:include xmlns:xi="
http://www.w3.org/2001/XInclude
" href="dispatcher.cfg" parse="text"/> ... </programlisting> </example>
3 years, 7 months
1
0
0
0
git:master:2c473f7c: dmq: docs - fix section id for dmq.remove rpc command
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 2c473f7c2eccf4ef79f23f9cecd122e861395a00 URL:
https://github.com/kamailio/kamailio/commit/2c473f7c2eccf4ef79f23f9cecd122e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2021-04-27T09:51:30+02:00 dmq: docs - fix section id for dmq.remove rpc command --- Modified: src/modules/dmq/doc/dmq_admin.xml --- Diff:
https://github.com/kamailio/kamailio/commit/2c473f7c2eccf4ef79f23f9cecd122e…
Patch:
https://github.com/kamailio/kamailio/commit/2c473f7c2eccf4ef79f23f9cecd122e…
--- diff --git a/src/modules/dmq/doc/dmq_admin.xml b/src/modules/dmq/doc/dmq_admin.xml index ebc6f44e1a..661fd4b847 100644 --- a/src/modules/dmq/doc/dmq_admin.xml +++ b/src/modules/dmq/doc/dmq_admin.xml @@ -522,7 +522,7 @@ modparam("dmq", "ping_interval", 90) </programlisting> </example> </section> - <section id="dmq.r.list_nodes"> + <section id="dmq.r.remove"> <title>dmq.remove</title> <para> Remove a DMQ node by address.
3 years, 7 months
1
0
0
0
git:master:764d5be0: core/mem: q_malloc - use #else with DBG_QM_MALLOC for debug on freed fragments
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 764d5be0c44036bb4b86f841588fb0df3b4bb834 URL:
https://github.com/kamailio/kamailio/commit/764d5be0c44036bb4b86f841588fb0d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2021-04-26T11:22:20+02:00 core/mem: q_malloc - use #else with DBG_QM_MALLOC for debug on freed fragments --- Modified: src/core/mem/q_malloc.c --- Diff:
https://github.com/kamailio/kamailio/commit/764d5be0c44036bb4b86f841588fb0d…
Patch:
https://github.com/kamailio/kamailio/commit/764d5be0c44036bb4b86f841588fb0d…
--- diff --git a/src/core/mem/q_malloc.c b/src/core/mem/q_malloc.c index 94f972eae9..fb786ba635 100644 --- a/src/core/mem/q_malloc.c +++ b/src/core/mem/q_malloc.c @@ -509,7 +509,7 @@ void qm_free(void* qmp, void* p) #ifdef DBG_QM_MALLOC qm_debug_frag(qm, f, file, line); - if (f->u.is_free){ + if (unlikely(f->u.is_free)){ if(likely(cfg_get(core, core_cfg, mem_safety)==0)) { LM_CRIT("BUG: freeing already freed pointer (%p)," " called from %s: %s(%d), first free %s: %s(%ld) - aborting\n", @@ -524,12 +524,13 @@ void qm_free(void* qmp, void* p) } MDBG("freeing frag. %p alloc'ed from %s: %s(%ld)\n", f, f->file, f->func, f->line); -#endif +#else if (unlikely(f->u.is_free)){ LM_INFO("freeing a free fragment (%p/%p) - ignore\n", f, p); return; } +#endif size=f->size; qm->used-=size;
3 years, 7 months
2
2
0
0
git:master:e279f2f4: topos: explicitely set the db match operator and value type for uuid
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: e279f2f464ab05e1a2821d6e2d9e673fe145fbf2 URL:
https://github.com/kamailio/kamailio/commit/e279f2f464ab05e1a2821d6e2d9e673…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2021-04-26T14:58:39+02:00 topos: explicitely set the db match operator and value type for uuid --- Modified: src/modules/topos/tps_storage.c --- Diff:
https://github.com/kamailio/kamailio/commit/e279f2f464ab05e1a2821d6e2d9e673…
Patch:
https://github.com/kamailio/kamailio/commit/e279f2f464ab05e1a2821d6e2d9e673…
--- diff --git a/src/modules/topos/tps_storage.c b/src/modules/topos/tps_storage.c index 2d611402c8..6e88b35af3 100644 --- a/src/modules/topos/tps_storage.c +++ b/src/modules/topos/tps_storage.c @@ -1148,20 +1148,32 @@ int tps_db_load_branch(sip_msg_t *msg, tps_data_t *md, tps_data_t *sd, if(md->a_uuid.len>0) { if(md->a_uuid.s[0]=='a') { db_keys[nr_keys]=&tt_col_a_uuid; + db_ops[nr_keys]=OP_EQ; + db_vals[nr_keys].type = DB1_STR; + db_vals[nr_keys].nul = 0; db_vals[nr_keys].val.str_val = TPS_STRZ(md->a_uuid); nr_keys++; } else if(md->a_uuid.s[0]=='b') { db_keys[nr_keys]=&tt_col_b_uuid; + db_ops[nr_keys]=OP_EQ; + db_vals[nr_keys].type = DB1_STR; + db_vals[nr_keys].nul = 0; db_vals[nr_keys].val.str_val = TPS_STRZ(md->a_uuid); nr_keys++; } } else if(md->b_uuid.len>0) { if(md->b_uuid.s[0]=='a') { db_keys[nr_keys]=&tt_col_a_uuid; + db_ops[nr_keys]=OP_EQ; + db_vals[nr_keys].type = DB1_STR; + db_vals[nr_keys].nul = 0; db_vals[nr_keys].val.str_val = TPS_STRZ(md->b_uuid); nr_keys++; } else if(md->b_uuid.s[0]=='b') { db_keys[nr_keys]=&tt_col_b_uuid; + db_ops[nr_keys]=OP_EQ; + db_vals[nr_keys].type = DB1_STR; + db_vals[nr_keys].nul = 0; db_vals[nr_keys].val.str_val = TPS_STRZ(md->b_uuid); nr_keys++; }
3 years, 7 months
1
0
0
0
git:master:fb5ab201: topos: increase the number of db keys for query when using uuid for branch
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: fb5ab20123a07afdfaf96197db25d76f8dda0683 URL:
https://github.com/kamailio/kamailio/commit/fb5ab20123a07afdfaf96197db25d76…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2021-04-26T14:51:55+02:00 topos: increase the number of db keys for query when using uuid for branch - debug message to print a/b uuid --- Modified: src/modules/topos/tps_msg.c Modified: src/modules/topos/tps_storage.c --- Diff:
https://github.com/kamailio/kamailio/commit/fb5ab20123a07afdfaf96197db25d76…
Patch:
https://github.com/kamailio/kamailio/commit/fb5ab20123a07afdfaf96197db25d76…
--- diff --git a/src/modules/topos/tps_msg.c b/src/modules/topos/tps_msg.c index 852a19aaa2..854d2cdbc6 100644 --- a/src/modules/topos/tps_msg.c +++ b/src/modules/topos/tps_msg.c @@ -826,6 +826,9 @@ int tps_request_received(sip_msg_t *msg, int dialog) } lkey = msg->callid->body; + LM_DBG("callid [%.*s] - a_uuid [%.*s] - b_uuid [%.*s]\n", lkey.len, lkey.s, + mtsd.a_uuid.len, ((mtsd.a_uuid.len>0)?mtsd.a_uuid.s:""), + mtsd.b_uuid.len, ((mtsd.b_uuid.len>0)?mtsd.b_uuid.s:"")); tps_storage_lock_get(&lkey); diff --git a/src/modules/topos/tps_storage.c b/src/modules/topos/tps_storage.c index caff16c5ee..2d611402c8 100644 --- a/src/modules/topos/tps_storage.c +++ b/src/modules/topos/tps_storage.c @@ -1149,17 +1149,21 @@ int tps_db_load_branch(sip_msg_t *msg, tps_data_t *md, tps_data_t *sd, if(md->a_uuid.s[0]=='a') { db_keys[nr_keys]=&tt_col_a_uuid; db_vals[nr_keys].val.str_val = TPS_STRZ(md->a_uuid); + nr_keys++; } else if(md->a_uuid.s[0]=='b') { db_keys[nr_keys]=&tt_col_b_uuid; db_vals[nr_keys].val.str_val = TPS_STRZ(md->a_uuid); + nr_keys++; } } else if(md->b_uuid.len>0) { if(md->b_uuid.s[0]=='a') { db_keys[nr_keys]=&tt_col_a_uuid; db_vals[nr_keys].val.str_val = TPS_STRZ(md->b_uuid); + nr_keys++; } else if(md->b_uuid.s[0]=='b') { db_keys[nr_keys]=&tt_col_b_uuid; db_vals[nr_keys].val.str_val = TPS_STRZ(md->b_uuid); + nr_keys++; } } }
3 years, 7 months
1
0
0
0
git:master:1d6736d1: topos: restore checks on uri and sip_params for tps_dlg_message_update()
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 1d6736d16ab3a83b77d6c7be3f9689c7fbfccf28 URL:
https://github.com/kamailio/kamailio/commit/1d6736d16ab3a83b77d6c7be3f9689c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2021-04-26T13:49:42+02:00 topos: restore checks on uri and sip_params for tps_dlg_message_update() - use define for expected min len safety checks --- Modified: src/modules/topos/tps_msg.c --- Diff:
https://github.com/kamailio/kamailio/commit/1d6736d16ab3a83b77d6c7be3f9689c…
Patch:
https://github.com/kamailio/kamailio/commit/1d6736d16ab3a83b77d6c7be3f9689c…
--- diff --git a/src/modules/topos/tps_msg.c b/src/modules/topos/tps_msg.c index cbf8b3c9f3..852a19aaa2 100644 --- a/src/modules/topos/tps_msg.c +++ b/src/modules/topos/tps_msg.c @@ -309,17 +309,18 @@ int tps_dlg_message_update(sip_msg_t *msg, tps_data_t *ptsd, int ctmode) str tuuid = STR_NULL; int ret; +#define TPS_TUUID_MIN_LEN 10 + if(parse_sip_msg_uri(msg)<0) { LM_ERR("failed to parse r-uri\n"); return -1; } - if(msg->parsed_uri.sip_params.len<10) { - LM_DBG("not an expected %s format\n", (ctmode==0)?"user":"param"); - return 1; - } - if (ctmode == 1 || ctmode == 2) { + if(msg->parsed_uri.sip_params.len<TPS_TUUID_MIN_LEN) { + LM_DBG("not an expected param format\n"); + return 1; + } /* find the r-uri parameter */ ret = tps_get_param_value(&msg->parsed_uri.params, &_tps_cparam_name, &tuuid); @@ -332,6 +333,10 @@ int tps_dlg_message_update(sip_msg_t *msg, tps_data_t *ptsd, int ctmode) return 1; } } else { + if(msg->parsed_uri.user.len<TPS_TUUID_MIN_LEN) { + LM_DBG("not an expected user format\n"); + return 1; + } tuuid = msg->parsed_uri.user; }
3 years, 7 months
1
0
0
0
git:master:317ddc9e: topos: check if event field exists for NOTIFY
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 317ddc9efa2f11f0fe3787e9ab462550724954ed URL:
https://github.com/kamailio/kamailio/commit/317ddc9efa2f11f0fe3787e9ab46255…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2021-04-26T13:43:21+02:00 topos: check if event field exists for NOTIFY --- Modified: src/modules/topos/tps_storage.c --- Diff:
https://github.com/kamailio/kamailio/commit/317ddc9efa2f11f0fe3787e9ab46255…
Patch:
https://github.com/kamailio/kamailio/commit/317ddc9efa2f11f0fe3787e9ab46255…
--- diff --git a/src/modules/topos/tps_storage.c b/src/modules/topos/tps_storage.c index 21cb59c517..caff16c5ee 100644 --- a/src/modules/topos/tps_storage.c +++ b/src/modules/topos/tps_storage.c @@ -1110,7 +1110,7 @@ int tps_db_load_branch(sip_msg_t *msg, tps_data_t *md, tps_data_t *sd, if((get_cseq(msg)->method_id == METHOD_SUBSCRIBE) || ((get_cseq(msg)->method_id == METHOD_NOTIFY) - && (msg->event->len > 0))) { + && (msg->event && msg->event->len > 0))) { bInviteDlg = 0; }
3 years, 7 months
1
0
0
0
git:master:94e89887: topos: load associated early dialog transaction using also uuid
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 94e8988769662a5ae68e30847eef133d50ec5431 URL:
https://github.com/kamailio/kamailio/commit/94e8988769662a5ae68e30847eef133…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2021-04-26T13:02:11+02:00 topos: load associated early dialog transaction using also uuid --- Modified: src/modules/topos/tps_storage.c --- Diff:
https://github.com/kamailio/kamailio/commit/94e8988769662a5ae68e30847eef133…
Patch:
https://github.com/kamailio/kamailio/commit/94e8988769662a5ae68e30847eef133…
--- diff --git a/src/modules/topos/tps_storage.c b/src/modules/topos/tps_storage.c index 25275ab272..21cb59c517 100644 --- a/src/modules/topos/tps_storage.c +++ b/src/modules/topos/tps_storage.c @@ -1144,6 +1144,24 @@ int tps_db_load_branch(sip_msg_t *msg, tps_data_t *md, tps_data_t *sd, db_vals[nr_keys].nul = 0; db_vals[nr_keys].val.str_val = bInviteDlg ? sinv : ssub; nr_keys++; + + if(md->a_uuid.len>0) { + if(md->a_uuid.s[0]=='a') { + db_keys[nr_keys]=&tt_col_a_uuid; + db_vals[nr_keys].val.str_val = TPS_STRZ(md->a_uuid); + } else if(md->a_uuid.s[0]=='b') { + db_keys[nr_keys]=&tt_col_b_uuid; + db_vals[nr_keys].val.str_val = TPS_STRZ(md->a_uuid); + } + } else if(md->b_uuid.len>0) { + if(md->b_uuid.s[0]=='a') { + db_keys[nr_keys]=&tt_col_a_uuid; + db_vals[nr_keys].val.str_val = TPS_STRZ(md->b_uuid); + } else if(md->b_uuid.s[0]=='b') { + db_keys[nr_keys]=&tt_col_b_uuid; + db_vals[nr_keys].val.str_val = TPS_STRZ(md->b_uuid); + } + } } if(msg->first_line.type==SIP_REQUEST && md->x_context.len>0) {
3 years, 7 months
1
0
0
0
git:master:7e5c4c30: topos: simplified tps_dlg_message_update()
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 7e5c4c30d2f0bbed2b566d46e5141b6abba315e7 URL:
https://github.com/kamailio/kamailio/commit/7e5c4c30d2f0bbed2b566d46e5141b6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2021-04-26T12:48:37+02:00 topos: simplified tps_dlg_message_update() --- Modified: src/modules/topos/tps_msg.c --- Diff:
https://github.com/kamailio/kamailio/commit/7e5c4c30d2f0bbed2b566d46e5141b6…
Patch:
https://github.com/kamailio/kamailio/commit/7e5c4c30d2f0bbed2b566d46e5141b6…
--- diff --git a/src/modules/topos/tps_msg.c b/src/modules/topos/tps_msg.c index bf5815fa76..cbf8b3c9f3 100644 --- a/src/modules/topos/tps_msg.c +++ b/src/modules/topos/tps_msg.c @@ -306,7 +306,7 @@ int tps_dlg_detect_direction(sip_msg_t *msg, tps_data_t *ptsd, */ int tps_dlg_message_update(sip_msg_t *msg, tps_data_t *ptsd, int ctmode) { - str tmp; + str tuuid = STR_NULL; int ret; if(parse_sip_msg_uri(msg)<0) { @@ -314,14 +314,15 @@ int tps_dlg_message_update(sip_msg_t *msg, tps_data_t *ptsd, int ctmode) return -1; } + if(msg->parsed_uri.sip_params.len<10) { + LM_DBG("not an expected %s format\n", (ctmode==0)?"user":"param"); + return 1; + } + if (ctmode == 1 || ctmode == 2) { - if(msg->parsed_uri.sip_params.len<10) { - LM_DBG("not an expected param format\n"); - return 1; - } - // find parameter, there might be others + /* find the r-uri parameter */ ret = tps_get_param_value(&msg->parsed_uri.params, - &_tps_cparam_name, &tmp); + &_tps_cparam_name, &tuuid); if (ret < 0) { LM_ERR("failed to parse param\n"); return -1; @@ -330,31 +331,20 @@ int tps_dlg_message_update(sip_msg_t *msg, tps_data_t *ptsd, int ctmode) LM_DBG("prefix para not found\n"); return 1; } - if(memcmp(tmp.s, "atpsh-", 6)==0) { - ptsd->a_uuid = tmp; - return 0; - } - if(memcmp(tmp.s, "btpsh-", 6)==0) { - ptsd->a_uuid = tmp; - ptsd->b_uuid = tmp; - return 0; - } - } else { - if(msg->parsed_uri.user.len<10) { - LM_DBG("not an expected user format\n"); - return 1; - } - if(memcmp(msg->parsed_uri.user.s, "atpsh-", 6)==0) { - ptsd->a_uuid = msg->parsed_uri.user; - return 0; - } - if(memcmp(msg->parsed_uri.user.s, "btpsh-", 6)==0) { - ptsd->a_uuid = msg->parsed_uri.user; - ptsd->b_uuid = msg->parsed_uri.user; - return 0; - } + tuuid = msg->parsed_uri.user; + } + + if(memcmp(tuuid.s, "atpsh-", 6)==0) { + ptsd->a_uuid = tuuid; + return 0; + } + if(memcmp(tuuid.s, "btpsh-", 6)==0) { + ptsd->a_uuid = tuuid; + ptsd->b_uuid = tuuid; + return 0; } + LM_DBG("not an expected prefix\n"); return 1; @@ -840,7 +830,6 @@ int tps_request_received(sip_msg_t *msg, int dialog) if(((get_cseq(msg)->method_id) & (METHOD_BYE|METHOD_PRACK|METHOD_UPDATE)) && stsd.b_contact.len <= 0) { /* no B-side contact, look for INVITE transaction record */ - memset(&stsd, 0, sizeof(tps_data_t)); if((get_cseq(msg)->method_id) & (METHOD_UPDATE)) { /* detect direction - via from-tag */ if(tps_dlg_detect_direction(msg, &stsd, &direction) < 0) { @@ -850,6 +839,8 @@ int tps_request_received(sip_msg_t *msg, int dialog) if(tps_storage_link_msg(msg, &mtsd, direction) < 0) { goto error; } + mtsd.direction = direction; + memset(&stsd, 0, sizeof(tps_data_t)); if(tps_storage_load_branch(msg, &mtsd, &stsd, 1) < 0) { goto error; } @@ -859,9 +850,9 @@ int tps_request_received(sip_msg_t *msg, int dialog) if(tps_dlg_detect_direction(msg, &stsd, &direction) < 0) { goto error; } + mtsd.direction = direction; } - mtsd.direction = direction; tps_storage_lock_release(&lkey);
3 years, 7 months
1
0
0
0
← Newer
1
...
10
11
12
13
14
15
16
...
31
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Results per page:
10
25
50
100
200