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
January 2024
----- 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
19 participants
311 discussions
Start a n
N
ew thread
git:master:e49a60e1: tls: OpenSSL 3.x thread-local, init libssl in thread or PROC_SIPINIT
by S-P Chan
Module: kamailio Branch: master Commit: e49a60e1052c6c1dcebe7f78f2ac970338eabe2e URL:
https://github.com/kamailio/kamailio/commit/e49a60e1052c6c1dcebe7f78f2ac970…
Author: S-P Chan <shihping.chan(a)gmail.com> Committer: S-P Chan <shihping.chan(a)gmail.com> Date: 2024-01-04T20:28:41+08:00 tls: OpenSSL 3.x thread-local, init libssl in thread or PROC_SIPINIT - avoid initialising ERR_STATE in rank 0(thread#1) --- Modified: src/modules/tls/tls_init.c Modified: src/modules/tls/tls_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/e49a60e1052c6c1dcebe7f78f2ac970…
Patch:
https://github.com/kamailio/kamailio/commit/e49a60e1052c6c1dcebe7f78f2ac970…
--- diff --git a/src/modules/tls/tls_init.c b/src/modules/tls/tls_init.c index 9be5e1d4fab..ec62cf7669e 100644 --- a/src/modules/tls/tls_init.c +++ b/src/modules/tls/tls_init.c @@ -771,6 +771,44 @@ int tls_pre_init(void) * tls mod pre-init function * - executed before any mod_init() */ +long tls_h_mod_randctx(void *) { + do { + OSSL_LIB_CTX *osslglobal = NULL; + EVP_RAND_CTX *randctx = NULL; + + LM_DBG("enabling locking for rand ctx\n"); + + osslglobal = OSSL_LIB_CTX_get0_global_default(); + if(osslglobal == NULL) { + LM_ERR("failed to get lib ssl global ctx\n"); + return -1L; + } + + randctx = RAND_get0_primary(osslglobal); + if(randctx == NULL) { + LM_ERR("primary rand ctx is null\n"); + return -1L; + } + EVP_RAND_enable_locking(randctx); + + randctx = RAND_get0_public(osslglobal); + if(randctx == NULL) { + LM_ERR("public rand ctx is null\n"); + return -1L; + } + EVP_RAND_enable_locking(randctx); + + randctx = RAND_get0_private(osslglobal); + if(randctx == NULL) { + LM_ERR("private rand ctx is null\n"); + return -1L; + } + EVP_RAND_enable_locking(randctx); + } while(0); + + return 0L; +} + int tls_h_mod_pre_init_f(void) { if(tls_mod_preinitialized == 1) { @@ -784,7 +822,9 @@ int tls_h_mod_pre_init_f(void) LM_DBG("preparing tls env for modules initialization\n"); #if OPENSSL_VERSION_NUMBER >= 0x010100000L && !defined(LIBRESSL_VERSION_NUMBER) LM_DBG("preparing tls env for modules initialization (libssl >=1.1)\n"); -#if OPENSSL_VERSION_NUMBER >= 0x010101000L +#if OPENSSL_VERSION_NUMBER >= 0x030000000L + // skip init for 3.x +#elif OPENSSL_VERSION_NUMBER >= 0x010101000L OPENSSL_init_ssl(OPENSSL_INIT_ATFORK, NULL); #else OPENSSL_init_ssl(0, NULL); @@ -793,42 +833,17 @@ int tls_h_mod_pre_init_f(void) LM_DBG("preparing tls env for modules initialization (libssl <=1.0)\n"); SSL_library_init(); #endif +#if OPENSSL_VERSION_NUMBER < 0x030000000L SSL_load_error_strings(); +#endif #if OPENSSL_VERSION_NUMBER >= 0x030000000L - do { - OSSL_LIB_CTX *osslglobal = NULL; - EVP_RAND_CTX *randctx = NULL; - - LM_DBG("enabling locking for rand ctx\n"); - - osslglobal = OSSL_LIB_CTX_get0_global_default(); - if(osslglobal == NULL) { - LM_ERR("failed to get lib ssl global ctx\n"); - return -1; - } - - randctx = RAND_get0_primary(osslglobal); - if(randctx == NULL) { - LM_ERR("primary rand ctx is null\n"); - return -1; - } - EVP_RAND_enable_locking(randctx); - - randctx = RAND_get0_public(osslglobal); - if(randctx == NULL) { - LM_ERR("public rand ctx is null\n"); - return -1; - } - EVP_RAND_enable_locking(randctx); - - randctx = RAND_get0_private(osslglobal); - if(randctx == NULL) { - LM_ERR("private rand ctx is null\n"); - return -1; - } - EVP_RAND_enable_locking(randctx); - } while(0); + pthread_t tid; + long rl; + pthread_create(&tid, NULL, (void *(*)(void *))tls_h_mod_randctx, NULL); + pthread_join(tid, (void **)&rl); + if ((int)rl) + return (int)rl; #endif tls_mod_preinitialized = 1; diff --git a/src/modules/tls/tls_mod.c b/src/modules/tls/tls_mod.c index 3a047769ca4..1e74ba0e309 100644 --- a/src/modules/tls/tls_mod.c +++ b/src/modules/tls/tls_mod.c @@ -440,7 +440,16 @@ static int mod_child(int rank) /* fix tls config only from the main proc/PROC_INIT., when we know * the exact process number and before any other process starts*/ - if(rank == PROC_INIT) { + +#if OPENSSL_VERSION_NUMBER >= 0x030000000L + /* + * OpenSSL 3.x: create shared SSL_CTX* in worker to avoid init of + * libssl in rank 0(thread#1) + */ + if(rank == PROC_SIPINIT) { +#else + if(rank == PROC_INIT) { +#endif if(cfg_get(tls, tls_cfg, config_file).s) { if(tls_fix_domains_cfg( *tls_domains_cfg, &srv_defaults, &cli_defaults)
11 months, 3 weeks
1
0
0
0
git:master:aef9cec3: core: avoid C99 error
by Morten Tryfoss
Module: kamailio Branch: master Commit: aef9cec329893f58b0c7df5aec2050b6c3cecc60 URL:
https://github.com/kamailio/kamailio/commit/aef9cec329893f58b0c7df5aec2050b…
Author: Morten Tryfoss <morten(a)tryfoss.no> Committer: Morten Tryfoss <morten(a)tryfoss.no> Date: 2024-01-04T13:26:26+01:00 core: avoid C99 error --- Modified: src/core/parser/parse_diversion.c --- Diff:
https://github.com/kamailio/kamailio/commit/aef9cec329893f58b0c7df5aec2050b…
Patch:
https://github.com/kamailio/kamailio/commit/aef9cec329893f58b0c7df5aec2050b…
--- diff --git a/src/core/parser/parse_diversion.c b/src/core/parser/parse_diversion.c index d60d0cbdd1f..92690296935 100644 --- a/src/core/parser/parse_diversion.c +++ b/src/core/parser/parse_diversion.c @@ -210,7 +210,8 @@ int parse_diversion_header(struct sip_msg *msg) int free_diversion_body(diversion_body_t *div_b) { - for(int i = 0; i < div_b->num_ids; i++) { + int i = 0; + for(i = 0; i < div_b->num_ids; i++) { /* Free to_body pointer parameters */ if(div_b->id[i].param_lst) { free_to_params(&(div_b->id[i]));
11 months, 3 weeks
1
0
0
0
git:master:f67bfe4a: rtpengine: clang-format file and skip-wrap of exported structures
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: f67bfe4a183b2b629d3ac741ecb95bcc4b669b37 URL:
https://github.com/kamailio/kamailio/commit/f67bfe4a183b2b629d3ac741ecb95bc…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2024-01-04T12:52:50+01:00 rtpengine: clang-format file and skip-wrap of exported structures --- Modified: src/modules/rtpengine/rtpengine.c --- Diff:
https://github.com/kamailio/kamailio/commit/f67bfe4a183b2b629d3ac741ecb95bc…
Patch:
https://github.com/kamailio/kamailio/commit/f67bfe4a183b2b629d3ac741ecb95bc…
11 months, 3 weeks
1
0
0
0
git:master:aab734e7: rtpengine: unsigned error field of 1-bit to prevent signness warnings
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: aab734e7a31a9df2dc731e849005ce6bb00d534e URL:
https://github.com/kamailio/kamailio/commit/aab734e7a31a9df2dc731e849005ce6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2024-01-04T12:46:23+01:00 rtpengine: unsigned error field of 1-bit to prevent signness warnings --- Modified: src/modules/rtpengine/bencode.h --- Diff:
https://github.com/kamailio/kamailio/commit/aab734e7a31a9df2dc731e849005ce6…
Patch:
https://github.com/kamailio/kamailio/commit/aab734e7a31a9df2dc731e849005ce6…
--- diff --git a/src/modules/rtpengine/bencode.h b/src/modules/rtpengine/bencode.h index 8f3b434e7ac..1a3562d9d49 100644 --- a/src/modules/rtpengine/bencode.h +++ b/src/modules/rtpengine/bencode.h @@ -47,7 +47,7 @@ struct bencode_buffer { struct __bencode_buffer_piece *pieces; struct __bencode_free_list *free_list; - int error : 1; /* set to !0 if allocation failed at any point */ + unsigned int error : 1; /* set to !0 if allocation failed at any point */ };
11 months, 3 weeks
1
0
0
0
git:master:ad136593: kamctl: dbtextdb/dbtextdb_test - do not store unused result of query
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: ad1365935e2f021095e6e14aca03da54d3862d5b URL:
https://github.com/kamailio/kamailio/commit/ad1365935e2f021095e6e14aca03da5…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2024-01-04T12:20:56+01:00 kamctl: dbtextdb/dbtextdb_test - do not store unused result of query --- Modified: utils/kamctl/dbtextdb/dbtextdb_test.py --- Diff:
https://github.com/kamailio/kamailio/commit/ad1365935e2f021095e6e14aca03da5…
Patch:
https://github.com/kamailio/kamailio/commit/ad1365935e2f021095e6e14aca03da5…
--- diff --git a/utils/kamctl/dbtextdb/dbtextdb_test.py b/utils/kamctl/dbtextdb/dbtextdb_test.py index 54ce274c725..8762de1b3da 100644 --- a/utils/kamctl/dbtextdb/dbtextdb_test.py +++ b/utils/kamctl/dbtextdb/dbtextdb_test.py @@ -500,7 +500,7 @@ def testExecute(self): db_conn.CleanUp() query = ('delete from unsorted_table where id = 5;') - result = db_conn.Execute(query, writethru) + db_conn.Execute(query, writethru) self.assertEqual(db_conn.data, [{'id': 1, 'user': 'fred', 'domain': '
test.com
', 'number': 2125551234}, {'id': 4, 'user': 'alex', 'domain': @@ -514,7 +514,7 @@ def testExecute(self): # test insert with auto increment query = ("insert into unsorted_table set user='jake', domain='
test.com
'," 'number = 2125551456;') - result = db_conn.Execute(query, writethru) + db_conn.Execute(query, writethru) self.assertEqual(db_conn.data, [{'id': 1, 'user': 'fred', 'domain': '
test.com
', 'number': 2125551234}, {'id': 4, 'user': 'alex', 'domain': @@ -531,7 +531,7 @@ def testExecute(self): # test insert with null value query = ("insert into test set col1='asdf';") - result = db_conn.Execute(query, writethru) + db_conn.Execute(query, writethru) self.assertEqual(db_conn.data, [{'col2': 'item2', 'id': 1, 'col1': 'item1\\:'}, {'col2': '', 'id': 2, 'col1': @@ -543,7 +543,7 @@ def testExecute(self): # test insert with null value alternate syntax query = ("insert test ( col1) values ('asdf');") - result = db_conn.Execute(query, writethru) + db_conn.Execute(query, writethru) self.assertEqual(db_conn.data, [{'col2': 'item2', 'id': 1, 'col1': 'item1\\:'}, {'col2': '', 'id': 2, 'col1': @@ -555,7 +555,7 @@ def testExecute(self): # test insert with colon inside value query = ("insert into test set col1='as:df';") - result = db_conn.Execute(query, writethru) + db_conn.Execute(query, writethru) self.assertEqual(db_conn.data, [{'col2': 'item2', 'id': 1, 'col1': 'item1\\:'}, {'col2': '', 'id': 2, 'col1': @@ -567,7 +567,7 @@ def testExecute(self): # test insert with escaped colon inside value query = ("insert into test set col1='as\:df';") - result = db_conn.Execute(query, writethru) + db_conn.Execute(query, writethru) self.assertEqual(db_conn.data, [{'col2': 'item2', 'id': 1, 'col1': 'item1\\:'}, {'col2': '', 'id': 2, 'col1': @@ -589,7 +589,7 @@ def testExecute(self): # test update with null value query = ("update test set col2='' where id = 3;") - result = db_conn.Execute(query, writethru) + db_conn.Execute(query, writethru) self.assertEqual(db_conn.data, [{'col2': 'item2', 'id': 1, 'col1': 'item1\\:'}, {'col2': '', 'id': 2, 'col1':
11 months, 3 weeks
1
0
0
0
git:master:42b22b6e: lcr: added module prefix to db_url global variable
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 42b22b6e2d91d907cbf80b499b9e4380def2e652 URL:
https://github.com/kamailio/kamailio/commit/42b22b6e2d91d907cbf80b499b9e438…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2024-01-03T22:18:58+01:00 lcr: added module prefix to db_url global variable - safety for symbols overlapping --- Modified: src/modules/lcr/lcr_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/42b22b6e2d91d907cbf80b499b9e438…
Patch:
https://github.com/kamailio/kamailio/commit/42b22b6e2d91d907cbf80b499b9e438…
--- diff --git a/src/modules/lcr/lcr_mod.c b/src/modules/lcr/lcr_mod.c index 4f0cfae70a9..242054ebaa4 100644 --- a/src/modules/lcr/lcr_mod.c +++ b/src/modules/lcr/lcr_mod.c @@ -135,7 +135,7 @@ gen_lock_t *reload_lock; /* database variables */ /* clang-format off */ -static str db_url = str_init(DEFAULT_RODB_URL); +static str lcr_db_url = str_init(DEFAULT_RODB_URL); static str lcr_rule_table = str_init(LCR_RULE_TABLE); static str lcr_rule_target_table = str_init(LCR_RULE_TARGET_TABLE); static str lcr_gw_table = str_init(LCR_GW_TABLE); @@ -313,7 +313,7 @@ static cmd_export_t cmds[] = { * Exported parameters */ static param_export_t params[] = { - {"db_url", PARAM_STR, &db_url}, + {"db_url", PARAM_STR, &lcr_db_url}, {"lcr_rule_table", PARAM_STR, &lcr_rule_table}, {"lcr_rule_target_table", PARAM_STR, &lcr_rule_target_table}, {"lcr_gw_table", PARAM_STR, &lcr_gw_table}, @@ -455,7 +455,7 @@ static int mod_init(void) } /* Bind database */ - if(lcr_db_bind(&db_url)) { + if(lcr_db_bind(&lcr_db_url)) { LM_ERR("no database module found\n"); return -1; } @@ -692,7 +692,7 @@ static int mod_init(void) } /* Check table version */ - if(lcr_db_init(&db_url) < 0) { + if(lcr_db_init(&lcr_db_url) < 0) { LM_ERR("unable to open database connection\n"); return -1; } @@ -1484,7 +1484,7 @@ int reload_tables() request_uri_re = from_uri_re = 0; - if(lcr_db_init(&db_url) < 0) { + if(lcr_db_init(&lcr_db_url) < 0) { LM_ERR("unable to open database connection\n"); return -1; }
11 months, 3 weeks
1
0
0
0
git:master:f0fbf4d7: dmq: rename global variables with short name
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: f0fbf4d74b8090614469b2a6a16f187275c4f067 URL:
https://github.com/kamailio/kamailio/commit/f0fbf4d74b8090614469b2a6a16f187…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2024-01-03T22:14:32+01:00 dmq: rename global variables with short name - safety for symbols overlapping --- Modified: src/modules/dmq/dmq.c Modified: src/modules/dmq/dmq.h Modified: src/modules/dmq/dmq_funcs.c Modified: src/modules/dmq/message.c Modified: src/modules/dmq/worker.c --- Diff:
https://github.com/kamailio/kamailio/commit/f0fbf4d74b8090614469b2a6a16f187…
Patch:
https://github.com/kamailio/kamailio/commit/f0fbf4d74b8090614469b2a6a16f187…
11 months, 3 weeks
1
0
0
0
git:master:ae90cb48: xhttp_rpc: rename global variable with short name
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: ae90cb489cd07aac42994fbaa124966a34cd4514 URL:
https://github.com/kamailio/kamailio/commit/ae90cb489cd07aac42994fbaa124966…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2024-01-02T16:20:59+01:00 xhttp_rpc: rename global variable with short name --- Modified: src/modules/xhttp_rpc/xhttp_rpc.c --- Diff:
https://github.com/kamailio/kamailio/commit/ae90cb489cd07aac42994fbaa124966…
Patch:
https://github.com/kamailio/kamailio/commit/ae90cb489cd07aac42994fbaa124966…
--- diff --git a/src/modules/xhttp_rpc/xhttp_rpc.c b/src/modules/xhttp_rpc/xhttp_rpc.c index 1e305a91909..3b43469fd16 100644 --- a/src/modules/xhttp_rpc/xhttp_rpc.c +++ b/src/modules/xhttp_rpc/xhttp_rpc.c @@ -72,7 +72,7 @@ static int xhttp_rpc_dispatch(sip_msg_t *msg, char *s1, char *s2); * being currently processed. * @sa rpc_ctx */ -static rpc_ctx_t ctx; +static rpc_ctx_t _xhttp_rpc_ctx; static xhttp_api_t xhttp_api; @@ -841,64 +841,65 @@ static int ki_xhttp_rpc_dispatch(sip_msg_t *msg) } /* Init xhttp_rpc context */ - if(ctx.reply.buf.s) - LM_ERR("Unexpected buf value [%p][%d]\n", ctx.reply.buf.s, - ctx.reply.buf.len); - memset(&ctx, 0, sizeof(rpc_ctx_t)); - ctx.msg = msg; - ctx.mod = ctx.cmd = -1; - if(init_xhttp_rpc_reply(&ctx) < 0) + if(_xhttp_rpc_ctx.reply.buf.s) + LM_ERR("Unexpected buf value [%p][%d]\n", _xhttp_rpc_ctx.reply.buf.s, + _xhttp_rpc_ctx.reply.buf.len); + memset(&_xhttp_rpc_ctx, 0, sizeof(rpc_ctx_t)); + _xhttp_rpc_ctx.msg = msg; + _xhttp_rpc_ctx.mod = _xhttp_rpc_ctx.cmd = -1; + if(init_xhttp_rpc_reply(&_xhttp_rpc_ctx) < 0) goto send_reply; /* Extract arguments from url */ if(0 - != xhttp_rpc_parse_url( - &msg->first_line.u.request.uri, &ctx.mod, &ctx.cmd, &arg)) { - rpc_fault(&ctx, 500, "Bad URL"); + != xhttp_rpc_parse_url(&msg->first_line.u.request.uri, + &_xhttp_rpc_ctx.mod, &_xhttp_rpc_ctx.cmd, &arg)) { + rpc_fault(&_xhttp_rpc_ctx, 500, "Bad URL"); goto send_reply; } if(arg.s) { if(arg.len) { /* Unescape args */ - ctx.arg.s = pkg_malloc((arg.len + 1) * sizeof(char)); - if(ctx.arg.s == NULL) { + _xhttp_rpc_ctx.arg.s = pkg_malloc((arg.len + 1) * sizeof(char)); + if(_xhttp_rpc_ctx.arg.s == NULL) { PKG_MEM_ERROR; - rpc_fault(&ctx, 500, "Internal Server Error (oom)"); + rpc_fault(&_xhttp_rpc_ctx, 500, "Internal Server Error (oom)"); goto send_reply; } for(i = 0; i < arg.len; i++) if(arg.s[i] == '+') arg.s[i] = ' '; - if(0 > un_escape(&arg, &ctx.arg)) { + if(0 > un_escape(&arg, &_xhttp_rpc_ctx.arg)) { LM_ERR("unable to escape [%.*s]\n", arg.len, arg.s); - rpc_fault(&ctx, 500, "Bad arg in URL"); + rpc_fault(&_xhttp_rpc_ctx, 500, "Bad arg in URL"); goto send_reply; } - ctx.arg.s[ctx.arg.len] = '\0'; - ctx.arg.len++; - ctx.arg2scan = ctx.arg; + _xhttp_rpc_ctx.arg.s[_xhttp_rpc_ctx.arg.len] = '\0'; + _xhttp_rpc_ctx.arg.len++; + _xhttp_rpc_ctx.arg2scan = _xhttp_rpc_ctx.arg; } - ctx.arg_received = 1; + _xhttp_rpc_ctx.arg_received = 1; } else { goto send_reply; } /* - rpc_e=find_rpc_export((char*)rpc_sarray[xhttp_rpc_mod_cmds[ctx.mod].rpc_e_index+ctx.cmd]->name, 0); + rpc_e=find_rpc_export((char*)rpc_sarray[xhttp_rpc_mod_cmds[_xhttp_rpc_ctx.mod].rpc_e_index+_xhttp_rpc_ctx.cmd]->name, 0); if ((rpc_e==NULL) || (rpc_e->function==NULL)){ LM_ERR("Unable to find rpc command [%s]\n", - rpc_sarray[xhttp_rpc_mod_cmds[ctx.mod].rpc_e_index+ctx.cmd]->name); - rpc_fault(&ctx, 500, "Method not found"); + rpc_sarray[xhttp_rpc_mod_cmds[_xhttp_rpc_ctx.mod].rpc_e_index+_xhttp_rpc_ctx.cmd]->name); + rpc_fault(&_xhttp_rpc_ctx, 500, "Method not found"); goto send_reply; } */ - rpc_e = rpc_sarray[xhttp_rpc_mod_cmds[ctx.mod].rpc_e_index + ctx.cmd]; - rpc_e->r.function(&func_param, &ctx); + rpc_e = rpc_sarray[xhttp_rpc_mod_cmds[_xhttp_rpc_ctx.mod].rpc_e_index + + _xhttp_rpc_ctx.cmd]; + rpc_e->r.function(&func_param, &_xhttp_rpc_ctx); send_reply: - if(!ctx.reply_sent) { - ret = rpc_send(&ctx); + if(!_xhttp_rpc_ctx.reply_sent) { + ret = rpc_send(&_xhttp_rpc_ctx); } if(ret < 0) return -1;
11 months, 3 weeks
1
0
0
0
git:master:b48c5662: p_usrloc: rename global variable with short name
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: b48c566218b15cac62cd1cc9dc838d241de73efd URL:
https://github.com/kamailio/kamailio/commit/b48c566218b15cac62cd1cc9dc838d2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2024-01-02T10:41:17+01:00 p_usrloc: rename global variable with short name --- Modified: src/modules/p_usrloc/ul_db.c Modified: src/modules/p_usrloc/ul_db.h Modified: src/modules/p_usrloc/ul_db_watch.c --- Diff:
https://github.com/kamailio/kamailio/commit/b48c566218b15cac62cd1cc9dc838d2…
Patch:
https://github.com/kamailio/kamailio/commit/b48c566218b15cac62cd1cc9dc838d2…
11 months, 3 weeks
1
0
0
0
git:master:4af2452f: sms: renamed short global variables with common names
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 4af2452fa9362f4df913003370b0a5279070f372 URL:
https://github.com/kamailio/kamailio/commit/4af2452fa9362f4df913003370b0a52…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2024-01-02T10:24:50+01:00 sms: renamed short global variables with common names --- Modified: src/modules/sms/sms.c Modified: src/modules/sms/sms_funcs.c Modified: src/modules/sms/sms_funcs.h --- Diff:
https://github.com/kamailio/kamailio/commit/4af2452fa9362f4df913003370b0a52…
Patch:
https://github.com/kamailio/kamailio/commit/4af2452fa9362f4df913003370b0a52…
11 months, 3 weeks
1
0
0
0
← Newer
1
...
28
29
30
31
32
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
Results per page:
10
25
50
100
200