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
2025
June
May
April
March
February
January
2024
December
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
October 2019
----- 2025 -----
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 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
22 participants
437 discussions
Start a n
N
ew thread
git:5.3:e22bc63d: uac: spelling fix in docs, add missing title section for uac.reg_add
by Henning Westerholt
09 Oct '19
09 Oct '19
Module: kamailio Branch: 5.3 Commit: e22bc63df21a96a2ad8a7e0c6302d4c73bac667c URL:
https://github.com/kamailio/kamailio/commit/e22bc63df21a96a2ad8a7e0c6302d4c…
Author: Henning Westerholt <hw(a)skalatan.de> Committer: Henning Westerholt <hw(a)skalatan.de> Date: 2019-10-09T21:25:03+02:00 uac: spelling fix in docs, add missing title section for uac.reg_add (cherry picked from commit 073907aa1f3b325b121801f06a65e7e7175154f3) --- Modified: src/modules/uac/doc/uac_admin.xml --- Diff:
https://github.com/kamailio/kamailio/commit/e22bc63df21a96a2ad8a7e0c6302d4c…
Patch:
https://github.com/kamailio/kamailio/commit/e22bc63df21a96a2ad8a7e0c6302d4c…
--- diff --git a/src/modules/uac/doc/uac_admin.xml b/src/modules/uac/doc/uac_admin.xml index 1a48b5663e..8ddf26ca0f 100644 --- a/src/modules/uac/doc/uac_admin.xml +++ b/src/modules/uac/doc/uac_admin.xml @@ -1279,6 +1279,9 @@ event_route[uac:reply] { </section> <section id="uac.r.uac.reg_add"> + <title> + <function moreinfo="none">uac.reg_add</function> + </title> <para> Add a new UAC remote registration record. If one with the same unique id is found, it is deleted. @@ -1356,7 +1359,7 @@ event_route[uac:reply] { </itemizedlist> <itemizedlist> <listitem><para> - <emphasis>realm</emphasis> - remote relam, e.g.,: + <emphasis>realm</emphasis> - remote realm, e.g.,:
sipprovider.com
</para></listitem> </itemizedlist>
1
0
0
0
git:5.3:841182e9: uri_db: spelling fix in variable name
by Henning Westerholt
09 Oct '19
09 Oct '19
Module: kamailio Branch: 5.3 Commit: 841182e9ee55dca5b932a7716d14b3350ab3671f URL:
https://github.com/kamailio/kamailio/commit/841182e9ee55dca5b932a7716d14b33…
Author: Henning Westerholt <hw(a)skalatan.de> Committer: Henning Westerholt <hw(a)skalatan.de> Date: 2019-10-09T21:24:46+02:00 uri_db: spelling fix in variable name (cherry picked from commit 23b60ed9fbf9396bd531c76f57c133d5850c0764) --- Modified: src/modules/uri_db/checks.h --- Diff:
https://github.com/kamailio/kamailio/commit/841182e9ee55dca5b932a7716d14b33…
Patch:
https://github.com/kamailio/kamailio/commit/841182e9ee55dca5b932a7716d14b33…
--- diff --git a/src/modules/uri_db/checks.h b/src/modules/uri_db/checks.h index 959dbbbfb3..5eb504a1a0 100644 --- a/src/modules/uri_db/checks.h +++ b/src/modules/uri_db/checks.h @@ -63,7 +63,7 @@ int uridb_db_ver(const str* db_url); int ki_check_to(struct sip_msg* _m); int ki_check_from(struct sip_msg* _m); int ki_check_uri(struct sip_msg* msg, str *suri); -int ki_check_uri_realm(struct sip_msg* msg, str *suri, str *susername, str *srelam); +int ki_check_uri_realm(struct sip_msg* msg, str *suri, str *susername, str *srealm); int ki_does_uri_exist(struct sip_msg* _msg); #endif /* CHECKS_H */
1
0
0
0
git:5.2:9617f51a: uac: spelling fix in uac docs
by Henning Westerholt
09 Oct '19
09 Oct '19
Module: kamailio Branch: 5.2 Commit: 9617f51a19dc715932ddbb58e72fb264ae90b747 URL:
https://github.com/kamailio/kamailio/commit/9617f51a19dc715932ddbb58e72fb26…
Author: Henning Westerholt <hw(a)skalatan.de> Committer: Henning Westerholt <hw(a)skalatan.de> Date: 2019-10-09T21:24:00+02:00 uac: spelling fix in uac docs (cherry picked from commit 167efd5eea2e9a918ecda4249fa5574cfba4e310) --- Modified: src/modules/uac/doc/uac_admin.xml --- Diff:
https://github.com/kamailio/kamailio/commit/9617f51a19dc715932ddbb58e72fb26…
Patch:
https://github.com/kamailio/kamailio/commit/9617f51a19dc715932ddbb58e72fb26…
--- diff --git a/src/modules/uac/doc/uac_admin.xml b/src/modules/uac/doc/uac_admin.xml index 1eabfffab7..5b16cf6eb9 100644 --- a/src/modules/uac/doc/uac_admin.xml +++ b/src/modules/uac/doc/uac_admin.xml @@ -1261,7 +1261,7 @@ event_route[uac:reply] { </itemizedlist> <itemizedlist> <listitem><para> - <emphasis>realm</emphasis> - remote relam, e.g.,: + <emphasis>realm</emphasis> - remote realm, e.g.,:
sipprovider.com
</para></listitem> </itemizedlist>
1
0
0
0
git:5.1:167efd5e: uac: spelling fix in uac docs
by Henning Westerholt
09 Oct '19
09 Oct '19
Module: kamailio Branch: 5.1 Commit: 167efd5eea2e9a918ecda4249fa5574cfba4e310 URL:
https://github.com/kamailio/kamailio/commit/167efd5eea2e9a918ecda4249fa5574…
Author: Henning Westerholt <hw(a)skalatan.de> Committer: Henning Westerholt <hw(a)skalatan.de> Date: 2019-10-09T21:22:38+02:00 uac: spelling fix in uac docs --- Modified: src/modules/uac/doc/uac_admin.xml --- Diff:
https://github.com/kamailio/kamailio/commit/167efd5eea2e9a918ecda4249fa5574…
Patch:
https://github.com/kamailio/kamailio/commit/167efd5eea2e9a918ecda4249fa5574…
--- diff --git a/src/modules/uac/doc/uac_admin.xml b/src/modules/uac/doc/uac_admin.xml index d96f49a90f..b996229305 100644 --- a/src/modules/uac/doc/uac_admin.xml +++ b/src/modules/uac/doc/uac_admin.xml @@ -1152,7 +1152,7 @@ event_route[uac:reply] { </itemizedlist> <itemizedlist> <listitem><para> - <emphasis>realm</emphasis> - remote relam, e.g.,: + <emphasis>realm</emphasis> - remote realm, e.g.,:
sipprovider.com
</para></listitem> </itemizedlist>
1
0
0
0
git:master:073907aa: uac: spelling fix in docs, add missing title section for uac.reg_add
by Henning Westerholt
09 Oct '19
09 Oct '19
Module: kamailio Branch: master Commit: 073907aa1f3b325b121801f06a65e7e7175154f3 URL:
https://github.com/kamailio/kamailio/commit/073907aa1f3b325b121801f06a65e7e…
Author: Henning Westerholt <hw(a)skalatan.de> Committer: Henning Westerholt <hw(a)skalatan.de> Date: 2019-10-09T21:19:34+02:00 uac: spelling fix in docs, add missing title section for uac.reg_add --- Modified: src/modules/uac/doc/uac_admin.xml --- Diff:
https://github.com/kamailio/kamailio/commit/073907aa1f3b325b121801f06a65e7e…
Patch:
https://github.com/kamailio/kamailio/commit/073907aa1f3b325b121801f06a65e7e…
--- diff --git a/src/modules/uac/doc/uac_admin.xml b/src/modules/uac/doc/uac_admin.xml index 1a48b5663e..8ddf26ca0f 100644 --- a/src/modules/uac/doc/uac_admin.xml +++ b/src/modules/uac/doc/uac_admin.xml @@ -1279,6 +1279,9 @@ event_route[uac:reply] { </section> <section id="uac.r.uac.reg_add"> + <title> + <function moreinfo="none">uac.reg_add</function> + </title> <para> Add a new UAC remote registration record. If one with the same unique id is found, it is deleted. @@ -1356,7 +1359,7 @@ event_route[uac:reply] { </itemizedlist> <itemizedlist> <listitem><para> - <emphasis>realm</emphasis> - remote relam, e.g.,: + <emphasis>realm</emphasis> - remote realm, e.g.,:
sipprovider.com
</para></listitem> </itemizedlist>
1
0
0
0
git:master:23b60ed9: uri_db: spelling fix in variable name
by Henning Westerholt
09 Oct '19
09 Oct '19
Module: kamailio Branch: master Commit: 23b60ed9fbf9396bd531c76f57c133d5850c0764 URL:
https://github.com/kamailio/kamailio/commit/23b60ed9fbf9396bd531c76f57c133d…
Author: Henning Westerholt <hw(a)skalatan.de> Committer: Henning Westerholt <hw(a)skalatan.de> Date: 2019-10-09T21:19:34+02:00 uri_db: spelling fix in variable name --- Modified: src/modules/uri_db/checks.h --- Diff:
https://github.com/kamailio/kamailio/commit/23b60ed9fbf9396bd531c76f57c133d…
Patch:
https://github.com/kamailio/kamailio/commit/23b60ed9fbf9396bd531c76f57c133d…
--- diff --git a/src/modules/uri_db/checks.h b/src/modules/uri_db/checks.h index 959dbbbfb3..5eb504a1a0 100644 --- a/src/modules/uri_db/checks.h +++ b/src/modules/uri_db/checks.h @@ -63,7 +63,7 @@ int uridb_db_ver(const str* db_url); int ki_check_to(struct sip_msg* _m); int ki_check_from(struct sip_msg* _m); int ki_check_uri(struct sip_msg* msg, str *suri); -int ki_check_uri_realm(struct sip_msg* msg, str *suri, str *susername, str *srelam); +int ki_check_uri_realm(struct sip_msg* msg, str *suri, str *susername, str *srealm); int ki_does_uri_exist(struct sip_msg* _msg); #endif /* CHECKS_H */
1
0
0
0
git:5.2:f36d6562: tm: skip resuming suspended transactions put on wait
by Daniel-Constantin Mierla
09 Oct '19
09 Oct '19
Module: kamailio Branch: 5.2 Commit: f36d6562e54acc2b2f72c04a628b8e85f36bc9dd URL:
https://github.com/kamailio/kamailio/commit/f36d6562e54acc2b2f72c04a628b8e8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2019-10-09T19:37:58+02:00 tm: skip resuming suspended transactions put on wait - transaction is expired in that moment, pending its destroy process - GH #2055 (cherry picked from commit 52afc7b70f8e4abfb347c84872ab7daa202a6a24) (cherry picked from commit c44bd17c79bc0119ae201b826d84b9514700eda9) --- Modified: src/modules/tm/t_lookup.c Modified: src/modules/tm/t_lookup.h Modified: src/modules/tm/t_suspend.c --- Diff:
https://github.com/kamailio/kamailio/commit/f36d6562e54acc2b2f72c04a628b8e8…
Patch:
https://github.com/kamailio/kamailio/commit/f36d6562e54acc2b2f72c04a628b8e8…
--- diff --git a/src/modules/tm/t_lookup.c b/src/modules/tm/t_lookup.c index 45cbf0b4ed..e2baadb2ae 100644 --- a/src/modules/tm/t_lookup.c +++ b/src/modules/tm/t_lookup.c @@ -1586,11 +1586,12 @@ int t_get_canceled_ident(struct sip_msg* msg, unsigned int* hash_index, * 0). * @param hash_index - searched transaction hash_index (part of the ident). * @param label - searched transaction label (part of the ident). + * @param filter - if 1, skip transaction put on-wait (terminated state). * @return -1 on error/not found, 1 on success (found) * Side-effects: sets T and T_branch (T_branch always to T_BR_UNDEFINED). */ -int t_lookup_ident(struct cell ** trans, unsigned int hash_index, - unsigned int label) +int t_lookup_ident_filter(struct cell ** trans, unsigned int hash_index, + unsigned int label, int filter) { struct cell* p_cell; struct entry* hash_bucket; @@ -1608,9 +1609,19 @@ int t_lookup_ident(struct cell ** trans, unsigned int hash_index, #endif hash_bucket=&(get_tm_table()->entries[hash_index]); /* all the transactions from the entry are compared */ - clist_foreach(hash_bucket, p_cell, next_c){ + clist_foreach(hash_bucket, p_cell, next_c) { prefetch_loc_r(p_cell->next_c, 1); - if(p_cell->label == label){ + if(p_cell->label == label) { + if(filter==1) { + if(t_on_wait(p_cell)) { + /* transaction in terminated state */ + UNLOCK_HASH(hash_index); + set_t(0, T_BR_UNDEFINED); + *trans=NULL; + LM_DBG("transaction in terminated phase - skipping\n"); + return -1; + } + } REF_UNSAFE(p_cell); UNLOCK_HASH(hash_index); set_t(p_cell, T_BR_UNDEFINED); @@ -1622,14 +1633,27 @@ int t_lookup_ident(struct cell ** trans, unsigned int hash_index, UNLOCK_HASH(hash_index); set_t(0, T_BR_UNDEFINED); - *trans=p_cell; + *trans=NULL; LM_DBG("transaction not found\n"); return -1; } - +/** lookup a transaction based on its identifier (hash_index:label). + * @param trans - double pointer to cell structure, that will be filled + * with the result (a pointer to an existing transaction or + * 0). + * @param hash_index - searched transaction hash_index (part of the ident). + * @param label - searched transaction label (part of the ident). + * @return -1 on error/not found, 1 on success (found) + * Side-effects: sets T and T_branch (T_branch always to T_BR_UNDEFINED). + */ +int t_lookup_ident(struct cell ** trans, unsigned int hash_index, + unsigned int label) +{ + return t_lookup_ident_filter(trans, hash_index, label, 0); +} /** check if a transaction is local or not. * Check if the transaction corresponding to the current message diff --git a/src/modules/tm/t_lookup.h b/src/modules/tm/t_lookup.h index 2180311f69..d01528518b 100644 --- a/src/modules/tm/t_lookup.h +++ b/src/modules/tm/t_lookup.h @@ -94,6 +94,8 @@ typedef int (*tset_fr_f)(struct sip_msg*, unsigned int, unsigned int); int t_is_local(struct sip_msg*); int t_get_trans_ident(struct sip_msg* p_msg, unsigned int* hash_index, unsigned int* label); int t_lookup_ident(struct cell** trans, unsigned int hash_index, unsigned int label); +int t_lookup_ident_filter(struct cell ** trans, unsigned int hash_index, + unsigned int label, int filter); /* lookup a transaction by callid and cseq */ int t_lookup_callid(struct cell** trans, str callid, str cseq); diff --git a/src/modules/tm/t_suspend.c b/src/modules/tm/t_suspend.c index c2c0773b3f..3f129303fe 100644 --- a/src/modules/tm/t_suspend.c +++ b/src/modules/tm/t_suspend.c @@ -187,9 +187,9 @@ int t_continue_helper(unsigned int hash_index, unsigned int label, backup_T = get_t(); backup_T_branch = get_t_branch(); - if (t_lookup_ident(&t, hash_index, label) < 0) { + if (t_lookup_ident_filter(&t, hash_index, label, 1) < 0) { set_t(backup_T, backup_T_branch); - LM_ERR("transaction not found\n"); + LM_ERR("active transaction not found\n"); return -1; }
1
0
0
0
git:5.2:9230834a: avp: free allocated variable in case of error
by Daniel-Constantin Mierla
09 Oct '19
09 Oct '19
Module: kamailio Branch: 5.2 Commit: 9230834aec2de5a078c0a4a81f33bd5483729898 URL:
https://github.com/kamailio/kamailio/commit/9230834aec2de5a078c0a4a81f33bd5…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2019-10-09T19:37:42+02:00 avp: free allocated variable in case of error (cherry picked from commit 5a18155c0fe661e7488f75afa7b0ea7638932943) (cherry picked from commit fc9ca0fcdff7ebc5399374038bc6a0aa02207229) --- Modified: src/modules/avp/avp.c --- Diff:
https://github.com/kamailio/kamailio/commit/9230834aec2de5a078c0a4a81f33bd5…
Patch:
https://github.com/kamailio/kamailio/commit/9230834aec2de5a078c0a4a81f33bd5…
--- diff --git a/src/modules/avp/avp.c b/src/modules/avp/avp.c index f597086d92..f11d56baeb 100644 --- a/src/modules/avp/avp.c +++ b/src/modules/avp/avp.c @@ -1380,7 +1380,7 @@ static int attr_hdr_body2attrs2(struct sip_msg* msg, char* header_, char* prefix static int attr_hdr_body2attrs_fixup(void **param, int param_no) { char *c, *params; - hdr_name_t *h; + hdr_name_t *h = NULL; int n; str *s; if(param_no == 1) { @@ -1427,6 +1427,7 @@ 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); + pkg_free(h); return E_CFG; } params++; @@ -1434,6 +1435,7 @@ static int attr_hdr_body2attrs_fixup(void **param, int param_no) if(!h->val_types) { LOG(L_ERR, "attr_hdr_body2attrs_fixup: no field param modifier " "specified\n"); + pkg_free(h); return E_CFG; } } else {
1
0
0
0
git:5.3:c44bd17c: tm: skip resuming suspended transactions put on wait
by Daniel-Constantin Mierla
09 Oct '19
09 Oct '19
Module: kamailio Branch: 5.3 Commit: c44bd17c79bc0119ae201b826d84b9514700eda9 URL:
https://github.com/kamailio/kamailio/commit/c44bd17c79bc0119ae201b826d84b95…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2019-10-09T18:48:40+02:00 tm: skip resuming suspended transactions put on wait - transaction is expired in that moment, pending its destroy process - GH #2055 (cherry picked from commit 52afc7b70f8e4abfb347c84872ab7daa202a6a24) --- Modified: src/modules/tm/t_lookup.c Modified: src/modules/tm/t_lookup.h Modified: src/modules/tm/t_suspend.c --- Diff:
https://github.com/kamailio/kamailio/commit/c44bd17c79bc0119ae201b826d84b95…
Patch:
https://github.com/kamailio/kamailio/commit/c44bd17c79bc0119ae201b826d84b95…
--- diff --git a/src/modules/tm/t_lookup.c b/src/modules/tm/t_lookup.c index b1182a9e71..510599f742 100644 --- a/src/modules/tm/t_lookup.c +++ b/src/modules/tm/t_lookup.c @@ -1568,11 +1568,12 @@ int t_get_canceled_ident(struct sip_msg* msg, unsigned int* hash_index, * 0). * @param hash_index - searched transaction hash_index (part of the ident). * @param label - searched transaction label (part of the ident). + * @param filter - if 1, skip transaction put on-wait (terminated state). * @return -1 on error/not found, 1 on success (found) * Side-effects: sets T and T_branch (T_branch always to T_BR_UNDEFINED). */ -int t_lookup_ident(struct cell ** trans, unsigned int hash_index, - unsigned int label) +int t_lookup_ident_filter(struct cell ** trans, unsigned int hash_index, + unsigned int label, int filter) { struct cell* p_cell; struct entry* hash_bucket; @@ -1590,9 +1591,19 @@ int t_lookup_ident(struct cell ** trans, unsigned int hash_index, #endif hash_bucket=&(get_tm_table()->entries[hash_index]); /* all the transactions from the entry are compared */ - clist_foreach(hash_bucket, p_cell, next_c){ + clist_foreach(hash_bucket, p_cell, next_c) { prefetch_loc_r(p_cell->next_c, 1); - if(p_cell->label == label){ + if(p_cell->label == label) { + if(filter==1) { + if(t_on_wait(p_cell)) { + /* transaction in terminated state */ + UNLOCK_HASH(hash_index); + set_t(0, T_BR_UNDEFINED); + *trans=NULL; + LM_DBG("transaction in terminated phase - skipping\n"); + return -1; + } + } REF_UNSAFE(p_cell); UNLOCK_HASH(hash_index); set_t(p_cell, T_BR_UNDEFINED); @@ -1604,14 +1615,27 @@ int t_lookup_ident(struct cell ** trans, unsigned int hash_index, UNLOCK_HASH(hash_index); set_t(0, T_BR_UNDEFINED); - *trans=p_cell; + *trans=NULL; LM_DBG("transaction not found\n"); return -1; } - +/** lookup a transaction based on its identifier (hash_index:label). + * @param trans - double pointer to cell structure, that will be filled + * with the result (a pointer to an existing transaction or + * 0). + * @param hash_index - searched transaction hash_index (part of the ident). + * @param label - searched transaction label (part of the ident). + * @return -1 on error/not found, 1 on success (found) + * Side-effects: sets T and T_branch (T_branch always to T_BR_UNDEFINED). + */ +int t_lookup_ident(struct cell ** trans, unsigned int hash_index, + unsigned int label) +{ + return t_lookup_ident_filter(trans, hash_index, label, 0); +} /** check if a transaction is local or not. * Check if the transaction corresponding to the current message diff --git a/src/modules/tm/t_lookup.h b/src/modules/tm/t_lookup.h index 347d088d48..2a5e67d3de 100644 --- a/src/modules/tm/t_lookup.h +++ b/src/modules/tm/t_lookup.h @@ -92,6 +92,8 @@ typedef int (*tset_fr_f)(struct sip_msg*, unsigned int, unsigned int); int t_is_local(struct sip_msg*); int t_get_trans_ident(struct sip_msg* p_msg, unsigned int* hash_index, unsigned int* label); int t_lookup_ident(struct cell** trans, unsigned int hash_index, unsigned int label); +int t_lookup_ident_filter(struct cell ** trans, unsigned int hash_index, + unsigned int label, int filter); /* lookup a transaction by callid and cseq */ int t_lookup_callid(struct cell** trans, str callid, str cseq); diff --git a/src/modules/tm/t_suspend.c b/src/modules/tm/t_suspend.c index be7b0a6842..949340f1ce 100644 --- a/src/modules/tm/t_suspend.c +++ b/src/modules/tm/t_suspend.c @@ -187,9 +187,9 @@ int t_continue_helper(unsigned int hash_index, unsigned int label, backup_T = get_t(); backup_T_branch = get_t_branch(); - if (t_lookup_ident(&t, hash_index, label) < 0) { + if (t_lookup_ident_filter(&t, hash_index, label, 1) < 0) { set_t(backup_T, backup_T_branch); - LM_ERR("transaction not found\n"); + LM_ERR("active transaction not found\n"); return -1; }
1
0
0
0
git:5.3:fc9ca0fc: avp: free allocated variable in case of error
by Daniel-Constantin Mierla
09 Oct '19
09 Oct '19
Module: kamailio Branch: 5.3 Commit: fc9ca0fcdff7ebc5399374038bc6a0aa02207229 URL:
https://github.com/kamailio/kamailio/commit/fc9ca0fcdff7ebc5399374038bc6a0a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2019-10-09T18:48:27+02:00 avp: free allocated variable in case of error (cherry picked from commit 5a18155c0fe661e7488f75afa7b0ea7638932943) --- Modified: src/modules/avp/avp.c --- Diff:
https://github.com/kamailio/kamailio/commit/fc9ca0fcdff7ebc5399374038bc6a0a…
Patch:
https://github.com/kamailio/kamailio/commit/fc9ca0fcdff7ebc5399374038bc6a0a…
--- diff --git a/src/modules/avp/avp.c b/src/modules/avp/avp.c index f597086d92..f11d56baeb 100644 --- a/src/modules/avp/avp.c +++ b/src/modules/avp/avp.c @@ -1380,7 +1380,7 @@ static int attr_hdr_body2attrs2(struct sip_msg* msg, char* header_, char* prefix static int attr_hdr_body2attrs_fixup(void **param, int param_no) { char *c, *params; - hdr_name_t *h; + hdr_name_t *h = NULL; int n; str *s; if(param_no == 1) { @@ -1427,6 +1427,7 @@ 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); + pkg_free(h); return E_CFG; } params++; @@ -1434,6 +1435,7 @@ static int attr_hdr_body2attrs_fixup(void **param, int param_no) if(!h->val_types) { LOG(L_ERR, "attr_hdr_body2attrs_fixup: no field param modifier " "specified\n"); + pkg_free(h); return E_CFG; } } else {
1
0
0
0
← Newer
1
...
25
26
27
28
29
30
31
...
44
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
32
33
34
35
36
37
38
39
40
41
42
43
44
Results per page:
10
25
50
100
200