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
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
May 2009
----- 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
26 participants
263 discussions
Start a n
N
ew thread
git:master: tmx: added t_cancel_branches()
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: a6c25ed122ea00542af390a7b9222700c7846a14 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a6c25ed…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Sun May 3 15:19:25 2009 +0200 tmx: added t_cancel_branches() --- modules_k/tmx/tmx_mod.c | 71 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 71 insertions(+), 0 deletions(-) diff --git a/modules_k/tmx/tmx_mod.c b/modules_k/tmx/tmx_mod.c index ddcd45c..711e966 100644 --- a/modules_k/tmx/tmx_mod.c +++ b/modules_k/tmx/tmx_mod.c @@ -44,6 +44,9 @@ struct tm_binds _tmx_tmb; static int mod_init(void); void destroy(void); +static int t_cancel_branches(struct sip_msg* msg, char *k, char *s2); +static int fixup_cancel_branches(void** param, int param_no); + /* statistic variables */ stat_var *tm_rcv_rpls; stat_var *tm_rld_rpls; @@ -101,6 +104,8 @@ static mi_export_t mi_cmds [] = { static cmd_export_t cmds[]={ + {"t_cancel_branches", (cmd_function)t_cancel_branches, 1, + fixup_cancel_branches, 0, ONREPLY_ROUTE }, {0,0,0,0,0,0} }; @@ -163,4 +168,70 @@ void destroy(void) return; } +static int fixup_cancel_branches(void** param, int param_no) +{ + char *val; + int n = 0; + + if (param_no==1) { + val = (char*)*param; + if (strcasecmp(val,"all")==0) { + n = 0; + } else if (strcasecmp(val,"others")==0) { + n = 1; + } else if (strcasecmp(val,"this")==0) { + n = 2; + } else { + LM_ERR("invalid param \"%s\"\n", val); + return E_CFG; + } + pkg_free(*param); + *param=(void*)(long)n; + } else { + LM_ERR("called with parameter != 1\n"); + return E_BUG; + } + return 0; +} + +static int t_cancel_branches(struct sip_msg* msg, char *k, char *s2) +{ + branch_bm_t cb = 0; + struct cell *t = 0; + tm_ctx_t *tcx = 0; + int n=0; + int idx = 0; + t=_tmx_tmb.t_gett(); + if (t==NULL || t==T_UNDEFINED || !is_invite(t)) + return -1; + tcx = _tmx_tmb.tm_ctx_get(); + if(tcx != NULL) + idx = tcx->branch_index; + n = (int)k; + switch(n) { + case 1: + LOCK_REPLIES(t); + _tmx_tmb.which_cancel(t, &cb); + if(t->uac[idx].local_cancel.buffer==BUSY_BUFFER) + t->uac[idx].local_cancel.buffer=NULL; + UNLOCK_REPLIES(t); + cb &= ~(1<<idx); + case 2: + if(msg->first_line.u.reply.statuscode>=200) + break; + cb = 1<<idx; + break; + default: + LOCK_REPLIES(t); + _tmx_tmb.which_cancel(t, &cb); + UNLOCK_REPLIES(t); + if (msg->first_line.u.reply.statuscode>=200) + cb &= ~(1<<idx); + } + LM_DBG("canceling %d/%d\n", n, (int)cb); + if(cb==0) + return -1; + _tmx_tmb.cancel_uacs(t, cb, 0); + return 1; +}
15 years, 7 months
1
0
0
0
git:master: tm: which cancel exported via TM API
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: d8d0b92dfed5e41b8952325da1509d91bfa611cf URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d8d0b92…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Sun May 3 15:18:21 2009 +0200 tm: which cancel exported via TM API --- modules/tm/t_cancel.h | 1 + modules/tm/tm_load.c | 1 + modules/tm/tm_load.h | 1 + 3 files changed, 3 insertions(+), 0 deletions(-) diff --git a/modules/tm/t_cancel.h b/modules/tm/t_cancel.h index 2ae96f2..d3ff20a 100644 --- a/modules/tm/t_cancel.h +++ b/modules/tm/t_cancel.h @@ -84,6 +84,7 @@ typedef int(*cancel_uacs_f)( struct cell *t, branch_bm_t cancel_bm, int flags ); typedef int (*cancel_all_uacs_f)(struct cell *trans, int how); +typedef void (*which_cancel_f)(struct cell *t, branch_bm_t *cancel_bm ); /* diff --git a/modules/tm/tm_load.c b/modules/tm/tm_load.c index 13b9f23..22e1782 100644 --- a/modules/tm/tm_load.c +++ b/modules/tm/tm_load.c @@ -234,6 +234,7 @@ int load_tm( struct tm_binds *tmb) tmb->t_lookup_request = t_lookup_request; tmb->t_check = t_check; tmb->unref_cell = unref_cell; + tmb->which_cancel = which_cancel; #ifdef WITH_TM_CTX tmb->tm_ctx_get = tm_ctx_get; diff --git a/modules/tm/tm_load.h b/modules/tm/tm_load.h index 22e7201..54c0b9a 100644 --- a/modules/tm/tm_load.h +++ b/modules/tm/tm_load.h @@ -141,6 +141,7 @@ struct tm_binds { tlookup_request_f t_lookup_request; tcheck_f t_check; unref_cell_f unref_cell; + which_cancel_f which_cancel; #ifdef WITH_TM_CTX tm_ctx_get_f tm_ctx_get; #else
15 years, 7 months
1
0
0
0
git:master: core: auto_aliases to control rev DNS aliases
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: bb4cd6b04928615d02ec9b1c6f8c64a157e1fe3d URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=bb4cd6b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Sun May 3 13:04:49 2009 +0200 core: auto_aliases to control rev DNS aliases - parameter takes boolean value - if set, rev dns results are added to aliases list - default is set --- cfg.lex | 3 +++ cfg.y | 3 +++ globals.h | 1 + main.c | 2 ++ socket_info.c | 9 +++++---- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/cfg.lex b/cfg.lex index b1f9c55..21d30b9 100644 --- a/cfg.lex +++ b/cfg.lex @@ -273,6 +273,7 @@ LOGSTDERROR log_stderror LOGFACILITY log_facility LISTEN listen ALIAS alias +SR_AUTO_ALIASES auto_aliases DNS dns REV_DNS rev_dns DNS_TRY_IPV6 dns_try_ipv6 @@ -550,6 +551,8 @@ EAT_ABLE [\ \t\b\r] <INITIAL>{LOGFACILITY} { yylval.strval=yytext; return LOGFACILITY; } <INITIAL>{LISTEN} { count(); yylval.strval=yytext; return LISTEN; } <INITIAL>{ALIAS} { count(); yylval.strval=yytext; return ALIAS; } +<INITIAL>{SR_AUTO_ALIASES} { count(); yylval.strval=yytext; + return SR_AUTO_ALIASES; } <INITIAL>{DNS} { count(); yylval.strval=yytext; return DNS; } <INITIAL>{REV_DNS} { count(); yylval.strval=yytext; return REV_DNS; } <INITIAL>{DNS_TRY_IPV6} { count(); yylval.strval=yytext; diff --git a/cfg.y b/cfg.y index a281052..622e880 100644 --- a/cfg.y +++ b/cfg.y @@ -333,6 +333,7 @@ static int case_check_default(struct case_stms* stms); %token LOGFACILITY %token LISTEN %token ALIAS +%token SR_AUTO_ALIASES %token DNS %token REV_DNS %token DNS_TRY_IPV6 @@ -1272,6 +1273,8 @@ assign_stm: free_socket_id_lst($3); } | ALIAS EQUAL error { yyerror(" hostname expected"); } + | SR_AUTO_ALIASES EQUAL NUMBER { sr_auto_aliases=$3; } + | SR_AUTO_ALIASES EQUAL error { yyerror("boolean value expected"); } | ADVERTISED_ADDRESS EQUAL listen_id { default_global_address.s=$3; default_global_address.len=strlen($3); diff --git a/globals.h b/globals.h index 734c370..f7ef9f8 100644 --- a/globals.h +++ b/globals.h @@ -117,6 +117,7 @@ extern int sock_gid; extern int sock_mode; extern char* chroot_dir; extern char* working_dir; +extern int sr_auto_aliases; #ifdef USE_MCAST extern int mcast_loopback; diff --git a/main.c b/main.c index 4f0169b..4d7fd1f 100644 --- a/main.c +++ b/main.c @@ -348,6 +348,8 @@ int mhomed=0; /* use dns and/or rdns or to see if we need to add a ;received=x.x.x.x to via: */ int received_dns = 0; +/* add or not the rev dns names to aliases list */ +int sr_auto_aliases=1; char* working_dir = 0; char* chroot_dir = 0; char* user=0; diff --git a/socket_info.c b/socket_info.c index 8fa909b..ac2c82f 100644 --- a/socket_info.c +++ b/socket_info.c @@ -822,7 +822,8 @@ static int fix_hostname(str* name, struct ip_addr* address, str* address_str, } /* check if we got the official name */ if (strcasecmp(he->h_name, name->s)!=0){ - if (add_alias(name->s, name->len, s->port_no, s->proto)<0){ + if (sr_auto_aliases && + add_alias(name->s, name->len, s->port_no, s->proto)<0){ LOG(L_ERR, "ERROR: fix_hostname: add_alias failed\n"); } /* change the official name */ @@ -836,9 +837,9 @@ static int fix_hostname(str* name, struct ip_addr* address, str* address_str, strncpy(name->s, he->h_name, name->len+1); } /* add the aliases*/ - for(h=he->h_aliases; h && *h; h++) + for(h=he->h_aliases; sr_auto_aliases && h && *h; h++) if (add_alias(*h, strlen(*h), s->port_no, s->proto)<0){ - LOG(L_ERR, "ERROR: fix_hostname: add_alias failed\n"); + LOG(L_ERR, "ERROR: fix_hostname: add_alias failed\n"); } hostent2ip_addr(address, he, 0); /*convert to ip_addr format*/ if (type_flags){ @@ -853,7 +854,7 @@ static int fix_hostname(str* name, struct ip_addr* address, str* address_str, strncpy(address_str->s, tmp, strlen(tmp)+1); /* set is_ip (1 if name is an ip address, 0 otherwise) */ address_str->len=strlen(tmp); - if ((address_str->len==name->len) && + if (sr_auto_aliases && (address_str->len==name->len) && (strncasecmp(address_str->s, name->s, address_str->len)==0)){ *flags|=SI_IS_IP; /* do rev. DNS on it (for aliases)*/
15 years, 7 months
1
0
0
0
git:master: pv: avp_aliases parameter
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: 4fd57899f54333e729c41fae9187142bf25a7fac URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4fd5789…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Sun May 3 13:42:56 2009 +0200 pv: avp_aliases parameter - avp_aliases parameter from K core - pv module is the only one exporting $avp(...) PV, so without it this parameter makes no sense --- modules_k/pv/pv.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/modules_k/pv/pv.c b/modules_k/pv/pv.c index 9d7078a..596b618 100644 --- a/modules_k/pv/pv.c +++ b/modules_k/pv/pv.c @@ -359,9 +359,12 @@ static pv_export_t mod_pvs[] = { { {0, 0}, 0, 0, 0, 0, 0, 0, 0 } }; +static int add_avp_aliases(modparam_t type, void* val); + static param_export_t params[]={ {"shvset", STR_PARAM|USE_FUNC_PARAM, (void*)param_set_shvar }, {"varset", STR_PARAM|USE_FUNC_PARAM, (void*)param_set_var }, + {"avp_aliases", STR_PARAM|USE_FUNC_PARAM, (void*)add_avp_aliases }, {0,0,0} }; @@ -455,3 +458,14 @@ static int pv_unset(struct sip_msg* msg, char* pvid, char *foo) return 1; } +static int add_avp_aliases(modparam_t type, void* val) +{ + if (val!=0 && ((char*)val)[0]!=0) + { + if ( add_avp_galias_str((char*)val)!=0 ) + return -1; + } + + return 0; +} +
15 years, 7 months
1
0
0
0
git:master: pv: doc updated
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: 941c2ca3e031a1ad100ed92ce4e7447c0dfe3ea1 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=941c2ca…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Sun May 3 14:47:21 2009 +0200 pv: doc updated --- modules_k/pv/README | 31 +++++++++++++++++++++++-------- modules_k/pv/doc/pv_admin.xml | 19 +++++++++++++++++++ 2 files changed, 42 insertions(+), 8 deletions(-) diff --git a/modules_k/pv/README b/modules_k/pv/README index 9c6ef99..6b9b892 100644 --- a/modules_k/pv/README +++ b/modules_k/pv/README @@ -28,6 +28,7 @@ Daniel-Constantin Mierla 3.1. shvset (string) 3.2. varset (string) + 3.3. avp_aliases (string) 4. Exported Functions @@ -43,10 +44,11 @@ Daniel-Constantin Mierla 1.1. shvset parameter usage 1.2. varset parameter usage - 1.3. pv_isset usage - 1.4. pv_unset usage - 1.5. shv_set usage - 1.6. shv_get usage + 1.3. avp_aliases parameter usage + 1.4. pv_isset usage + 1.5. pv_unset usage + 1.6. shv_set usage + 1.7. shv_get usage Chapter 1. Admin Guide @@ -62,6 +64,7 @@ Chapter 1. Admin Guide 3.1. shvset (string) 3.2. varset (string) + 3.3. avp_aliases (string) 4. Exported Functions @@ -99,6 +102,7 @@ Chapter 1. Admin Guide 3.1. shvset (string) 3.2. varset (string) + 3.3. avp_aliases (string) 3.1. shvset (string) @@ -142,6 +146,17 @@ modparam("pv", "varset", "init=i:1") modparam("pv", "varset", "gw=s:sip:11.11.11.11;transport=tcp") ... +3.3. avp_aliases (string) + + Define aliases for PV AVP names. + + Default value is NULL. + + Example 1.3. avp_aliases parameter usage +... +modparam("pv","avp_aliases","email=s:email_addr;tmp=i:100") +... + 4. Exported Functions 4.1. pv_isset(pvar) @@ -156,7 +171,7 @@ modparam("pv", "varset", "gw=s:sip:11.11.11.11;transport=tcp") This function can be used from ANY_ROUTE. - Example 1.3. pv_isset usage + Example 1.4. pv_isset usage ... if(pv_isset("$avp("s:x")")) { @@ -173,7 +188,7 @@ if(pv_isset("$avp("s:x")")) This function can be used from ANY_ROUTE. - Example 1.4. pv_unset usage + Example 1.5. pv_unset usage ... pv_unset("$avp("s:x")"); ... @@ -201,7 +216,7 @@ pv_unset("$avp("s:x")"); _value_ _empty_line_ - Example 1.5. shv_set usage + Example 1.6. shv_set usage ... $ kamctl fifo shv_set debug int 0 ... @@ -219,7 +234,7 @@ $ kamctl fifo shv_set debug int 0 _name_ _empty_line_ - Example 1.6. shv_get usage + Example 1.7. shv_get usage ... $ kamctl fifo shv_get debug $ kamctl fifo shv_get diff --git a/modules_k/pv/doc/pv_admin.xml b/modules_k/pv/doc/pv_admin.xml index f8b50ad..f6d42cf 100644 --- a/modules_k/pv/doc/pv_admin.xml +++ b/modules_k/pv/doc/pv_admin.xml @@ -124,6 +124,25 @@ modparam("pv", "varset", "gw=s:sip:11.11.11.11;transport=tcp") </programlisting> </example> </section> + <section> + <title><varname>avp_aliases</varname> (string)</title> + <para> + Define aliases for PV AVP names. + </para> + <para> + <emphasis> + Default value is NULL. + </emphasis> + </para> + <example> + <title><varname>avp_aliases</varname> parameter usage</title> + <programlisting format="linespecific"> +... +modparam("pv","avp_aliases","email=s:email_addr;tmp=i:100") +... + </programlisting> + </example> + </section> </section> <section> <title>Exported Functions</title>
15 years, 7 months
1
0
0
0
git:master: presence_xml: link to kmi lib
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: 5ace95bfa7746c6b78627adc44bec87beec91c61 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5ace95b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Fri May 1 23:23:51 2009 +0200 presence_xml: link to kmi lib --- modules_k/presence_xml/Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/modules_k/presence_xml/Makefile b/modules_k/presence_xml/Makefile index 9ae2c1b..451811d 100644 --- a/modules_k/presence_xml/Makefile +++ b/modules_k/presence_xml/Makefile @@ -18,4 +18,5 @@ DEFS+=-DOPENSER_MOD_INTERFACE SERLIBPATH=../../lib SER_LIBS+=$(SERLIBPATH)/srdb1/srdb1 +SER_LIBS+=$(SERLIBPATH)/kmi/kmi include ../../Makefile.modules
15 years, 7 months
1
0
0
0
git:master: tm: unref_cell(t) added to tm api
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: 61ad14ac452293d45944f6de7dbccb7a9835d71e URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=61ad14a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Fri May 1 14:58:49 2009 +0200 tm: unref_cell(t) added to tm api - wrapper to UNREF(T) define - used by K extensions (tmx module) --- modules/tm/t_funcs.c | 5 ++++- modules/tm/t_funcs.h | 2 ++ modules/tm/tm_load.c | 1 + modules/tm/tm_load.h | 1 + 4 files changed, 8 insertions(+), 1 deletions(-) diff --git a/modules/tm/t_funcs.c b/modules/tm/t_funcs.c index f07b002..8e4d492 100644 --- a/modules/tm/t_funcs.c +++ b/modules/tm/t_funcs.c @@ -447,4 +447,7 @@ int fr_inv_avp2timer(unsigned int* timer) return 1; } - +void unref_cell(struct cell *t) +{ + UNREF(t); +} diff --git a/modules/tm/t_funcs.h b/modules/tm/t_funcs.h index 5e3c605..994e847 100644 --- a/modules/tm/t_funcs.h +++ b/modules/tm/t_funcs.h @@ -150,6 +150,8 @@ int send_pr_buffer( struct retr_buf *rb, void *buf, int len); int init_avp_params(char *fr_timer_param, char *fr_inv_timer_param); +typedef void (*unref_cell_f)(struct cell *t); +void unref_cell(struct cell *t); /* * Get the FR_{INV}_TIMER from corresponding AVP */ diff --git a/modules/tm/tm_load.c b/modules/tm/tm_load.c index afb5e30..13b9f23 100644 --- a/modules/tm/tm_load.c +++ b/modules/tm/tm_load.c @@ -233,6 +233,7 @@ int load_tm( struct tm_binds *tmb) tmb->generate_fromtag = generate_fromtag; tmb->t_lookup_request = t_lookup_request; tmb->t_check = t_check; + tmb->unref_cell = unref_cell; #ifdef WITH_TM_CTX tmb->tm_ctx_get = tm_ctx_get; diff --git a/modules/tm/tm_load.h b/modules/tm/tm_load.h index ec84143..22e7201 100644 --- a/modules/tm/tm_load.h +++ b/modules/tm/tm_load.h @@ -140,6 +140,7 @@ struct tm_binds { generate_fromtag_f generate_fromtag; tlookup_request_f t_lookup_request; tcheck_f t_check; + unref_cell_f unref_cell; #ifdef WITH_TM_CTX tm_ctx_get_f tm_ctx_get; #else
15 years, 7 months
1
0
0
0
git:master: tmx: new module to collect K TM extensions
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: 06a6a733216fe865aed03840d787c3098ad67278 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=06a6a73…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Fri May 1 15:14:37 2009 +0200 tmx: new module to collect K TM extensions - includes: - pseudo-variables - MI commands - statistics (only register them now, no update) --- modules_k/tmx/Makefile | 19 + modules_k/tmx/README | 174 +++++++++ modules_k/tmx/doc/Makefile | 4 + modules_k/tmx/doc/tmx.xml | 43 ++ modules_k/tmx/doc/tmx_admin.xml | 270 +++++++++++++ modules_k/tmx/t_mi.c | 820 +++++++++++++++++++++++++++++++++++++++ modules_k/tmx/t_mi.h | 55 +++ modules_k/tmx/t_var.c | 321 +++++++++++++++ modules_k/tmx/t_var.h | 40 ++ modules_k/tmx/tmx_mod.c | 166 ++++++++ modules_k/tmx/tmx_mod.h | 31 ++ 11 files changed, 1943 insertions(+), 0 deletions(-) Diff:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=06a…
15 years, 7 months
1
0
0
0
git:master: tm: free dst_uri.s in fake_req if failure
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: 41ee132aa1f2a900e281e2458b76fcaf781a79da URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=41ee132…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Fri May 1 13:55:06 2009 +0200 tm: free dst_uri.s in fake_req if failure - free fake_req->dst_uri.s if no more pkg for fake_req->new_uri.s --- modules/tm/t_reply.c | 30 ++++++++++++++++++------------ 1 files changed, 18 insertions(+), 12 deletions(-) diff --git a/modules/tm/t_reply.c b/modules/tm/t_reply.c index 848cebb..8ab79c2 100644 --- a/modules/tm/t_reply.c +++ b/modules/tm/t_reply.c @@ -747,6 +747,19 @@ int fake_req(struct sip_msg *faked_req, faked_req->parsed_uri_ok = 0; faked_req->msg_flags|=extra_flags; /* set the extra tm flags */ + + /* dst_uri can change ALSO!!! -- make a private copy */ + if (shmem_msg->dst_uri.s!=0 && shmem_msg->dst_uri.len!=0) { + faked_req->dst_uri.s=pkg_malloc(shmem_msg->dst_uri.len+1); + if (!faked_req->dst_uri.s) { + LOG(L_ERR, "ERROR: fake_req: no uri/pkg mem\n"); + goto error01; + } + faked_req->dst_uri.len=shmem_msg->dst_uri.len; + memcpy( faked_req->dst_uri.s, shmem_msg->dst_uri.s, + faked_req->dst_uri.len); + faked_req->dst_uri.s[faked_req->dst_uri.len]=0; + } /* new_uri can change -- make a private copy */ if (shmem_msg->new_uri.s!=0 && shmem_msg->new_uri.len!=0) { faked_req->new_uri.s=pkg_malloc(shmem_msg->new_uri.len+1); @@ -759,23 +772,16 @@ int fake_req(struct sip_msg *faked_req, faked_req->new_uri.len); faked_req->new_uri.s[faked_req->new_uri.len]=0; } - /* dst_uri can change ALSO!!! -- make a private copy */ - if (shmem_msg->dst_uri.s!=0 && shmem_msg->dst_uri.len!=0) { - faked_req->dst_uri.s=pkg_malloc(shmem_msg->dst_uri.len+1); - if (!faked_req->dst_uri.s) { - LOG(L_ERR, "ERROR: fake_req: no uri/pkg mem\n"); - goto error00; - } - faked_req->dst_uri.len=shmem_msg->dst_uri.len; - memcpy( faked_req->dst_uri.s, shmem_msg->dst_uri.s, - faked_req->dst_uri.len); - faked_req->dst_uri.s[faked_req->dst_uri.len]=0; - } if(uac) setbflagsval(0, uac->branch_flags); else setbflagsval(0, 0); return 1; error00: + if (faked_req->dst_uri.s) { + pkg_free(faked_req->dst_uri.s); + faked_req->dst_uri.s = 0; + } +error01: return 0; }
15 years, 7 months
1
0
0
0
git:master: registrar: declare usrloc_api_t variable
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: 1828803fc36c1f4dc6f6de4e14362b89ad360812 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1828803…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Fri May 1 14:52:58 2009 +0200 registrar: declare usrloc_api_t variable --- modules_k/registrar/reg_mod.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/modules_k/registrar/reg_mod.c b/modules_k/registrar/reg_mod.c index f80d901..735a4e2 100644 --- a/modules_k/registrar/reg_mod.c +++ b/modules_k/registrar/reg_mod.c @@ -78,6 +78,7 @@ MODULE_VERSION +usrloc_api_t ul;/*!< Structure containing pointers to usrloc functions*/ /*! \brief Module init & destroy function */ static int mod_init(void);
15 years, 7 months
1
0
0
0
← Newer
1
...
23
24
25
26
27
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
Results per page:
10
25
50
100
200