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 2014
----- 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
26 participants
304 discussions
Start a n
N
ew thread
git:master: core: proper destroy of tcp connection at shutdown
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: b3d312bc3795f394e5907ac54bb59560e829e38b URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b3d312b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 21:39:07 2014 +0200 core: proper destroy of tcp connection at shutdown - don't access connection fields after freeing structure --- tcp_main.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tcp_main.c b/tcp_main.c index c0320dd..701f90f 100644 --- a/tcp_main.c +++ b/tcp_main.c @@ -4517,9 +4517,12 @@ static inline void tcpconn_destroy_all(void) #ifdef USE_TLS if (fd>0 && (c->type==PROTO_TLS || c->type==PROTO_WSS)) tls_close(c, fd); + if (unlikely(c->type==PROTO_TLS || c->type==PROTO_WSS)) + (*tls_connections_no)--; #endif - _tcpconn_rm(c); + (*tcp_connections_no)--; c->flags &= ~F_CONN_HASHED; + _tcpconn_rm(c); if (fd>0) { #ifdef TCP_FD_CACHE if (likely(cfg_get(tcp, tcp_cfg, fd_cache))) @@ -4527,9 +4530,6 @@ static inline void tcpconn_destroy_all(void) #endif /* TCP_FD_CACHE */ tcp_safe_close(fd); } - (*tcp_connections_no)--; - if (unlikely(c->type==PROTO_TLS || c->type==PROTO_WSS)) - (*tls_connections_no)--; c=next; } }
10 years, 7 months
1
0
0
0
git:master: xlog: clean exit at startup in case on error looking up facility
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: 9f8f66c44f5d44f945bba3b63160967a19044b8b URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9f8f66c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 21:40:15 2014 +0200 xlog: clean exit at startup in case on error looking up facility --- modules/xlog/xlog.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/modules/xlog/xlog.c b/modules/xlog/xlog.c index 8a9b8c2..968e99d 100644 --- a/modules/xlog/xlog.c +++ b/modules/xlog/xlog.c @@ -448,6 +448,7 @@ static int xlog3_fixup_helper(void** param, int param_no) *facility = str2facility(s.s); if (*facility == -1) { LM_ERR("invalid syslog facility %s\n", s.s); + pkg_free(facility); return E_UNSPEC; }
10 years, 7 months
1
0
0
0
git:master: modules/sdpops: added sdp_transport(pv) function
by Juha Heinanen
Module: sip-router Branch: master Commit: 5ce86dca571fab39f96855bc63191d9abe5914e0 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5ce86dc…
Author: Juha Heinanen <jh(a)tutpro.com> Committer: Juha Heinanen <jh(a)tutpro.com> Date: Mon Apr 21 19:24:30 2014 +0300 modules/sdpops: added sdp_transport(pv) function --- modules/sdpops/README | 101 ++++++++++++++++++++-------------- modules/sdpops/doc/sdpops_admin.xml | 22 ++++++++ modules/sdpops/sdpops_mod.c | 83 ++++++++++++++++++++++++++++ 3 files changed, 164 insertions(+), 42 deletions(-) Diff:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=5ce…
10 years, 7 months
1
0
0
0
New commits on branch master
by Daniel-Constantin Mierla
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0bda1dc…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 17:57:09 2014 +0200 core: safety check accessing variables in dbg message during fixup operation URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=511de7f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 17:56:01 2014 +0200 core: link regex before replacement field allocation can fail - regex will be freed properly if there was an error for replacement URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3257da4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 17:54:26 2014 +0200 core: check if proto is not null before setting it - coherent checking across no_naptr_srv_sip_resolvehost() URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=256b1e1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 17:52:53 2014 +0200 core: safety check for freeing either pkg or shm values for var, when applicable - just an improvement to avoid doing both operations by mistake URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2abbeb8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 17:52:07 2014 +0200 core: safety checks for pointer in dbg message printed inside dns cache URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b1106fb…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 17:50:53 2014 +0200 core: free allocated memory in case of failing to get more for modparams - keep shutdown at startup error clean URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6f47c9e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 17:50:09 2014 +0200 core: safety check when declaring a cfg structure with empty content URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3c062c1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 17:48:16 2014 +0200 core: free line_buf in case of error building via - free buf in a very unlikely error converting src_ip to str in static buffer - coherent checking of msg pointer in the function URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=69d43fb…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 17:46:36 2014 +0200 srutils/tmrec: reset pointer after free to avoid double deallocation URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6a82b61…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 17:45:52 2014 +0200 db_text: fixed access after free and proper size for allocated memory URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=af81862…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 17:44:34 2014 +0200 call_control: replaced dynamic str* a local variable - it was freed afterwards and could leak in case of error hanling URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=98bb8c7…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 17:43:47 2014 +0200 avpops: initialize local variable to avoid warning on db ops function URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=33d001a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 17:43:00 2014 +0200 acc: avoid memleak at startup when failing to initialize a custome accounting engine URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=74ae88f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 17:42:04 2014 +0200 tls: avoid leaking duplicated file name on re-iteration - reset file name pointer to avoid double free in case of error handling URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=53642d6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 17:40:27 2014 +0200 mem: remove trailing ; to allow using as single instruction in conditinal blocks - this is for system malloc with extra debug for private memory URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=89c48cd…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 17:39:50 2014 +0200 benchmark: avoid memory leaks when dealing with invalid mi commands URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d2f71f3…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 17:38:19 2014 +0200 auth_diameter: avoid double free in case of error and don't access freed pointer URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f65bf2c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 17:36:01 2014 +0200 db_mysql: reset prev_token to avoid double free in case of url parse error - when db api v2 is used (ser modules) URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e114105…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 17:35:39 2014 +0200 db_mysql: remove line accessing freed result URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=17cc9b0…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 17:34:24 2014 +0200 debugger: check for define of PKG_MEMORY to execute pkg checks - allow compilation with system malloc for private memory URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ecfe8a9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 17:33:33 2014 +0200 rtpengine: chef for SHM_MEM define for kamailio embedded mode - allow compilation with system malloc for private memory URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2f01858…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 17:30:40 2014 +0200 tm: release re for t_check_status(pv) - the canse when parameter is a variable and it contains a bad regex URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=387c369…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 17:29:15 2014 +0200 tm: fixed typo in previous commit related to name of struct contact variable URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d8e242c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 14:08:10 2014 +0200 mem: DBG_SYS_MALLOC can be set to get verbose mem ops with system allocator - PKG_MEMORY has to be undefined in Makefile.defs
10 years, 7 months
1
0
0
0
git:master: modules/tmx: fixed typo in $T_branch README listing
by Juha Heinanen
Module: sip-router Branch: master Commit: a55e0f0fd7cf028c3263bcce30ec808ff08568da URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a55e0f0…
Author: Juha Heinanen <jh(a)tutpro.com> Committer: Juha Heinanen <jh(a)tutpro.com> Date: Mon Apr 21 18:35:30 2014 +0300 modules/tmx: fixed typo in $T_branch README listing --- modules/tmx/README | 2 +- modules/tmx/doc/tmx_admin.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/tmx/README b/modules/tmx/README index f78516b..eaaa718 100644 --- a/modules/tmx/README +++ b/modules/tmx/README @@ -353,7 +353,7 @@ event_route [tm:branch-failure:contact] { * $T_req(pv) * $T_rpl(pv) * $T_reply_ruid - * $T_branch(pv) + * $T_branch(name) Exported pseudo-variables are documented at
http://www.kamailio.org/wiki/
. diff --git a/modules/tmx/doc/tmx_admin.xml b/modules/tmx/doc/tmx_admin.xml index 8bae5ea..e4ee84a 100644 --- a/modules/tmx/doc/tmx_admin.xml +++ b/modules/tmx/doc/tmx_admin.xml @@ -389,7 +389,7 @@ event_route [tm:branch-failure:contact] { <emphasis>$T_reply_ruid</emphasis> </para></listitem> <listitem><para> - <emphasis>$T_branch(pv)</emphasis> + <emphasis>$T_branch(name)</emphasis> </para></listitem> </itemizedlist> <para>
10 years, 7 months
1
0
0
0
git:master: modules/tmx: replaced $T_reply_flags with $T_branch(flags)
by Juha Heinanen
Module: sip-router Branch: master Commit: 9708bcfbb49586661aa96b34bd8c317a5dbd2006 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9708bcf…
Author: Juha Heinanen <jh(a)tutpro.com> Committer: Juha Heinanen <jh(a)tutpro.com> Date: Mon Apr 21 18:31:30 2014 +0300 modules/tmx: replaced $T_reply_flags with $T_branch(flags) --- modules/tmx/README | 1 + modules/tmx/doc/tmx_admin.xml | 3 ++ modules/tmx/t_var.c | 58 ++++++++++++++++++++++++++++++++++++++++- modules/tmx/t_var.h | 4 +- modules/tmx/tmx_mod.c | 5 +-- 5 files changed, 65 insertions(+), 6 deletions(-) diff --git a/modules/tmx/README b/modules/tmx/README index c317ff5..f78516b 100644 --- a/modules/tmx/README +++ b/modules/tmx/README @@ -353,6 +353,7 @@ event_route [tm:branch-failure:contact] { * $T_req(pv) * $T_rpl(pv) * $T_reply_ruid + * $T_branch(pv) Exported pseudo-variables are documented at
http://www.kamailio.org/wiki/
. diff --git a/modules/tmx/doc/tmx_admin.xml b/modules/tmx/doc/tmx_admin.xml index 2496e64..8bae5ea 100644 --- a/modules/tmx/doc/tmx_admin.xml +++ b/modules/tmx/doc/tmx_admin.xml @@ -388,6 +388,9 @@ event_route [tm:branch-failure:contact] { <listitem><para> <emphasis>$T_reply_ruid</emphasis> </para></listitem> + <listitem><para> + <emphasis>$T_branch(pv)</emphasis> + </para></listitem> </itemizedlist> <para> Exported pseudo-variables are documented at &kamwikilink;. diff --git a/modules/tmx/t_var.c b/modules/tmx/t_var.c index 4d38d6b..6f7d346 100644 --- a/modules/tmx/t_var.c +++ b/modules/tmx/t_var.c @@ -322,6 +322,20 @@ int pv_get_t_var_rpl(struct sip_msg *msg, pv_param_t *param, return pv_get_spec_value(&_pv_trpl.msg, pv, res); } +int pv_get_t_var_branch(struct sip_msg *msg, pv_param_t *param, + pv_value_t *res) +{ + pv_spec_t *pv=NULL; + + if(pv_t_update_rpl(msg)) + return pv_get_null(msg, param, res); + + pv = (pv_spec_t*)param->pvn.u.dname; + if(pv==NULL || pv_alter_context(pv)) + return pv_get_null(msg, param, res); + + return pv_get_spec_value(&_pv_trpl.msg, pv, res); +} int pv_get_t_var_inv(struct sip_msg *msg, pv_param_t *param, pv_value_t *res) @@ -616,6 +630,11 @@ int pv_parse_t_name(pv_spec_p sp, str *in) switch(in->len) { + case 5: + if(strncmp(in->s, "flags", 5) == 0) + sp->pvp.pvn.u.isname.name.n = 5; + else goto error; + break; case 8: if(strncmp(in->s, "id_label", 8)==0) sp->pvp.pvn.u.isname.name.n = 0; @@ -644,7 +663,7 @@ int pv_parse_t_name(pv_spec_p sp, str *in) return 0; error: - LM_ERR("unknown PV time name %.*s\n", in->len, in->s); + LM_ERR("unknown PV name %.*s\n", in->len, in->s); return -1; } @@ -687,3 +706,40 @@ int pv_get_t(struct sip_msg *msg, pv_param_t *param, return pv_get_uintval(msg, param, res, t->label); } } + +int pv_get_t_branch(struct sip_msg *msg, pv_param_t *param, + pv_value_t *res) +{ + tm_cell_t *t; + int branch; + + if ((msg == NULL) || (param == NULL)) return -1; + + t = _tmx_tmb.t_gett(); + if ((t == NULL) || (t == T_UNDEFINED)) { + /* no T */ + return pv_get_null(msg, param, res); + } + + switch(param->pvn.u.isname.name.n) { + case 5: + switch (get_route_type()) { + case FAILURE_ROUTE: + case BRANCH_FAILURE_ROUTE: + /* use the reason of the winning reply */ + if ((branch=_tmx_tmb.t_get_picked_branch()) < 0) { + LM_CRIT("no picked branch (%d) for a final response" + " in MODE_ONFAILURE\n", branch); + return -1; + } + res->ri = t->uac[branch].branch_flags; + res->flags = PV_VAL_INT; + LM_INFO("branch flags is [%u]\n", res->ri); + break; + default: + LM_ERR("unsupported route_type %d\n", get_route_type()); + return -1; + } + } + return 0; +} diff --git a/modules/tmx/t_var.h b/modules/tmx/t_var.h index 3fedb60..d2d8678 100644 --- a/modules/tmx/t_var.h +++ b/modules/tmx/t_var.h @@ -40,8 +40,8 @@ int pv_get_tm_branch_idx(struct sip_msg *msg, pv_param_t *param, pv_value_t *res); int pv_get_tm_reply_ruid(struct sip_msg *msg, pv_param_t *param, pv_value_t *res); -int pv_get_tm_reply_flags(struct sip_msg *msg, pv_param_t *param, - pv_value_t *res); +int pv_get_t_branch(struct sip_msg *msg, pv_param_t *param, + pv_value_t *res); int pv_get_tm_reply_code(struct sip_msg *msg, pv_param_t *param, pv_value_t *res); int pv_get_tm_reply_reason(struct sip_msg *msg, pv_param_t *param, diff --git a/modules/tmx/tmx_mod.c b/modules/tmx/tmx_mod.c index affc53c..dc8b42c 100644 --- a/modules/tmx/tmx_mod.c +++ b/modules/tmx/tmx_mod.c @@ -124,9 +124,6 @@ static pv_export_t mod_pvs[] = { { {"T_reply_ruid", sizeof("T_reply_ruid")-1}, PVT_OTHER, pv_get_tm_reply_ruid, 0, 0, 0, 0, 0 }, - { {"T_reply_flags", sizeof("T_reply_flags")-1}, PVT_OTHER, - pv_get_tm_reply_flags, 0, - 0, 0, 0, 0 }, { {"T_reply_code", sizeof("T_reply_code")-1}, PVT_OTHER, pv_get_tm_reply_code, 0, 0, 0, 0, 0 }, @@ -144,6 +141,8 @@ static pv_export_t mod_pvs[] = { pv_parse_t_var_name, 0, 0, 0 }, { {"T", sizeof("T")-1}, PVT_OTHER, pv_get_t, 0, pv_parse_t_name, 0, 0, 0 }, + { {"T_branch", sizeof("T_branch")-1}, PVT_OTHER, pv_get_t_branch, 0, + pv_parse_t_name, 0, 0, 0 }, { {0, 0}, 0, 0, 0, 0, 0, 0, 0 } };
10 years, 7 months
1
0
0
0
git:master: modules/tmx: added $T_reply_flags pv and fixed bug in t_reuse_branch()
by Juha Heinanen
Module: sip-router Branch: master Commit: 9051ab74c9f6b97580a832e66385747c94c94380 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9051ab7…
Author: Juha Heinanen <jh(a)tutpro.com> Committer: Juha Heinanen <jh(a)tutpro.com> Date: Sun Apr 20 15:17:22 2014 +0300 modules/tmx: added $T_reply_flags pv and fixed bug in t_reuse_branch() --- modules/tmx/t_var.c | 15 +++++++++++++++ modules/tmx/t_var.h | 2 ++ modules/tmx/tmx_mod.c | 5 ++++- 3 files changed, 21 insertions(+), 1 deletions(-) diff --git a/modules/tmx/t_var.c b/modules/tmx/t_var.c index 897f156..4fe974e 100644 --- a/modules/tmx/t_var.c +++ b/modules/tmx/t_var.c @@ -322,6 +322,21 @@ int pv_get_t_var_rpl(struct sip_msg *msg, pv_param_t *param, return pv_get_spec_value(&_pv_trpl.msg, pv, res); } +int pv_get_t_var_branch(struct sip_msg *msg, pv_param_t *param, + pv_value_t *res) +{ + pv_spec_t *pv=NULL; + + if(pv_t_update_rpl(msg)) + return pv_get_null(msg, param, res); + + pv = (pv_spec_t*)param->pvn.u.dname; + if(pv==NULL || pv_alter_context(pv)) + return pv_get_null(msg, param, res); + + return pv_get_spec_value(&_pv_trpl.msg, pv, res); +} + int pv_get_t_var_inv(struct sip_msg *msg, pv_param_t *param, pv_value_t *res) { diff --git a/modules/tmx/t_var.h b/modules/tmx/t_var.h index 46e8a50..3fedb60 100644 --- a/modules/tmx/t_var.h +++ b/modules/tmx/t_var.h @@ -40,6 +40,8 @@ int pv_get_tm_branch_idx(struct sip_msg *msg, pv_param_t *param, pv_value_t *res); int pv_get_tm_reply_ruid(struct sip_msg *msg, pv_param_t *param, pv_value_t *res); +int pv_get_tm_reply_flags(struct sip_msg *msg, pv_param_t *param, + pv_value_t *res); int pv_get_tm_reply_code(struct sip_msg *msg, pv_param_t *param, pv_value_t *res); int pv_get_tm_reply_reason(struct sip_msg *msg, pv_param_t *param, diff --git a/modules/tmx/tmx_mod.c b/modules/tmx/tmx_mod.c index 5b2d490..affc53c 100644 --- a/modules/tmx/tmx_mod.c +++ b/modules/tmx/tmx_mod.c @@ -124,6 +124,9 @@ static pv_export_t mod_pvs[] = { { {"T_reply_ruid", sizeof("T_reply_ruid")-1}, PVT_OTHER, pv_get_tm_reply_ruid, 0, 0, 0, 0, 0 }, + { {"T_reply_flags", sizeof("T_reply_flags")-1}, PVT_OTHER, + pv_get_tm_reply_flags, 0, + 0, 0, 0, 0 }, { {"T_reply_code", sizeof("T_reply_code")-1}, PVT_OTHER, pv_get_tm_reply_code, 0, 0, 0, 0, 0 }, @@ -611,7 +614,7 @@ static int w_t_reuse_branch(struct sip_msg* msg, char *p1, char *p2) } else { reset_path_vector(msg); } - setbflagsval(0, t->uac[branch].flags); + setbflagsval(0, t->uac[branch].branch_flags); set_instance(msg, &(t->uac[branch].instance)); return 1; default:
10 years, 7 months
2
2
0
0
git:master: modules/tmx: removed unused function
by Juha Heinanen
Module: sip-router Branch: master Commit: d771fbfe982548e5fc2b087d3e1897e9011d5dd6 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d771fbf…
Author: Juha Heinanen <jh(a)tutpro.com> Committer: Juha Heinanen <jh(a)tutpro.com> Date: Mon Apr 21 17:34:33 2014 +0300 modules/tmx: removed unused function --- modules/tmx/t_var.c | 14 -------------- 1 files changed, 0 insertions(+), 14 deletions(-) diff --git a/modules/tmx/t_var.c b/modules/tmx/t_var.c index 4fe974e..4d38d6b 100644 --- a/modules/tmx/t_var.c +++ b/modules/tmx/t_var.c @@ -322,20 +322,6 @@ int pv_get_t_var_rpl(struct sip_msg *msg, pv_param_t *param, return pv_get_spec_value(&_pv_trpl.msg, pv, res); } -int pv_get_t_var_branch(struct sip_msg *msg, pv_param_t *param, - pv_value_t *res) -{ - pv_spec_t *pv=NULL; - - if(pv_t_update_rpl(msg)) - return pv_get_null(msg, param, res); - - pv = (pv_spec_t*)param->pvn.u.dname; - if(pv==NULL || pv_alter_context(pv)) - return pv_get_null(msg, param, res); - - return pv_get_spec_value(&_pv_trpl.msg, pv, res); -} int pv_get_t_var_inv(struct sip_msg *msg, pv_param_t *param, pv_value_t *res)
10 years, 7 months
1
0
0
0
git:master: tm: free struct contacts in case of error retrieving r-uri in t_load_contacts( )
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: 770434e87ec14b9662314e8a13d587f547e876cb URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=770434e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Mon Apr 21 11:12:23 2014 +0200 tm: free struct contacts in case of error retrieving r-uri in t_load_contacts() --- modules/tm/t_serial.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/modules/tm/t_serial.c b/modules/tm/t_serial.c index 8fdfeaf..e8becef 100644 --- a/modules/tm/t_serial.c +++ b/modules/tm/t_serial.c @@ -197,10 +197,12 @@ int t_load_contacts(struct sip_msg* msg, char* key, char* value) LM_ERR("no memory for contact info\n"); return -1; } + memset(contact, 0, sizeof(struct contact)); if (ruri_is_new) { ruri = GET_RURI(msg); if (!ruri) { + free_contact_list(contacts); LM_ERR("no Request-URI found\n"); return -1; }
10 years, 7 months
1
0
0
0
git:master: core: fix some #includes to be posix compliant
by Timo Teras
Module: sip-router Branch: master Commit: 2c74ba02c843349a6ad30f7e668a7a194dac679c URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2c74ba0…
Author: Timo Teräs <timo.teras(a)iki.fi> Committer: Timo Teräs <timo.teras(a)iki.fi> Date: Mon Apr 21 10:57:11 2014 +0300 core: fix some #includes to be posix compliant sys/poll.h and sys/fcntl.h are GNUisms and might not exist on strictly posix compliant systems. This fixes to use the posix specified standard locations of these headers. E.g musl c-library will give warnings on using these non-standard glibc 'internal' headers. --- io_wait.h | 2 +- stats.h | 2 +- tcp_main.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/io_wait.h b/io_wait.h index b7ae925..8129842 100644 --- a/io_wait.h +++ b/io_wait.h @@ -63,7 +63,7 @@ #endif #define _GNU_SOURCE /* for POLLRDHUP on linux */ -#include <sys/poll.h> +#include <poll.h> #include <fcntl.h> #ifdef HAVE_EPOLL diff --git a/stats.h b/stats.h index 7ab3596..f079541 100644 --- a/stats.h +++ b/stats.h @@ -32,7 +32,7 @@ #include <ctype.h> #include <sys/mman.h> -#include <sys/fcntl.h> +#include <fcntl.h> #include <sys/time.h> #include <time.h> #include <sys/utsname.h> diff --git a/tcp_main.c b/tcp_main.c index 6444074..c0320dd 100644 --- a/tcp_main.c +++ b/tcp_main.c @@ -150,7 +150,7 @@ #ifdef HAVE_SELECT #include <sys/select.h> #endif -#include <sys/poll.h> +#include <poll.h> #include "ip_addr.h"
10 years, 7 months
1
0
0
0
← Newer
1
...
13
14
15
16
17
18
19
...
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