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
July 2017
----- 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
23 participants
410 discussions
Start a n
N
ew thread
git:master:08ac6848: imc: proper condition on empty db result
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 08ac68485a27db18ae4774baff0734492f617c71 URL:
https://github.com/kamailio/kamailio/commit/08ac68485a27db18ae4774baff07344…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-07-02T08:54:51+02:00 imc: proper condition on empty db result --- Modified: src/modules/imc/imc.c --- Diff:
https://github.com/kamailio/kamailio/commit/08ac68485a27db18ae4774baff07344…
Patch:
https://github.com/kamailio/kamailio/commit/08ac68485a27db18ae4774baff07344…
--- diff --git a/src/modules/imc/imc.c b/src/modules/imc/imc.c index 668f8a6140..8876b248a1 100644 --- a/src/modules/imc/imc.c +++ b/src/modules/imc/imc.c @@ -236,7 +236,7 @@ int add_from_db(void) goto error; } - if(m_res && m_res->n <=0) + if(m_res==NULL || m_res->n<=0) { LM_INFO("the query returned no result\n"); er_ret = 0; @@ -849,4 +849,4 @@ int mod_register(char *path, int *dlflags, void *p1, void *p2) { sr_kemi_modules_add(sr_kemi_imc_exports); return 0; -} \ No newline at end of file +}
7 years, 4 months
1
0
0
0
git:master:c8747065: xprint: init var to get rid of compile warning
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: c874706539342d2d90e35cdf86fc7433c9b6b312 URL:
https://github.com/kamailio/kamailio/commit/c874706539342d2d90e35cdf86fc743…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-07-01T09:11:12+02:00 xprint: init var to get rid of compile warning --- Modified: src/modules/xprint/xp_lib.c --- Diff:
https://github.com/kamailio/kamailio/commit/c874706539342d2d90e35cdf86fc743…
Patch:
https://github.com/kamailio/kamailio/commit/c874706539342d2d90e35cdf86fc743…
--- diff --git a/src/modules/xprint/xp_lib.c b/src/modules/xprint/xp_lib.c index 9f37c072f5..6368d3fc7e 100644 --- a/src/modules/xprint/xp_lib.c +++ b/src/modules/xprint/xp_lib.c @@ -1706,7 +1706,7 @@ int xl_shm_parse_format2(char *s, xl_elog_p *el, xl_parse_cb cb) int xl_print_log(struct sip_msg* msg, xl_elog_p log, char *buf, int *len) { int n, h; - str tok; + str tok = STR_NULL; xl_elog_p it; char *cur;
7 years, 4 months
1
0
0
0
git:master:b1a6830c: siptrace: proper varible in log message when af is unknown
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: b1a6830c414ddcfb21fc07bc4995b756d617558e URL:
https://github.com/kamailio/kamailio/commit/b1a6830c414ddcfb21fc07bc4995b75…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-07-01T09:11:12+02:00 siptrace: proper varible in log message when af is unknown --- Modified: src/modules/siptrace/siptrace.c --- Diff:
https://github.com/kamailio/kamailio/commit/b1a6830c414ddcfb21fc07bc4995b75…
Patch:
https://github.com/kamailio/kamailio/commit/b1a6830c414ddcfb21fc07bc4995b75…
--- diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c index 967e3cfbcf..987a20aed7 100644 --- a/src/modules/siptrace/siptrace.c +++ b/src/modules/siptrace/siptrace.c @@ -1760,7 +1760,7 @@ static int trace_send_hep3_duplicate(str *body, str *from, str *to, struct dest_ HEP3_PACK_CHUNK_UINT16_NBO(0, 0x0007, htons(from_su.sin6.sin6_port)); HEP3_PACK_CHUNK_UINT16_NBO(0, 0x0008, htons(to_su.sin6.sin6_port)); } else { - LM_ERR("unknown address family [%u]\n", dst.send_sock->address.af); + LM_ERR("unknown address family [%u]\n", from_su.s.sa_family); goto error; }
7 years, 4 months
1
0
0
0
git:master:632380ff: http_client: move assign for download size after right side variable was set
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 632380ff13dce5d5f1d1553797b7783fdc986c59 URL:
https://github.com/kamailio/kamailio/commit/632380ff13dce5d5f1d1553797b7783…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-07-01T09:11:12+02:00 http_client: move assign for download size after right side variable was set --- Modified: src/modules/http_client/functions.c --- Diff:
https://github.com/kamailio/kamailio/commit/632380ff13dce5d5f1d1553797b7783…
Patch:
https://github.com/kamailio/kamailio/commit/632380ff13dce5d5f1d1553797b7783…
--- diff --git a/src/modules/http_client/functions.c b/src/modules/http_client/functions.c index f1a148748f..ea194250ed 100644 --- a/src/modules/http_client/functions.c +++ b/src/modules/http_client/functions.c @@ -114,9 +114,9 @@ static int curL_query_url(struct sip_msg* _m, const char* _url, str* _dst, CURLcode res; char *at = NULL; curl_res_stream_t stream; - long stat; - str rval; - double download_size; + long stat = 0; + str rval = STR_NULL; + double download_size = 0; struct curl_slist *headerlist = NULL; memset(&stream, 0, sizeof(curl_res_stream_t)); @@ -360,10 +360,11 @@ static int curL_query_url(struct sip_msg* _m, const char* _url, str* _dst, } if ((stat >= 200) && (stat < 500)) { - double datasize = download_size; + double datasize = 0; curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD, &download_size); LM_DBG(" -- curl download size: %u \n", (unsigned int)download_size); + datasize = download_size; if (download_size > 0) {
7 years, 4 months
1
0
0
0
git:master:84a54081: dbq_usrloc: statc str vars when their pointer is used out of function
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 84a540817f1aebcf1992f31b315b1b8e19cd5777 URL:
https://github.com/kamailio/kamailio/commit/84a540817f1aebcf1992f31b315b1b8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-07-01T09:11:12+02:00 dbq_usrloc: statc str vars when their pointer is used out of function --- Modified: src/modules/dmq_usrloc/usrloc_sync.c --- Diff:
https://github.com/kamailio/kamailio/commit/84a540817f1aebcf1992f31b315b1b8…
Patch:
https://github.com/kamailio/kamailio/commit/84a540817f1aebcf1992f31b315b1b8…
--- diff --git a/src/modules/dmq_usrloc/usrloc_sync.c b/src/modules/dmq_usrloc/usrloc_sync.c index 96d879e74f..9260bb28ab 100644 --- a/src/modules/dmq_usrloc/usrloc_sync.c +++ b/src/modules/dmq_usrloc/usrloc_sync.c @@ -324,9 +324,10 @@ int usrloc_dmq_send(str* body, dmq_node_t* node) { static int usrloc_dmq_execute_action(srjson_t *jdoc_action, dmq_node_t* node) { static ucontact_info_t ci; srjson_t *it = NULL; - unsigned int action, expires, cseq, flags, cflags, q, last_modified, methods, reg_id; - str aor=STR_NULL, ruid=STR_NULL, c=STR_NULL, received=STR_NULL, path=STR_NULL, - callid=STR_NULL, user_agent=STR_NULL, instance=STR_NULL; + unsigned int action, expires, cseq, flags, cflags, q, last_modified, + methods, reg_id; + str aor=STR_NULL, ruid=STR_NULL, received=STR_NULL, instance=STR_NULL; + static str c=STR_NULL, callid=STR_NULL, path=STR_NULL, user_agent=STR_NULL; action = expires = cseq = flags = cflags = q = last_modified = methods = reg_id = 0;
7 years, 4 months
1
0
0
0
git:master:1151e7da: app_sqlang: safety check for kemi func params used in log message
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 1151e7da7d60a515d9f0d4746c39d8b7d4cc5b34 URL:
https://github.com/kamailio/kamailio/commit/1151e7da7d60a515d9f0d4746c39d8b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-07-01T09:11:12+02:00 app_sqlang: safety check for kemi func params used in log message - incresed size for local buffers --- Modified: src/modules/app_sqlang/app_sqlang_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/1151e7da7d60a515d9f0d4746c39d8b…
Patch:
https://github.com/kamailio/kamailio/commit/1151e7da7d60a515d9f0d4746c39d8b…
--- diff --git a/src/modules/app_sqlang/app_sqlang_mod.c b/src/modules/app_sqlang/app_sqlang_mod.c index 7d0240fb50..9f85b012ba 100644 --- a/src/modules/app_sqlang/app_sqlang_mod.c +++ b/src/modules/app_sqlang/app_sqlang_mod.c @@ -193,15 +193,16 @@ int sr_kemi_config_engine_sqlang(sip_msg_t *msg, int rtype, str *rname, return 1; } -static char _sqlang_buf_stack[4][512]; +#define SQLANG_BUF_STACK_SIZE 1024 +static char _sqlang_buf_stack[4][SQLANG_BUF_STACK_SIZE]; /** * */ static int ki_app_sqlang_dostring(sip_msg_t *msg, str *script) { - if(script==NULL || script->s==NULL || script->len>=511) { - LM_ERR("script too short or too long %d\n", script->len); + if(script==NULL || script->s==NULL || script->len>=SQLANG_BUF_STACK_SIZE-1) { + LM_ERR("script too short or too long %d\n", (script)?script->len:0); return -1; } if(!sqlang_sr_initialized()) @@ -233,8 +234,8 @@ static int w_app_sqlang_dostring(struct sip_msg *msg, char *script, char *extra) */ static int ki_app_sqlang_dofile(sip_msg_t *msg, str *script) { - if(script==NULL || script->s==NULL || script->len>=511) { - LM_ERR("script too short or too long %d\n", script->len); + if(script==NULL || script->s==NULL || script->len>=SQLANG_BUF_STACK_SIZE-1) { + LM_ERR("script too short or too long %d\n", (script)?script->len:0); return -1; } if(!sqlang_sr_initialized()) @@ -266,8 +267,8 @@ static int w_app_sqlang_dofile(struct sip_msg *msg, char *script, char *extra) */ static int ki_app_sqlang_runstring(sip_msg_t *msg, str *script) { - if(script==NULL || script->s==NULL || script->len>=511) { - LM_ERR("script too short or too long %d\n", script->len); + if(script==NULL || script->s==NULL || script->len>=SQLANG_BUF_STACK_SIZE-1) { + LM_ERR("script too short or too long %d\n", (script)?script->len:0); return -1; } if(!sqlang_sr_initialized()) @@ -311,7 +312,7 @@ static int w_app_sqlang_run(struct sip_msg *msg, char *func, char *p1, char *p2, LM_ERR("cannot get the function\n"); return -1; } - if(s.len>=511) + if(s.len>=SQLANG_BUF_STACK_SIZE-1) { LM_ERR("function too long %d\n", s.len); return -1; @@ -326,7 +327,7 @@ static int w_app_sqlang_run(struct sip_msg *msg, char *func, char *p1, char *p2, LM_ERR("cannot get p1\n"); return -1; } - if(s.len>=511) + if(s.len>=SQLANG_BUF_STACK_SIZE-1) { LM_ERR("p1 too long %d\n", s.len); return -1; @@ -341,7 +342,7 @@ static int w_app_sqlang_run(struct sip_msg *msg, char *func, char *p1, char *p2, LM_ERR("cannot get p2\n"); return -1; } - if(s.len>=511) + if(s.len>=SQLANG_BUF_STACK_SIZE-1) { LM_ERR("p2 too long %d\n", s.len); return -1; @@ -356,7 +357,7 @@ static int w_app_sqlang_run(struct sip_msg *msg, char *func, char *p1, char *p2, LM_ERR("cannot get p3\n"); return -1; } - if(s.len>=511) + if(s.len>=SQLANG_BUF_STACK_SIZE-1) { LM_ERR("p3 too long %d\n", s.len); return -1;
7 years, 4 months
1
0
0
0
git:master:47818cfa: app_lua: safety check for kemi func params used in log message
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 47818cfab2db8ae1df720e959084e7afc22b7876 URL:
https://github.com/kamailio/kamailio/commit/47818cfab2db8ae1df720e959084e7a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-07-01T09:11:12+02:00 app_lua: safety check for kemi func params used in log message - incresed size for local buffers --- Modified: src/modules/app_lua/app_lua_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/47818cfab2db8ae1df720e959084e7a…
Patch:
https://github.com/kamailio/kamailio/commit/47818cfab2db8ae1df720e959084e7a…
--- diff --git a/src/modules/app_lua/app_lua_mod.c b/src/modules/app_lua/app_lua_mod.c index 05ea90c564..4c431dd3ed 100644 --- a/src/modules/app_lua/app_lua_mod.c +++ b/src/modules/app_lua/app_lua_mod.c @@ -207,15 +207,16 @@ static void mod_destroy(void) lua_sr_destroy(); } -static char _lua_buf_stack[4][512]; +#define LUA_BUF_STACK_SIZE 1024 +static char _lua_buf_stack[4][LUA_BUF_STACK_SIZE]; /** * */ static int ki_app_lua_dostring(sip_msg_t *msg, str *script) { - if(script==NULL || script->s==NULL || script->len>=511) { - LM_ERR("script too short or too long %d\n", script->len); + if(script==NULL || script->s==NULL || script->len>=LUA_BUF_STACK_SIZE-1) { + LM_ERR("script too short or too long %d\n", (script)?script->len:0); return -1; } if(!lua_sr_initialized()) { @@ -247,8 +248,8 @@ static int w_app_lua_dostring(struct sip_msg *msg, char *script, char *extra) */ static int ki_app_lua_dofile(sip_msg_t *msg, str *script) { - if(script==NULL || script->s==NULL || script->len>=511) { - LM_ERR("script too short or too long %d\n", script->len); + if(script==NULL || script->s==NULL || script->len>=LUA_BUF_STACK_SIZE-1) { + LM_ERR("script too short or too long %d\n", (script)?script->len:0); return -1; } if(!lua_sr_initialized()) { @@ -278,8 +279,8 @@ static int w_app_lua_dofile(struct sip_msg *msg, char *script, char *extra) */ static int ki_app_lua_runstring(sip_msg_t *msg, str *script) { - if(script==NULL || script->s==NULL || script->len>=511) { - LM_ERR("script too short or too long %d\n", script->len); + if(script==NULL || script->s==NULL || script->len>=LUA_BUF_STACK_SIZE-1) { + LM_ERR("script too short or too long %d\n", (script)?script->len:0); return -1; } if(!lua_sr_initialized()) @@ -328,7 +329,7 @@ static int w_app_lua_run(struct sip_msg *msg, char *func, char *p1, char *p2, LM_ERR("cannot get the function\n"); return -1; } - if(s.len>=511) + if(s.len>=LUA_BUF_STACK_SIZE-1) { LM_ERR("function too long %d\n", s.len); return -1; @@ -343,7 +344,7 @@ static int w_app_lua_run(struct sip_msg *msg, char *func, char *p1, char *p2, LM_ERR("cannot get p1\n"); return -1; } - if(s.len>=511) + if(s.len>=LUA_BUF_STACK_SIZE-1) { LM_ERR("p1 too long %d\n", s.len); return -1; @@ -358,7 +359,7 @@ static int w_app_lua_run(struct sip_msg *msg, char *func, char *p1, char *p2, LM_ERR("cannot get p2\n"); return -1; } - if(s.len>=511) + if(s.len>=LUA_BUF_STACK_SIZE-1) { LM_ERR("p2 too long %d\n", s.len); return -1; @@ -373,7 +374,7 @@ static int w_app_lua_run(struct sip_msg *msg, char *func, char *p1, char *p2, LM_ERR("cannot get p3\n"); return -1; } - if(s.len>=511) + if(s.len>=LUA_BUF_STACK_SIZE-1) { LM_ERR("p3 too long %d\n", s.len); return -1;
7 years, 4 months
1
0
0
0
git:master:84f7905e: app_jsdt: safety check for kemi func params used in log message
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 84f7905e66fb72ebc382034d1e858d06f5c16057 URL:
https://github.com/kamailio/kamailio/commit/84f7905e66fb72ebc382034d1e858d0…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-07-01T09:11:12+02:00 app_jsdt: safety check for kemi func params used in log message - incresed size for local buffers --- Modified: src/modules/app_jsdt/app_jsdt_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/84f7905e66fb72ebc382034d1e858d0…
Patch:
https://github.com/kamailio/kamailio/commit/84f7905e66fb72ebc382034d1e858d0…
--- diff --git a/src/modules/app_jsdt/app_jsdt_mod.c b/src/modules/app_jsdt/app_jsdt_mod.c index c95585d7d2..49f3670ff1 100644 --- a/src/modules/app_jsdt/app_jsdt_mod.c +++ b/src/modules/app_jsdt/app_jsdt_mod.c @@ -192,15 +192,16 @@ int sr_kemi_config_engine_jsdt(sip_msg_t *msg, int rtype, str *rname, return 1; } -static char _jsdt_buf_stack[4][512]; +#define JSDT_BUF_STACK_SIZE 1024 +static char _jsdt_buf_stack[4][JSDT_BUF_STACK_SIZE]; /** * */ static int ki_app_jsdt_dostring(sip_msg_t *msg, str *script) { - if(script==NULL || script->s==NULL || script->len>=511) { - LM_ERR("script too short or too long %d\n", script->len); + if(script==NULL || script->s==NULL || script->len>=JSDT_BUF_STACK_SIZE-1) { + LM_ERR("script too short or too long %d\n", (script)?script->len:0); return -1; } if(!jsdt_sr_initialized()) @@ -232,8 +233,8 @@ static int w_app_jsdt_dostring(struct sip_msg *msg, char *script, char *extra) */ static int ki_app_jsdt_dofile(sip_msg_t *msg, str *script) { - if(script==NULL || script->s==NULL || script->len>=511) { - LM_ERR("script too short or too long %d\n", script->len); + if(script==NULL || script->s==NULL || script->len>=JSDT_BUF_STACK_SIZE-1) { + LM_ERR("script too short or too long %d\n", (script)?script->len:0); return -1; } if(!jsdt_sr_initialized()) @@ -265,8 +266,8 @@ static int w_app_jsdt_dofile(struct sip_msg *msg, char *script, char *extra) */ static int ki_app_jsdt_runstring(sip_msg_t *msg, str *script) { - if(script==NULL || script->s==NULL || script->len>=511) { - LM_ERR("script too short or too long %d\n", script->len); + if(script==NULL || script->s==NULL || script->len>=JSDT_BUF_STACK_SIZE-1) { + LM_ERR("script too short or too long %d\n", (script)?script->len:0); return -1; } if(!jsdt_sr_initialized()) @@ -310,7 +311,7 @@ static int w_app_jsdt_run(struct sip_msg *msg, char *func, char *p1, char *p2, LM_ERR("cannot get the function\n"); return -1; } - if(s.len>=511) + if(s.len>=JSDT_BUF_STACK_SIZE-1) { LM_ERR("function too long %d\n", s.len); return -1; @@ -325,7 +326,7 @@ static int w_app_jsdt_run(struct sip_msg *msg, char *func, char *p1, char *p2, LM_ERR("cannot get p1\n"); return -1; } - if(s.len>=511) + if(s.len>=JSDT_BUF_STACK_SIZE-1) { LM_ERR("p1 too long %d\n", s.len); return -1; @@ -340,7 +341,7 @@ static int w_app_jsdt_run(struct sip_msg *msg, char *func, char *p1, char *p2, LM_ERR("cannot get p2\n"); return -1; } - if(s.len>=511) + if(s.len>=JSDT_BUF_STACK_SIZE-1) { LM_ERR("p2 too long %d\n", s.len); return -1; @@ -355,7 +356,7 @@ static int w_app_jsdt_run(struct sip_msg *msg, char *func, char *p1, char *p2, LM_ERR("cannot get p3\n"); return -1; } - if(s.len>=511) + if(s.len>=JSDT_BUF_STACK_SIZE-1) { LM_ERR("p3 too long %d\n", s.len); return -1;
7 years, 4 months
1
0
0
0
git:master:1cc3f0dd: core: mem - updated defines for sys malloc and mem error log messages
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 1cc3f0ddfc517ed2b1f7820f9feedee8a91d0ac7 URL:
https://github.com/kamailio/kamailio/commit/1cc3f0ddfc517ed2b1f7820f9feedee…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-07-01T09:11:12+02:00 core: mem - updated defines for sys malloc and mem error log messages --- Modified: src/core/mem/mem.h Modified: src/core/mem/pkg.h --- Diff:
https://github.com/kamailio/kamailio/commit/1cc3f0ddfc517ed2b1f7820f9feedee…
Patch:
https://github.com/kamailio/kamailio/commit/1cc3f0ddfc517ed2b1f7820f9feedee…
--- diff --git a/src/core/mem/mem.h b/src/core/mem/mem.h index ae2669b9a6..2a06020f82 100644 --- a/src/core/mem/mem.h +++ b/src/core/mem/mem.h @@ -19,7 +19,7 @@ /** * \defgroup mem Kamailio memory manager * \brief Kamailio internal memory manager - * + * * Kamailio internal memory manager for private (per process) and shared * memory pools. It provides several different strategies for the memory * management, like really fast, with extended debugging and also plain system @@ -29,7 +29,7 @@ /** * \file * \brief Main definitions for memory manager - * + * * \brief Main definitions for memory manager, like malloc, free and realloc * \ingroup mem */ @@ -193,12 +193,12 @@ int init_shm_mallocs(int force_alloc); #endif /** generic logging helper for allocation errors in private memory pool/ system */ -#ifdef SYSTEM_MALLOC -#define PKG_MEM_ERROR LM_ERR("could not allocate private memory from system") +#ifdef SYS_MALLOC +#define PKG_MEM_ERROR LM_ERR("could not allocate private memory from sys pool\n") #else -#define PKG_MEM_ERROR LM_ERR("could not allocate private memory from available pool") +#define PKG_MEM_ERROR LM_ERR("could not allocate private memory from pkg pool\n") #endif /** generic logging helper for allocation errors in shared memory pool */ -#define SHM_MEM_ERROR LM_ERR("could not allocate shared memory from available pool") +#define SHM_MEM_ERROR LM_ERR("could not allocate shared memory from shm pool\n") #endif diff --git a/src/core/mem/pkg.h b/src/core/mem/pkg.h index c107117412..3736625e72 100644 --- a/src/core/mem/pkg.h +++ b/src/core/mem/pkg.h @@ -52,10 +52,12 @@ void pkg_print_manager(void); # define pkg_mod_free_stats(x) _pkg_root.xfmodstats(x) #else /*PKG_MALLOC*/ + /* use system allocator */ +# define SYS_MALLOC # include <stdlib.h> # include "memdbg.h" -# ifdef DBG_SYS_MALLOC +# ifdef DBG_SYS_MEMORY # define pkg_malloc(s) \ ( { void *____v123; ____v123=malloc((s)); \ MDBG("malloc %p size %lu end %p (%s:%d)\n", ____v123, (unsigned long)(s), (char*)____v123+(s), __FILE__, __LINE__);\
7 years, 4 months
1
0
0
0
git:master:cee1de72: Makefile.defs: compile with system malloc for pkg if MEMPKG=sys
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: cee1de72a2b28d002bc84dd205b7ecf9f285fdd4 URL:
https://github.com/kamailio/kamailio/commit/cee1de72a2b28d002bc84dd205b7ecf…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-07-01T09:11:12+02:00 Makefile.defs: compile with system malloc for pkg if MEMPKG=sys - if MEMDBGSYS=1, the use a debug variant for system malloc --- Modified: src/Makefile.defs --- Diff:
https://github.com/kamailio/kamailio/commit/cee1de72a2b28d002bc84dd205b7ecf…
Patch:
https://github.com/kamailio/kamailio/commit/cee1de72a2b28d002bc84dd205b7ecf…
--- diff --git a/src/Makefile.defs b/src/Makefile.defs index 5de375cb02..07f938d400 100644 --- a/src/Makefile.defs +++ b/src/Makefile.defs @@ -653,9 +653,13 @@ C_DEFS= $(extra_defs) \ -D__CPU_$(ARCH) $(os_defs) \ -DSER_VER=$(SER_VER) \ -DCFG_DIR='"$(cfg_target)"'\ - -DRUN_DIR='"$(run_target)"'\ - -DPKG_MALLOC \ - -DSHM_MEM -DSHM_MMAP \ + -DRUN_DIR='"$(run_target)"' + +ifneq ($(MEMPKG), sys) +C_DEFS+= -DPKG_MALLOC +endif + +C_DEFS+= -DSHM_MEM -DSHM_MMAP \ -DDNS_IP_HACK \ -DUSE_MCAST \ -DUSE_TCP \ @@ -682,7 +686,7 @@ C_DEFS= $(extra_defs) \ #-DSTATS \ #-DNO_LOG \ #-DPROFILING \ - #-DNO_SIG_DEBUG + #-DNO_SIG_DEBUG #PROFILE= -pg # set this if you want profiling # you may also want to set -DPROFILING @@ -699,8 +703,16 @@ C_DEFS+= -DF_MALLOC C_DEFS+= -DQ_MALLOC # enable TLSF malloc C_DEFS+= -DTLSF_MALLOC -ifeq ($(MEMDBG), 1) + +ifeq ($(MEMDBG), 1) C_DEFS+= -DDBG_SR_MEMORY + +ifeq ($(MEMPKG), sys) +ifeq ($(MEMDBGSYS), 1) + C_DEFS+= -DDBG_SYS_MEMORY +endif +endif + endif ifneq ($(PKG_MEM_SIZE),)
7 years, 4 months
1
0
0
0
← Newer
1
...
38
39
40
41
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
Results per page:
10
25
50
100
200