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
September 2015
----- 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
37 participants
387 discussions
Start a n
N
ew thread
git:master:093337bc: evapi: debug messages for invalid len and execution of event route
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 093337bc7f3d8d3ce31ad3770252503628bc3599 URL:
https://github.com/kamailio/kamailio/commit/093337bc7f3d8d3ce31ad3770252503…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-09-21T13:05:20+02:00 evapi: debug messages for invalid len and execution of event route --- Modified: modules/evapi/evapi_dispatch.c --- Diff:
https://github.com/kamailio/kamailio/commit/093337bc7f3d8d3ce31ad3770252503…
Patch:
https://github.com/kamailio/kamailio/commit/093337bc7f3d8d3ce31ad3770252503…
--- diff --git a/modules/evapi/evapi_dispatch.c b/modules/evapi/evapi_dispatch.c index fd6ad6c..b0aa8f5 100644 --- a/modules/evapi/evapi_dispatch.c +++ b/modules/evapi/evapi_dispatch.c @@ -327,6 +327,8 @@ void evapi_recv_client(struct ev_loop *loop, struct ev_io *watcher, int revents) k++; } if(k==_evapi_clients[i].rpos+rlen || frame.len<=0) { + LM_DBG("invalid frame len: %d kpos: %d rpos: %u rlen: %lu\n", + frame.len, k, _evapi_clients[i].rpos, rlen); _evapi_clients[i].rpos = 0; return; } @@ -364,6 +366,8 @@ void evapi_recv_client(struct ev_loop *loop, struct ev_io *watcher, int revents) k += frame.len ; evenv.msg.s = frame.s; evenv.msg.len = frame.len; + LM_DBG("executing event route for frame: [%.*s] (%d)\n", + frame.len, frame.s, frame.len); evapi_run_cfg_route(&evenv, _evapi_rts.msg_received); k++; }
9 years, 2 months
1
0
0
0
git:master:2c736877: app_perl: renamed the exported structure "_app_perl_exports" to avoid naming conflicts
by Federico Cabiddu
Module: kamailio Branch: master Commit: 2c736877dc215592f3f8889ffd47e90ab68066af URL:
https://github.com/kamailio/kamailio/commit/2c736877dc215592f3f8889ffd47e90…
Author: Federico Cabiddu <federico.cabiddu(a)gmail.com> Committer: Federico Cabiddu <federico.cabiddu(a)gmail.com> Date: 2015-09-21T12:43:39+02:00 app_perl: renamed the exported structure "_app_perl_exports" to avoid naming conflicts - reported by GH#333 --- Modified: modules/app_perl/app_perl_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/2c736877dc215592f3f8889ffd47e90…
Patch:
https://github.com/kamailio/kamailio/commit/2c736877dc215592f3f8889ffd47e90…
--- diff --git a/modules/app_perl/app_perl_mod.c b/modules/app_perl/app_perl_mod.c index 3089097..0560a7c 100644 --- a/modules/app_perl/app_perl_mod.c +++ b/modules/app_perl/app_perl_mod.c @@ -167,7 +167,7 @@ static mi_export_t mi_cmds[] = { /* * Module interface */ -struct module_exports exports = { +struct module_exports _app_perl_exports = { "app_perl", RTLD_NOW | RTLD_GLOBAL, cmds, /* Exported functions */ @@ -351,7 +351,7 @@ static int mod_init(void) { struct timeval t1; struct timeval t2; - if(register_mi_mod(exports.name, mi_cmds)!=0) + if(register_mi_mod(_app_perl_exports.name, mi_cmds)!=0) { LM_ERR("failed to register MI commands\n"); return -1;
9 years, 2 months
1
0
0
0
git:master:61d531b2: modules/ims_auth: fixed correct fixup for ims_proxy_challenge and removed old unused fixup
by jaybeepee
Module: kamailio Branch: master Commit: 61d531b25b1bee8d34ec7b5bed15660fd2ce3e5d URL:
https://github.com/kamailio/kamailio/commit/61d531b25b1bee8d34ec7b5bed15660…
Author: jaybeepee <jason.penton(a)gmail.com> Committer: jaybeepee <jason.penton(a)gmail.com> Date: 2015-09-21T12:36:04+02:00 modules/ims_auth: fixed correct fixup for ims_proxy_challenge and removed old unused fixup --- Modified: modules/ims_auth/authims_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/61d531b25b1bee8d34ec7b5bed15660…
Patch:
https://github.com/kamailio/kamailio/commit/61d531b25b1bee8d34ec7b5bed15660…
--- diff --git a/modules/ims_auth/authims_mod.c b/modules/ims_auth/authims_mod.c index 0a2ff9d..e17ee6a 100644 --- a/modules/ims_auth/authims_mod.c +++ b/modules/ims_auth/authims_mod.c @@ -67,7 +67,6 @@ static void destroy(void); static int mod_init(void); static int auth_fixup(void** param, int param_no); -static int auth_fixup_async(void** param, int param_no); static int challenge_fixup_async(void** param, int param_no); struct cdp_binds cdpb; @@ -116,7 +115,7 @@ static cmd_export_t cmds[] = { {"ims_www_challenge", (cmd_function) www_challenge3, 3, challenge_fixup_async, 0, REQUEST_ROUTE}, {"ims_www_resync_auth", (cmd_function) www_resync_auth, 2, challenge_fixup_async, 0, REQUEST_ROUTE}, {"ims_proxy_authenticate", (cmd_function) proxy_authenticate, 1, auth_fixup, 0, REQUEST_ROUTE}, - {"ims_proxy_challenge", (cmd_function) proxy_challenge, 2, auth_fixup_async, 0, REQUEST_ROUTE}, + {"ims_proxy_challenge", (cmd_function) proxy_challenge, 3, challenge_fixup_async, 0, REQUEST_ROUTE}, {"bind_ims_auth", (cmd_function) bind_ims_auth, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} }; @@ -295,26 +294,3 @@ static int auth_fixup(void** param, int param_no) { return 0; } - -/* - * Convert the char* parameters - */ -static int auth_fixup_async(void** param, int param_no) { - if (strlen((char*) *param) <= 0) { - LM_ERR("empty parameter %d not allowed\n", param_no); - return -1; - } - - if (param_no == 1) { //route name - static or dynamic string (config vars) - if (fixup_spve_null(param, param_no) < 0) - return -1; - return 0; - } else if (param_no == 2) { - if (fixup_var_str_12(param, 1) == -1) { - LM_ERR("Erroring doing fixup on auth"); - return -1; - } - } - - return 0; -}
9 years, 2 months
1
0
0
0
git:master:d011d623: ims_auth: Fix compilation error after previous commit
by Carsten Bock
Module: kamailio Branch: master Commit: d011d6235573100a96cba6e228808826460a6cfb URL:
https://github.com/kamailio/kamailio/commit/d011d6235573100a96cba6e22880882…
Author: Carsten Bock <carsten(a)ng-voice.com> Committer: Carsten Bock <carsten(a)ng-voice.com> Date: 2015-09-21T11:11:08+02:00 ims_auth: Fix compilation error after previous commit --- Modified: modules/ims_auth/cxdx_mar.c --- Diff:
https://github.com/kamailio/kamailio/commit/d011d6235573100a96cba6e22880882…
Patch:
https://github.com/kamailio/kamailio/commit/d011d6235573100a96cba6e22880882…
--- diff --git a/modules/ims_auth/cxdx_mar.c b/modules/ims_auth/cxdx_mar.c index f359e77..bd898b6 100644 --- a/modules/ims_auth/cxdx_mar.c +++ b/modules/ims_auth/cxdx_mar.c @@ -102,6 +102,7 @@ void async_cdp_callback(int is_timeout, void *param, AAAMessage *maa, long elaps struct cell *t = 0; int result = CSCF_RETURN_TRUE; int sip_number_auth_items; + int items_found = 0; struct auth_data_item_list *adi_list = 0; AAA_AVP *auth_data; auth_data = 0; @@ -168,7 +169,6 @@ void async_cdp_callback(int is_timeout, void *param, AAAMessage *maa, long elaps struct auth_data_item *adi; int adi_len; char *p; - int items_found = 0; while ((cxdx_get_auth_data_item_answer(maa, &auth_data, &item_number, &algorithm, &authenticate, &authorization2, &ck, &ik,
9 years, 2 months
1
0
0
0
git:master:7b8ad7a4: ims_auth: Improved reply, if HSS returned Error
by Carsten Bock
Module: kamailio Branch: master Commit: 7b8ad7a41cc3d327748b12bfba80e9ad9110cb4a URL:
https://github.com/kamailio/kamailio/commit/7b8ad7a41cc3d327748b12bfba80e9a…
Author: Carsten Bock <carsten(a)ng-voice.com> Committer: Carsten Bock <carsten(a)ng-voice.com> Date: 2015-09-21T10:29:47+02:00 ims_auth: Improved reply, if HSS returned Error --- Modified: modules/ims_auth/cxdx_mar.c --- Diff:
https://github.com/kamailio/kamailio/commit/7b8ad7a41cc3d327748b12bfba80e9a…
Patch:
https://github.com/kamailio/kamailio/commit/7b8ad7a41cc3d327748b12bfba80e9a…
9 years, 2 months
1
0
0
0
git:master:19e608f8: tsilot: t_store(...) accepts uri as parameter
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 19e608f803b7198543091bf41c468153567741d3 URL:
https://github.com/kamailio/kamailio/commit/19e608f803b7198543091bf41c46815…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-09-18T22:59:44+02:00 tsilot: t_store(...) accepts uri as parameter - uri can be explicitely given as parameter instead of taking it from r-uri - can help avoiding: backup r-uri, set it to another uri and then restore r-uri from backup --- Modified: modules/tsilo/ts_store.c Modified: modules/tsilo/ts_store.h Modified: modules/tsilo/tsilo.c --- Diff:
https://github.com/kamailio/kamailio/commit/19e608f803b7198543091bf41c46815…
Patch:
https://github.com/kamailio/kamailio/commit/19e608f803b7198543091bf41c46815…
--- diff --git a/modules/tsilo/ts_store.c b/modules/tsilo/ts_store.c index a05a4ef..2cec2ef 100644 --- a/modules/tsilo/ts_store.c +++ b/modules/tsilo/ts_store.c @@ -39,7 +39,7 @@ extern int use_domain; -int ts_store(struct sip_msg* msg) { +int ts_store(struct sip_msg* msg, str *puri) { struct cell *t; str aor; struct sip_uri ruri; @@ -48,12 +48,16 @@ int ts_store(struct sip_msg* msg) { ts_urecord_t* r; int res; - if (msg->new_uri.s!=NULL) { - /* incoming r-uri was chaged by cfg or other component */ - suri = msg->new_uri; + if(puri && puri->s && puri->len>0) { + suri = *puri; } else { - /* no changes to incoming r-uri */ - suri = msg->first_line.u.request.uri; + if (msg->new_uri.s!=NULL) { + /* incoming r-uri was chaged by cfg or other component */ + suri = msg->new_uri; + } else { + /* no changes to incoming r-uri */ + suri = msg->first_line.u.request.uri; + } } if (use_domain) { diff --git a/modules/tsilo/ts_store.h b/modules/tsilo/ts_store.h index 3a3a8a9..824ccc9 100644 --- a/modules/tsilo/ts_store.h +++ b/modules/tsilo/ts_store.h @@ -22,6 +22,6 @@ #ifndef _TS_STORE_H #define _TS_STORE_H -int ts_store(struct sip_msg* msg); +int ts_store(struct sip_msg* msg, str *puri); #endif diff --git a/modules/tsilo/tsilo.c b/modules/tsilo/tsilo.c index 51c1e81..f9bcfa9 100644 --- a/modules/tsilo/tsilo.c +++ b/modules/tsilo/tsilo.c @@ -65,7 +65,8 @@ static int fixup_ts_append_to(void** param, int param_no); static int w_ts_append(struct sip_msg* _msg, char *_table, char *_ruri); static int fixup_ts_append(void** param, int param_no); -static int w_ts_store(struct sip_msg* msg); +static int w_ts_store(struct sip_msg* msg, char *p1, char *p2); +static int w_ts_store1(struct sip_msg* msg, char *_ruri, char *p2); extern stat_var *stored_ruris; extern stat_var *stored_transactions; @@ -80,6 +81,8 @@ static cmd_export_t cmds[]={ fixup_ts_append, 0, REQUEST_ROUTE | FAILURE_ROUTE }, {"ts_store", (cmd_function)w_ts_store, 0, 0 , 0, REQUEST_ROUTE | FAILURE_ROUTE }, + {"ts_store", (cmd_function)w_ts_store1, 1, + fixup_spve_null , 0, REQUEST_ROUTE | FAILURE_ROUTE }, {0,0,0,0,0,0} }; @@ -279,7 +282,22 @@ static int w_ts_append_to(struct sip_msg* msg, char *idx, char *lbl, char *table /** * */ -static int w_ts_store(struct sip_msg* msg) +static int w_ts_store(struct sip_msg* msg, char *p1, char *p2) { - return ts_store(msg); + return ts_store(msg, 0); +} + + +/** + * + */ +static int w_ts_store1(struct sip_msg* msg, char *_ruri, char *p2) +{ + str suri; + + if(fixup_get_svalue(msg, (gparam_t*)_ruri, &suri)!=0) { + LM_ERR("failed to conert r-uri parameter\n"); + return -1; + } + return ts_store(msg, &suri); }
9 years, 2 months
2
2
0
0
git:master:6c7d38ee: core: name of structure exported by a module can be prefixed with module name
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 6c7d38ee0fcbd482ff0527178481345fc93a7fc8 URL:
https://github.com/kamailio/kamailio/commit/6c7d38ee0fcbd482ff0527178481345…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-09-21T09:01:08+02:00 core: name of structure exported by a module can be prefixed with module name - some modules use the flag for global exporting, which can lead to naming conflicts - related to GH#333 --- Modified: sr_module.c --- Diff:
https://github.com/kamailio/kamailio/commit/6c7d38ee0fcbd482ff0527178481345…
Patch:
https://github.com/kamailio/kamailio/commit/6c7d38ee0fcbd482ff0527178481345…
--- diff --git a/sr_module.c b/sr_module.c index 216c953..057bf02 100644 --- a/sr_module.c +++ b/sr_module.c @@ -459,6 +459,8 @@ int load_module(char* mod_path) int new_dlflags; int retries; int path_type; + str expref; + char exbuf[64]; #ifndef RTLD_NOW /* for openbsd */ @@ -611,9 +613,24 @@ int load_module(char* mod_path) } } exp = (union module_exports_u*)dlsym(handle, DLSYM_PREFIX "exports"); - if ( (error =(char*)dlerror())!=0 ){ - LM_ERR("%s\n", error); - goto error1; + if(exp==NULL) { + /* 'exports' structure not found, look up for '_modulename_exports' */ + mdir = strrchr(mod_path, '/'); + if (!mdir) { + expref.s = mod_path; + } else { + expref.s = mdir+1; + } + expref.len = strlen(expref.s); + if(expref.len>3 && strcmp(expref.s+expref.len-3, ".so")==0) + expref.len -= 3; + snprintf(exbuf, 62, DLSYM_PREFIX "_%.*s_exports", expref.len, expref.s); + exp = (union module_exports_u*)dlsym(handle, exbuf); + LM_DBG("looking up exports with name: %s\n", exbuf); + if ( (error =(char*)dlerror())!=0 ){ + LM_ERR("%s\n", error); + goto error1; + } } /* hack to allow for kamailio style dlflags inside exports */ if (*mod_if_ver == 1) {
9 years, 2 months
1
0
0
0
git:master:6177e766: cnxcc: build fake msg for event route before terminating the dialog
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 6177e766035f6bad2d5ee512ccde9a805d026760 URL:
https://github.com/kamailio/kamailio/commit/6177e766035f6bad2d5ee512ccde9a8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-09-20T23:16:35+02:00 cnxcc: build fake msg for event route before terminating the dialog - dialog structure can be deleted in between - reported by GH#324 --- Modified: modules/cnxcc/cnxcc_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/6177e766035f6bad2d5ee512ccde9a8…
Patch:
https://github.com/kamailio/kamailio/commit/6177e766035f6bad2d5ee512ccde9a8…
--- diff --git a/modules/cnxcc/cnxcc_mod.c b/modules/cnxcc/cnxcc_mod.c index 2c7f03e..21242f4 100644 --- a/modules/cnxcc/cnxcc_mod.c +++ b/modules/cnxcc/cnxcc_mod.c @@ -118,7 +118,7 @@ static int __add_call_by_cid(str *cid, call_t *call, credit_type_t type); static call_t *__alloc_new_call_by_time(credit_data_t *credit_data, struct sip_msg *msg, int max_secs); static call_t *__alloc_new_call_by_money(credit_data_t *credit_data, struct sip_msg *msg, double credit, double cost_per_second, int initial_pulse, int final_pulse); -static void __notify_call_termination(sip_data_t *data); +static void __notify_call_termination(sip_msg_t *msg); static void __free_call(call_t *call); static int __has_to_tag(struct sip_msg *msg); static credit_data_t *__alloc_new_credit_data(str *client_id, credit_type_t type); @@ -454,18 +454,8 @@ static void __dialog_terminated_callback(struct dlg_cell *cell, int type, struct __stop_billing(&cell->callid); } -static void __notify_call_termination(sip_data_t *data) { +static void __notify_call_termination(sip_msg_t *msg) { struct run_act_ctx ra_ctx; - struct sip_msg *msg; - - if (_data.cs_route_number < 0) - return; - - if (faked_msg_init_with_dlg_info(&data->callid, &data->from_uri, &data->from_tag, - &data->to_uri, &data->to_tag, &msg) != 0) { - LM_ERR("[%.*s]: error generating faked sip message\n", data->callid.len, data->callid.s); - return; - } init_run_actions_ctx(&ra_ctx); //run_top_route(event_rt.rlist[_data.cs_route_number], msg, &ra_ctx); @@ -958,6 +948,9 @@ static int __shm_str_hash_alloc(struct str_hash_table *ht, int size) { } int terminate_call(call_t *call) { + sip_msg_t *dmsg = NULL; + sip_data_t *data = NULL; + LM_DBG("Got kill signal for call [%.*s] client [%.*s] h_id [%u] h_entry [%u]. Dropping it now\n", call->sip_data.callid.len, call->sip_data.callid.s, @@ -970,6 +963,14 @@ int terminate_call(call_t *call) { struct mi_node *node, *node1 = NULL; struct mi_cmd *end_dlg_cmd = NULL; + if (_data.cs_route_number >= 0) { + data = &call->sip_data; + if (faked_msg_init_with_dlg_info(&data->callid, &data->from_uri, &data->from_tag, + &data->to_uri, &data->to_tag, &dmsg) != 0) { + LM_ERR("[%.*s]: error generating faked sip message\n", data->callid.len, data->callid.s); + dmsg = NULL; + } + } root = init_mi_tree(0, 0, 0); if (root == NULL) { LM_ERR("Error initializing tree to terminate call\n"); @@ -1006,7 +1007,7 @@ int terminate_call(call_t *call) { free_mi_tree(root); free_mi_tree(result); - __notify_call_termination(&call->sip_data); + if(dmsg) __notify_call_termination(dmsg); return 0; }
9 years, 2 months
1
0
0
0
git:4.3:b09ccd2d: mem: f_malloc - properly set empty slot in free hash
by Daniel-Constantin Mierla
Module: kamailio Branch: 4.3 Commit: b09ccd2d16982c16babe5ba71c3e7d94bec71706 URL:
https://github.com/kamailio/kamailio/commit/b09ccd2d16982c16babe5ba71c3e7d9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-09-20T22:36:46+02:00 mem: f_malloc - properly set empty slot in free hash - reported by Juha Heninanen (cherry picked from commit f6400aa19736e3f6acf00f3c79f5ddaaf2acbcee) --- Modified: mem/f_malloc.c --- Diff:
https://github.com/kamailio/kamailio/commit/b09ccd2d16982c16babe5ba71c3e7d9…
Patch:
https://github.com/kamailio/kamailio/commit/b09ccd2d16982c16babe5ba71c3e7d9…
--- diff --git a/mem/f_malloc.c b/mem/f_malloc.c index a62665e..90fa9ca 100644 --- a/mem/f_malloc.c +++ b/mem/f_malloc.c @@ -180,7 +180,10 @@ static inline void fm_extract_free(struct fm_block* qm, struct fm_frag* frag) if(frag->prv_free) { frag->prv_free->u.nxt_free = frag->u.nxt_free; } else { - qm->free_hash[hash].first = frag->u.nxt_free; + if(frag->u.nxt_free!=qm->last_frag) + qm->free_hash[hash].first = frag->u.nxt_free; + else + qm->free_hash[hash].first = NULL; } if(frag->u.nxt_free && frag->u.nxt_free!=qm->last_frag) { frag->u.nxt_free->prv_free = frag->prv_free;
9 years, 2 months
1
0
0
0
git:master:f6400aa1: mem: f_malloc - properly set empty slot in free hash
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: f6400aa19736e3f6acf00f3c79f5ddaaf2acbcee URL:
https://github.com/kamailio/kamailio/commit/f6400aa19736e3f6acf00f3c79f5dda…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-09-20T22:33:57+02:00 mem: f_malloc - properly set empty slot in free hash - reported by Juha Heninanen --- Modified: mem/f_malloc.c --- Diff:
https://github.com/kamailio/kamailio/commit/f6400aa19736e3f6acf00f3c79f5dda…
Patch:
https://github.com/kamailio/kamailio/commit/f6400aa19736e3f6acf00f3c79f5dda…
--- diff --git a/mem/f_malloc.c b/mem/f_malloc.c index 90efda2..b0376eb 100644 --- a/mem/f_malloc.c +++ b/mem/f_malloc.c @@ -180,7 +180,10 @@ static inline void fm_extract_free(struct fm_block* qm, struct fm_frag* frag) if(frag->prv_free) { frag->prv_free->u.nxt_free = frag->u.nxt_free; } else { - qm->free_hash[hash].first = frag->u.nxt_free; + if(frag->u.nxt_free!=qm->last_frag) + qm->free_hash[hash].first = frag->u.nxt_free; + else + qm->free_hash[hash].first = NULL; } if(frag->u.nxt_free && frag->u.nxt_free!=qm->last_frag) { frag->u.nxt_free->prv_free = frag->prv_free;
9 years, 2 months
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
39
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
Results per page:
10
25
50
100
200