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
July
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
December 2017
----- 2025 -----
July 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
26 participants
476 discussions
Start a n
N
ew thread
git:5.1:26bd009c: mtree: use cast to unsigned char for accessing _mt_char_table array
by Daniel-Constantin Mierla
04 Dec '17
04 Dec '17
Module: kamailio Branch: 5.1 Commit: 26bd009c4963e4acb1e0eb52d0f5c9f17096d412 URL:
https://github.com/kamailio/kamailio/commit/26bd009c4963e4acb1e0eb52d0f5c9f…
Author: Timo Teras <timo.teras(a)iki.fi> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-12-04T09:26:12+01:00 mtree: use cast to unsigned char for accessing _mt_char_table array - switched the index from unsigned int to unsigned char - simplifies the code by avoiding the tests for exceeding the size of the array - error message extended to print the full string - slightly modified version of PR #1343 (cherry picked from commit ae18e409d71d2d4eccb4604bb6f29a121309b54e) --- Modified: src/modules/mtree/mtree.c --- Diff:
https://github.com/kamailio/kamailio/commit/26bd009c4963e4acb1e0eb52d0f5c9f…
Patch:
https://github.com/kamailio/kamailio/commit/26bd009c4963e4acb1e0eb52d0f5c9f…
1
0
0
0
git:5.1:dab49483: ndb_redis: detect argument specifiers for redis_cmd() with three params
by Daniel-Constantin Mierla
04 Dec '17
04 Dec '17
Module: kamailio Branch: 5.1 Commit: dab49483e419dd810c7b5133bf64063df0ad6696 URL:
https://github.com/kamailio/kamailio/commit/dab49483e419dd810c7b5133bf64063…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-12-04T09:26:00+01:00 ndb_redis: detect argument specifiers for redis_cmd() with three params - check if %s or %d is part of the command, because it makes the redis api expect more params to the commands and can crash if none is found - reported by GH #1342 (cherry picked from commit 75bbbe4059cb6fde4c74fa9157f400a24e6f7496) --- Modified: src/modules/ndb_redis/ndb_redis_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/dab49483e419dd810c7b5133bf64063…
Patch:
https://github.com/kamailio/kamailio/commit/dab49483e419dd810c7b5133bf64063…
--- diff --git a/src/modules/ndb_redis/ndb_redis_mod.c b/src/modules/ndb_redis/ndb_redis_mod.c index 64f2b46897..e984a902bd 100644 --- a/src/modules/ndb_redis/ndb_redis_mod.c +++ b/src/modules/ndb_redis/ndb_redis_mod.c @@ -177,6 +177,7 @@ static int w_redis_cmd3(struct sip_msg* msg, char* ssrv, char* scmd, char* sres) { str s[3]; + int i; if(fixup_get_svalue(msg, (gparam_t*)ssrv, &s[0])!=0) { @@ -188,6 +189,14 @@ static int w_redis_cmd3(struct sip_msg* msg, char* ssrv, char* scmd, LM_ERR("no redis command\n"); return -1; } + for(i=0; i<s[1].len-1; i++) { + if(s[1].s[i]=='%') { + if(s[1].s[i+1]=='s' || s[1].s[i+1]=='b') { + LM_ERR("command argument specifier found, but no params\n"); + return -1; + } + } + } if(fixup_get_svalue(msg, (gparam_t*)sres, &s[2])!=0) { LM_ERR("no redis reply name\n"); @@ -928,6 +937,19 @@ int bind_ndb_redis(ndb_redis_api_t *api) */ static int ki_redis_cmd(sip_msg_t *msg, str *srv, str *rcmd, str *sres) { + int i; + if(rcmd==NULL || rcmd->s==NULL) { + LM_ERR("invalid command\n"); + return -1; + } + for(i=0; i<rcmd->len-1; i++) { + if(rcmd->s[i]=='%') { + if(rcmd->s[i+1]=='s' || rcmd->s[i+1]=='b') { + LM_ERR("command argument specifier found, but no params\n"); + return -1; + } + } + } return redisc_exec(srv, sres, rcmd); } @@ -1007,4 +1029,4 @@ int mod_register(char *path, int *dlflags, void *p1, void *p2) { sr_kemi_modules_add(sr_kemi_ndb_redis_exports); return 0; -} \ No newline at end of file +}
1
0
0
0
git:5.1:1007b74b: ldap: use core fixup function for ldap_search()
by Daniel-Constantin Mierla
04 Dec '17
04 Dec '17
Module: kamailio Branch: 5.1 Commit: 1007b74b66267c31d12b60c53b231e73e74b0931 URL:
https://github.com/kamailio/kamailio/commit/1007b74b66267c31d12b60c53b231e7…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-12-04T09:25:33+01:00 ldap: use core fixup function for ldap_search() (cherry picked from commit 209032fc134afb90e4e12b194d1368ed9fb67ee9) --- Modified: src/modules/ldap/ldap_exp_fn.c Modified: src/modules/ldap/ldap_exp_fn.h Modified: src/modules/ldap/ldap_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/1007b74b66267c31d12b60c53b231e7…
Patch:
https://github.com/kamailio/kamailio/commit/1007b74b66267c31d12b60c53b231e7…
--- diff --git a/src/modules/ldap/ldap_exp_fn.c b/src/modules/ldap/ldap_exp_fn.c index 77a92c2bf7..c68e00895e 100644 --- a/src/modules/ldap/ldap_exp_fn.c +++ b/src/modules/ldap/ldap_exp_fn.c @@ -52,31 +52,22 @@ static char esc_buf[ESC_BUF_SIZE]; * exported functions */ -int ldap_search_impl(struct sip_msg *_msg, pv_elem_t *_ldap_url) +int ldap_search_impl(struct sip_msg *_msg, str *ldap_url) { - str ldap_url; int ld_result_count = 0; /* * do variable substitution for _ldap_url (pv_printf_s) */ - if(_ldap_url == NULL) { + if(ldap_url == NULL || ldap_url->s==NULL || ldap_url->len<=0) { LM_ERR("empty ldap_url\n"); return -2; } - if(_ldap_url->spec != NULL && _ldap_url->spec->getf != NULL) { - if(pv_printf_s(_msg, _ldap_url, &ldap_url) != 0 || ldap_url.len <= 0) { - LM_ERR("pv_printf_s failed\n"); - return -2; - } - } else { - ldap_url = _ldap_url->text; - } /* * perform LDAP search */ - if(ldap_url_search(ldap_url.s, &ld_result_count) != 0) { + if(ldap_url_search(ldap_url->s, &ld_result_count) != 0) { /* LDAP search error */ return -2; } diff --git a/src/modules/ldap/ldap_exp_fn.h b/src/modules/ldap/ldap_exp_fn.h index 695dbc198e..20d4149de6 100644 --- a/src/modules/ldap/ldap_exp_fn.h +++ b/src/modules/ldap/ldap_exp_fn.h @@ -47,7 +47,7 @@ struct ldap_result_check_params pv_elem_p check_str_elem_p; }; -int ldap_search_impl(struct sip_msg *_msg, pv_elem_t *_ldap_url); +int ldap_search_impl(struct sip_msg *_msg, str *ldap_url); int ldap_write_result(struct sip_msg *_msg, struct ldap_result_params *_lrp, struct subst_expr *_se); diff --git a/src/modules/ldap/ldap_mod.c b/src/modules/ldap/ldap_mod.c index f167bcadbb..2364f0a7cf 100644 --- a/src/modules/ldap/ldap_mod.c +++ b/src/modules/ldap/ldap_mod.c @@ -33,6 +33,7 @@ #include "../../core/parser/hf.h" #include "../../core/sr_module.h" #include "../../core/pvar.h" +#include "../../core/mod_fix.h" #include "../../core/mem/mem.h" #include "ld_session.h" @@ -54,7 +55,6 @@ static int child_init(int rank); /* * fixup functions */ -static int ldap_search_fixup(void **param, int param_no); static int ldap_result_fixup(void **param, int param_no); static int ldap_filter_url_encode_fixup(void **param, int param_no); static int ldap_result_check_fixup(void **param, int param_no); @@ -92,7 +92,7 @@ static dictionary *config_vals = NULL; /* clang-format off */ static cmd_export_t cmds[] = { {"ldap_search", (cmd_function)w_ldap_search, 1, - ldap_search_fixup, 0, + fixup_spve_null, 0, REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE|LOCAL_ROUTE}, {"ldap_result", (cmd_function)w_ldap_result1, 1, ldap_result_fixup, 0, @@ -246,7 +246,13 @@ static void destroy(void) static int w_ldap_search(struct sip_msg *msg, char *ldap_url, char *param) { - return ldap_search_impl(msg, (pv_elem_t *)ldap_url); + str ldap_url_val = STR_NULL; + + if(fixup_get_svalue(msg, (gparam_t*)ldap_url, &ldap_url_val)<0) { + LM_ERR("failed to get ldap url parameter\n"); + return -1; + } + return ldap_search_impl(msg, &ldap_url_val); } static int w_ldap_result1(struct sip_msg *msg, char *src, char *param) @@ -291,28 +297,6 @@ static int w_ldap_result_check_2( * FIXUP functions */ -static int ldap_search_fixup(void **param, int param_no) -{ - pv_elem_t *model; - str s; - - if(param_no == 1) { - s.s = (char *)*param; - s.len = strlen(s.s); - if(s.len == 0) { - LM_ERR("ldap url is empty string!\n"); - return E_CFG; - } - if(pv_parse_format(&s, &model) || model == NULL) { - LM_ERR("wrong format [%s] for ldap url!\n", s.s); - return E_CFG; - } - *param = (void *)model; - } - - return 0; -} - static int ldap_result_fixup(void **param, int param_no) { struct ldap_result_params *lp;
1
0
0
0
git:5.1:68f2d708: ldap: clang format the code
by Daniel-Constantin Mierla
04 Dec '17
04 Dec '17
Module: kamailio Branch: 5.1 Commit: 68f2d70858bca7ec3ba373dc4716e342c1c8e522 URL:
https://github.com/kamailio/kamailio/commit/68f2d70858bca7ec3ba373dc4716e34…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-12-04T09:25:23+01:00 ldap: clang format the code (cherry picked from commit 855d5d0f976e89962c541a34690dcb212e127e6b) --- Modified: src/modules/ldap/api.h Modified: src/modules/ldap/iniparser.c Modified: src/modules/ldap/iniparser.h Modified: src/modules/ldap/ld_session.c Modified: src/modules/ldap/ld_session.h Modified: src/modules/ldap/ldap_api_fn.c Modified: src/modules/ldap/ldap_api_fn.h Modified: src/modules/ldap/ldap_connect.c Modified: src/modules/ldap/ldap_connect.h Modified: src/modules/ldap/ldap_escape.c Modified: src/modules/ldap/ldap_exp_fn.c Modified: src/modules/ldap/ldap_exp_fn.h Modified: src/modules/ldap/ldap_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/68f2d70858bca7ec3ba373dc4716e34…
Patch:
https://github.com/kamailio/kamailio/commit/68f2d70858bca7ec3ba373dc4716e34…
1
0
0
0
git:5.1:b529300c: tcpops: exported functions to kemi framework
by Daniel-Constantin Mierla
04 Dec '17
04 Dec '17
Module: kamailio Branch: 5.1 Commit: b529300cc809ddecc58b35d347cfc3973e7980de URL:
https://github.com/kamailio/kamailio/commit/b529300cc809ddecc58b35d347cfc39…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-12-04T09:25:14+01:00 tcpops: exported functions to kemi framework (cherry picked from commit 9f353bad0036f602e4f1ec39096658c1c7809a9b) --- Modified: src/modules/tcpops/tcpops_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/b529300cc809ddecc58b35d347cfc39…
Patch:
https://github.com/kamailio/kamailio/commit/b529300cc809ddecc58b35d347cfc39…
1
0
0
0
git:5.1:1de066ee: core: timer - use uint type instead of short for flags and slow index
by Daniel-Constantin Mierla
04 Dec '17
04 Dec '17
Module: kamailio Branch: 5.1 Commit: 1de066ee6e6360056dad4c6d19b3413f26e4759c URL:
https://github.com/kamailio/kamailio/commit/1de066ee6e6360056dad4c6d19b3413…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-12-04T09:25:02+01:00 core: timer - use uint type instead of short for flags and slow index - get rid of unused padding field (cherry picked from commit 3d22063ebd4cfa8b54ec3e83a04e92770c6d7319) --- Modified: src/core/timer.c Modified: src/core/timer.h --- Diff:
https://github.com/kamailio/kamailio/commit/1de066ee6e6360056dad4c6d19b3413…
Patch:
https://github.com/kamailio/kamailio/commit/1de066ee6e6360056dad4c6d19b3413…
--- diff --git a/src/core/timer.c b/src/core/timer.c index 3a4e610f3e..0e0dc8812e 100644 --- a/src/core/timer.c +++ b/src/core/timer.c @@ -530,7 +530,7 @@ static inline int _timer_add(ticks_t t, struct timer_ln* tl) ticks_t delta; #ifdef USE_SLOW_TIMER - tl->flags&=~((unsigned short)F_TIMER_ON_SLOW_LIST); + tl->flags&=~(F_TIMER_ON_SLOW_LIST); tl->slow_idx=0; #endif delta=tl->initial_timeout; diff --git a/src/core/timer.h b/src/core/timer.h index 6414fb106b..3b1669ab19 100644 --- a/src/core/timer.h +++ b/src/core/timer.h @@ -52,7 +52,7 @@ #ifdef USE_SLOW_TIMER #include <sys/types.h> -typedef unsigned short slow_idx_t; /* type fot the slow index */ +typedef unsigned int slow_idx_t; /* type fot the slow index */ extern pid_t slow_timer_pid; #endif @@ -102,11 +102,9 @@ struct timer_ln{ /* timer_link already used in tm */ ticks_t initial_timeout; void* data; timer_handler_f* f; - volatile unsigned short flags; + volatile unsigned int flags; #ifdef USE_SLOW_TIMER volatile slow_idx_t slow_idx; -#else - unsigned short reserved; #endif #ifdef TIMER_DEBUG unsigned int expires_no; /* timer handler calls */ @@ -144,15 +142,13 @@ void timer_free(struct timer_ln* t); /* use for a deleted/expired timer that you want to add again */ #define timer_reinit(tl) \ do{ \ - (tl)->flags&=~((unsigned short)(F_TIMER_ON_SLOW_LIST | \ - F_TIMER_ACTIVE));\ + (tl)->flags&=~(F_TIMER_ON_SLOW_LIST | F_TIMER_ACTIVE);\ (tl)->init++; \ }while(0) #else /* use for a deleted/expired timer that you want to add again */ #define timer_reinit(tl) \ - (tl)->flags&=~((unsigned short)(F_TIMER_ON_SLOW_LIST | \ - F_TIMER_ACTIVE)) + (tl)->flags&=~(F_TIMER_ON_SLOW_LIST | F_TIMER_ACTIVE) #endif #define timer_init(tl, fun, param, flgs) \
1
0
0
0
git:5.1:d6da4789: cnxcc: removed unused variable
by Daniel-Constantin Mierla
04 Dec '17
04 Dec '17
Module: kamailio Branch: 5.1 Commit: d6da47896040ebf82ff5f0b6d31cd7e662216f5f URL:
https://github.com/kamailio/kamailio/commit/d6da47896040ebf82ff5f0b6d31cd7e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-12-04T09:24:48+01:00 cnxcc: removed unused variable (cherry picked from commit 7bdf8f003bbf5e153d7835d09533c7e22377e8db) --- Modified: src/modules/cnxcc/cnxcc_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/d6da47896040ebf82ff5f0b6d31cd7e…
Patch:
https://github.com/kamailio/kamailio/commit/d6da47896040ebf82ff5f0b6d31cd7e…
--- diff --git a/src/modules/cnxcc/cnxcc_mod.c b/src/modules/cnxcc/cnxcc_mod.c index e77345d745..2cd8a87c6a 100644 --- a/src/modules/cnxcc/cnxcc_mod.c +++ b/src/modules/cnxcc/cnxcc_mod.c @@ -1755,7 +1755,6 @@ static int __get_channel_count_helper(sip_msg_t *msg, str *sclient, static int __get_channel_count(sip_msg_t *msg, char *pclient, char *pcount) { - pv_spec_t *pvcount = (pv_spec_t *)pcount; str sclient; if(fixup_get_svalue(msg, (gparam_t*)pclient, &sclient)<0) {
1
0
0
0
git:master:a156c625: core: pv - use active values for pv buffer slots and size
by Daniel-Constantin Mierla
04 Dec '17
04 Dec '17
Module: kamailio Branch: master Commit: a156c625b434dc0bc19c43ece524f90b1179d881 URL:
https://github.com/kamailio/kamailio/commit/a156c625b434dc0bc19c43ece524f90…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-12-04T09:21:54+01:00 core: pv - use active values for pv buffer slots and size - during startup, param value and active can be different, up to the moment when the config is completely loaded --- Modified: src/core/pvapi.c --- Diff:
https://github.com/kamailio/kamailio/commit/a156c625b434dc0bc19c43ece524f90…
Patch:
https://github.com/kamailio/kamailio/commit/a156c625b434dc0bc19c43ece524f90…
--- diff --git a/src/core/pvapi.c b/src/core/pvapi.c index 0e4d4d326f..64b9fd96ff 100644 --- a/src/core/pvapi.c +++ b/src/core/pvapi.c @@ -2105,7 +2105,8 @@ char* pv_get_buffer(void) char *p; p = _pv_print_buffer[_pv_print_buffer_index]; - _pv_print_buffer_index = (_pv_print_buffer_index+1)%_pv_print_buffer_slots; + _pv_print_buffer_index = (_pv_print_buffer_index+1) + % _pv_print_buffer_slots_active; return p; } @@ -2115,7 +2116,7 @@ char* pv_get_buffer(void) */ int pv_get_buffer_size(void) { - return _pv_print_buffer_size; + return _pv_print_buffer_size_active; } /** @@ -2123,7 +2124,7 @@ int pv_get_buffer_size(void) */ int pv_get_buffer_slots(void) { - return _pv_print_buffer_slots; + return _pv_print_buffer_slots_active; } /**
1
0
0
0
git:master:ef739858: core: fix setting pv_cache_limit param
by Daniel-Constantin Mierla
04 Dec '17
04 Dec '17
Module: kamailio Branch: master Commit: ef7398589aaff02d6521171ff569726db6996c6a URL:
https://github.com/kamailio/kamailio/commit/ef7398589aaff02d6521171ff569726…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-12-04T09:03:28+01:00 core: fix setting pv_cache_limit param --- Modified: src/core/cfg.y --- Diff:
https://github.com/kamailio/kamailio/commit/ef7398589aaff02d6521171ff569726…
Patch:
https://github.com/kamailio/kamailio/commit/ef7398589aaff02d6521171ff569726…
--- diff --git a/src/core/cfg.y b/src/core/cfg.y index 4548d321f9..85105120b7 100644 --- a/src/core/cfg.y +++ b/src/core/cfg.y @@ -1556,11 +1556,11 @@ assign_stm: | MAX_WLOOPS EQUAL error { yyerror("number expected"); } | PVBUFSIZE EQUAL NUMBER { pv_set_buffer_size($3); } | PVBUFSIZE EQUAL error { yyerror("number expected"); } - | PVBUFSLOTS EQUAL NUMBER { default_core_cfg.pv_cache_limit=$3; } + | PVBUFSLOTS EQUAL NUMBER { pv_set_buffer_slots($3); } | PVBUFSLOTS EQUAL error { yyerror("number expected"); } - | PVCACHELIMIT EQUAL NUMBER { default_core_cfg.pv_cache_action=$3; } + | PVCACHELIMIT EQUAL NUMBER { default_core_cfg.pv_cache_limit=$3; } | PVCACHELIMIT EQUAL error { yyerror("number expected"); } - | PVCACHEACTION EQUAL NUMBER { pv_set_buffer_slots($3); } + | PVCACHEACTION EQUAL NUMBER { default_core_cfg.pv_cache_action=$3; } | PVCACHEACTION EQUAL error { yyerror("number expected"); } | HTTP_REPLY_PARSE EQUAL NUMBER { http_reply_parse=$3; } | HTTP_REPLY_PARSE EQUAL error { yyerror("boolean value expected"); }
1
0
0
0
git:5.0:93434c4b: siptrace: wrapper for sip_trace() variants to pass properly the params
by Daniel-Constantin Mierla
04 Dec '17
04 Dec '17
Module: kamailio Branch: 5.0 Commit: 93434c4b90d4df2b24c74e4b0e10c7f7ba305dcc URL:
https://github.com/kamailio/kamailio/commit/93434c4b90d4df2b24c74e4b0e10c7f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-12-04T08:46:59+01:00 siptrace: wrapper for sip_trace() variants to pass properly the params - reported by GH #1351 --- Modified: src/modules/siptrace/siptrace.c --- Diff:
https://github.com/kamailio/kamailio/commit/93434c4b90d4df2b24c74e4b0e10c7f…
Patch:
https://github.com/kamailio/kamailio/commit/93434c4b90d4df2b24c74e4b0e10c7f…
--- diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c index e40835652d..850cd36ae9 100644 --- a/src/modules/siptrace/siptrace.c +++ b/src/modules/siptrace/siptrace.c @@ -92,6 +92,8 @@ static int siptrace_init_rpc(void); static int child_init(int rank); static void destroy(void); static int sip_trace(struct sip_msg*, struct dest_info*, str *correlation_id_str, char*); +static int sip_trace0(struct sip_msg *, char *p1, char *p2); +static int sip_trace1(struct sip_msg *, char *dest, char *p2); static int sip_trace2(struct sip_msg *, char *dest, char *correlation_id); static int fixup_siptrace(void ** param, int param_no); @@ -181,8 +183,8 @@ db_func_t db_funcs; /*!< Database functions */ * Exported functions */ static cmd_export_t cmds[] = { - {"sip_trace", (cmd_function)sip_trace, 0, 0, 0, ANY_ROUTE}, - {"sip_trace", (cmd_function)sip_trace, 1, fixup_siptrace, 0, ANY_ROUTE}, + {"sip_trace", (cmd_function)sip_trace0, 0, 0, 0, ANY_ROUTE}, + {"sip_trace", (cmd_function)sip_trace1, 1, fixup_siptrace, 0, ANY_ROUTE}, {"sip_trace", (cmd_function)sip_trace2, 2, fixup_spve_spve, 0, ANY_ROUTE}, {0, 0, 0, 0, 0, 0} }; @@ -970,6 +972,17 @@ static int fixup_siptrace(void** param, int param_no) { return 0; } +static int sip_trace0(struct sip_msg *msg, char *p1, char *p2) +{ + return sip_trace(msg, NULL, NULL, NULL); + +} + +static int sip_trace1(struct sip_msg *msg, char *dest, char *p2) +{ + return sip_trace(msg, (struct dest_info *)dest, NULL, NULL); +} + static int sip_trace2(struct sip_msg *msg, char *dest, char *correlation_id) { struct dest_info *dst = NULL;
1
0
0
0
← Newer
1
...
44
45
46
47
48
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
45
46
47
48
Results per page:
10
25
50
100
200