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
February 2019
----- 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
336 discussions
Start a n
N
ew thread
git:5.2:534a5233: jsonrpcs: Fix memleak with srjson_doc_t
by Henning Westerholt
Module: kamailio Branch: 5.2 Commit: 534a5233a025af26b1b4ddcb504d21902fdc5094 URL:
https://github.com/kamailio/kamailio/commit/534a5233a025af26b1b4ddcb504d219…
Author: Alex Hermann <alex(a)hexla.nl> Committer: Henning Westerholt <hw(a)kamailio.org> Date: 2019-02-05T21:17:49+01:00 jsonrpcs: Fix memleak with srjson_doc_t (cherry picked from commit 8e5742ff1657bdb2adce357fc6f1a2e04fd913c6) --- Modified: src/modules/jsonrpcs/jsonrpcs_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/534a5233a025af26b1b4ddcb504d219…
Patch:
https://github.com/kamailio/kamailio/commit/534a5233a025af26b1b4ddcb504d219…
--- diff --git a/src/modules/jsonrpcs/jsonrpcs_mod.c b/src/modules/jsonrpcs/jsonrpcs_mod.c index 3169a104cc..8049779e55 100644 --- a/src/modules/jsonrpcs/jsonrpcs_mod.c +++ b/src/modules/jsonrpcs/jsonrpcs_mod.c @@ -1251,6 +1251,7 @@ static int jsonrpc_dispatch(sip_msg_t* msg, char* s1, char* s2) if(ctx->jreq->root == NULL) { LM_ERR("invalid json doc [[%s]]\n", ctx->jreq->buf.s); + srjson_DeleteDoc(ctx->jreq); return NONSIP_MSG_ERROR; } ctx->transport = JSONRPC_TRANS_HTTP; @@ -1296,6 +1297,7 @@ static int jsonrpc_dispatch(sip_msg_t* msg, char* s1, char* s2) if (!ctx->reply_sent && !(ctx->flags&JSONRPC_DELAYED_REPLY_F)) { ret = jsonrpc_send(ctx); } + srjson_DeleteDoc(ctx->jreq); jsonrpc_clean_context(ctx); if (ret < 0) return -1; return 1;
5 years, 9 months
1
0
0
0
git:5.1:4bc686a1: dispatcher: Fix memleak in destination attributes
by Henning Westerholt
Module: kamailio Branch: 5.1 Commit: 4bc686a1fbbd4a3431d327d6ecf45daf3d8e509b URL:
https://github.com/kamailio/kamailio/commit/4bc686a1fbbd4a3431d327d6ecf45da…
Author: Alex Hermann <alex(a)hexla.nl> Committer: Henning Westerholt <hw(a)kamailio.org> Date: 2019-02-05T21:26:28+01:00 dispatcher: Fix memleak in destination attributes (cherry picked from commit 614b6b05028ea8d364f7acb95a6367f7c9ea1a6d) --- Modified: src/modules/dispatcher/dispatch.c --- Diff:
https://github.com/kamailio/kamailio/commit/4bc686a1fbbd4a3431d327d6ecf45da…
Patch:
https://github.com/kamailio/kamailio/commit/4bc686a1fbbd4a3431d327d6ecf45da…
--- diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c index 7e246e577d..6377df682b 100644 --- a/src/modules/dispatcher/dispatch.c +++ b/src/modules/dispatcher/dispatch.c @@ -424,6 +424,8 @@ ds_dest_t *pack_dest(str iuri, int flags, int priority, str *attrs) if(dp != NULL) { if(dp->uri.s != NULL) shm_free(dp->uri.s); + if(dp->attrs.body.s != NULL) + shm_free(dp->attrs.body.s); shm_free(dp); } @@ -480,6 +482,8 @@ int add_dest2list(int id, str uri, int flags, int priority, str *attrs, if(dp != NULL) { if(dp->uri.s != NULL) shm_free(dp->uri.s); + if(dp->attrs.body.s != NULL) + shm_free(dp->attrs.body.s); shm_free(dp); } @@ -3031,6 +3035,10 @@ void ds_avl_destroy(ds_set_t **node_ptr) shm_free(dest->uri.s); dest->uri.s = NULL; } + if (dest->attrs.body.s != NULL) { + shm_free(dest->attrs.body.s); + dest->attrs.body.s = NULL; + } } if(node->dlist != NULL) shm_free(node->dlist);
5 years, 9 months
1
0
0
0
git:5.1:f23f1a86: dispatcher: Stop searching if entry is found
by Henning Westerholt
Module: kamailio Branch: 5.1 Commit: f23f1a86064c82a717d5920f41c17aad1e76b026 URL:
https://github.com/kamailio/kamailio/commit/f23f1a86064c82a717d5920f41c17aa…
Author: Alex Hermann <alex(a)hexla.nl> Committer: Henning Westerholt <hw(a)kamailio.org> Date: 2019-02-05T21:26:11+01:00 dispatcher: Stop searching if entry is found (cherry picked from commit 7a66f44506e4897fef68b5ff927cf276678d3473) --- Modified: src/modules/dispatcher/dispatch.c --- Diff:
https://github.com/kamailio/kamailio/commit/f23f1a86064c82a717d5920f41c17aa…
Patch:
https://github.com/kamailio/kamailio/commit/f23f1a86064c82a717d5920f41c17aa…
--- diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c index e40d02e974..7e246e577d 100644 --- a/src/modules/dispatcher/dispatch.c +++ b/src/modules/dispatcher/dispatch.c @@ -2362,7 +2362,6 @@ int ds_update_latency(int group, str *address, int code) int ds_get_state(int group, str *address) { int i = 0; - int state = 0; ds_set_t *idx = NULL; if(_ds_list == NULL || _ds_list_nr <= 0) { @@ -2381,11 +2380,11 @@ int ds_get_state(int group, str *address) && strncasecmp(idx->dlist[i].uri.s, address->s, address->len) == 0) { /* destination address found */ - state = idx->dlist[i].flags; + return idx->dlist[i].flags; } i++; } - return state; + return 0; } /**
5 years, 9 months
1
0
0
0
git:5.1:26cfea05: jansson: Fix reverse logic for JSON boolean
by Henning Westerholt
Module: kamailio Branch: 5.1 Commit: 26cfea05082fbd2c4236510397986ace2b495b0f URL:
https://github.com/kamailio/kamailio/commit/26cfea05082fbd2c4236510397986ac…
Author: Alex Hermann <alex(a)hexla.nl> Committer: Henning Westerholt <hw(a)kamailio.org> Date: 2019-02-05T21:25:49+01:00 jansson: Fix reverse logic for JSON boolean (cherry picked from commit 0125c1c8d8c1179670def9dc4b3e66d6a8e58360) --- Modified: src/modules/jansson/jansson_utils.c --- Diff:
https://github.com/kamailio/kamailio/commit/26cfea05082fbd2c4236510397986ac…
Patch:
https://github.com/kamailio/kamailio/commit/26cfea05082fbd2c4236510397986ac…
--- diff --git a/src/modules/jansson/jansson_utils.c b/src/modules/jansson/jansson_utils.c index 29ffc306f6..ae2040bc7c 100644 --- a/src/modules/jansson/jansson_utils.c +++ b/src/modules/jansson/jansson_utils.c @@ -45,7 +45,7 @@ int jansson_to_val(pv_value_t* val, char** freeme, json_t* v) { val->rs.len = strlen(value); val->flags = PV_VAL_STR; }else if(json_is_boolean(v)) { - val->ri = json_is_true(v) ? 0 : 1; + val->ri = json_is_true(v) ? 1 : 0; val->flags = PV_TYPE_INT|PV_VAL_INT; }else if(json_is_real(v)) { char* value = NULL;
5 years, 9 months
1
0
0
0
git:5.1:3de32c77: siputils: Return true if options_reply() succeeds
by Henning Westerholt
Module: kamailio Branch: 5.1 Commit: 3de32c77ae628bfa11f8a826e5eb4607a435a828 URL:
https://github.com/kamailio/kamailio/commit/3de32c77ae628bfa11f8a826e5eb460…
Author: Alex Hermann <alex(a)hexla.nl> Committer: Henning Westerholt <hw(a)kamailio.org> Date: 2019-02-05T21:25:36+01:00 siputils: Return true if options_reply() succeeds (cherry picked from commit 73d29ddde2b38cfea2c9ca4a84f4b8a246b7da50) --- Modified: src/modules/siputils/options.c --- Diff:
https://github.com/kamailio/kamailio/commit/3de32c77ae628bfa11f8a826e5eb460…
Patch:
https://github.com/kamailio/kamailio/commit/3de32c77ae628bfa11f8a826e5eb460…
--- diff --git a/src/modules/siputils/options.c b/src/modules/siputils/options.c index 67cf07856d..484c65f75f 100644 --- a/src/modules/siputils/options.c +++ b/src/modules/siputils/options.c @@ -112,7 +112,7 @@ int opt_reply(struct sip_msg* _msg, char* _foo, char* _bar) { return -1; } else - return 0; + return 1; } else { pkg_free(rpl_hf.s); LM_ERR("add_lump_rpl failed\n"); @@ -124,6 +124,6 @@ int opt_reply(struct sip_msg* _msg, char* _foo, char* _bar) { return -1; } else - return 0; + return 1; }
5 years, 9 months
1
0
0
0
git:5.1:c931f285: dispatcher: Don't take modulus of hash twice
by Henning Westerholt
Module: kamailio Branch: 5.1 Commit: c931f2859a0762f48d41f1c2dbaf522d33c72cba URL:
https://github.com/kamailio/kamailio/commit/c931f2859a0762f48d41f1c2dbaf522…
Author: Alex Hermann <alex(a)hexla.nl> Committer: Henning Westerholt <hw(a)kamailio.org> Date: 2019-02-05T21:25:17+01:00 dispatcher: Don't take modulus of hash twice (cherry picked from commit 5b23ce265b43adda75731a90fdf1a3a47daa3a51) --- Modified: src/modules/dispatcher/dispatch.c --- Diff:
https://github.com/kamailio/kamailio/commit/c931f2859a0762f48d41f1c2dbaf522…
Patch:
https://github.com/kamailio/kamailio/commit/c931f2859a0762f48d41f1c2dbaf522…
--- diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c index bf99b7836e..e40d02e974 100644 --- a/src/modules/dispatcher/dispatch.c +++ b/src/modules/dispatcher/dispatch.c @@ -1878,7 +1878,7 @@ int ds_select_dst_limit( } break; case DS_ALG_RANDOM: /* 6 - random selection */ - hash = kam_rand() % idx->nr; + hash = kam_rand(); break; case DS_ALG_HASHPV: /* 7 - hash on PV value */ if(ds_hash_pvar(msg, &hash) != 0) {
5 years, 9 months
1
0
0
0
git:5.1:0a885dab: jsonrpcs: Fix memleak with srjson_doc_t
by Henning Westerholt
Module: kamailio Branch: 5.1 Commit: 0a885dab3dd4a54dd7a6948bf25629fd6681770a URL:
https://github.com/kamailio/kamailio/commit/0a885dab3dd4a54dd7a6948bf25629f…
Author: Alex Hermann <alex(a)hexla.nl> Committer: Henning Westerholt <hw(a)kamailio.org> Date: 2019-02-05T21:17:54+01:00 jsonrpcs: Fix memleak with srjson_doc_t (cherry picked from commit 8e5742ff1657bdb2adce357fc6f1a2e04fd913c6) --- Modified: src/modules/jsonrpcs/jsonrpcs_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/0a885dab3dd4a54dd7a6948bf25629f…
Patch:
https://github.com/kamailio/kamailio/commit/0a885dab3dd4a54dd7a6948bf25629f…
--- diff --git a/src/modules/jsonrpcs/jsonrpcs_mod.c b/src/modules/jsonrpcs/jsonrpcs_mod.c index 886872d379..ca614d55b6 100644 --- a/src/modules/jsonrpcs/jsonrpcs_mod.c +++ b/src/modules/jsonrpcs/jsonrpcs_mod.c @@ -1253,6 +1253,7 @@ static int jsonrpc_dispatch(sip_msg_t* msg, char* s1, char* s2) if(ctx->jreq->root == NULL) { LM_ERR("invalid json doc [[%s]]\n", ctx->jreq->buf.s); + srjson_DeleteDoc(ctx->jreq); return NONSIP_MSG_ERROR; } ctx->transport = JSONRPC_TRANS_HTTP; @@ -1298,6 +1299,7 @@ static int jsonrpc_dispatch(sip_msg_t* msg, char* s1, char* s2) if (!ctx->reply_sent && !(ctx->flags&JSONRPC_DELAYED_REPLY_F)) { ret = jsonrpc_send(ctx); } + srjson_DeleteDoc(ctx->jreq); jsonrpc_clean_context(ctx); if (ret < 0) return -1; return 1;
5 years, 9 months
1
0
0
0
git:master:8e5742ff: jsonrpcs: Fix memleak with srjson_doc_t
by Henning Westerholt
Module: kamailio Branch: master Commit: 8e5742ff1657bdb2adce357fc6f1a2e04fd913c6 URL:
https://github.com/kamailio/kamailio/commit/8e5742ff1657bdb2adce357fc6f1a2e…
Author: Alex Hermann <alex(a)hexla.nl> Committer: Henning Westerholt <henningw(a)users.noreply.github.com> Date: 2019-02-05T21:11:03+01:00 jsonrpcs: Fix memleak with srjson_doc_t --- Modified: src/modules/jsonrpcs/jsonrpcs_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/8e5742ff1657bdb2adce357fc6f1a2e…
Patch:
https://github.com/kamailio/kamailio/commit/8e5742ff1657bdb2adce357fc6f1a2e…
--- diff --git a/src/modules/jsonrpcs/jsonrpcs_mod.c b/src/modules/jsonrpcs/jsonrpcs_mod.c index 3169a104cc..8049779e55 100644 --- a/src/modules/jsonrpcs/jsonrpcs_mod.c +++ b/src/modules/jsonrpcs/jsonrpcs_mod.c @@ -1251,6 +1251,7 @@ static int jsonrpc_dispatch(sip_msg_t* msg, char* s1, char* s2) if(ctx->jreq->root == NULL) { LM_ERR("invalid json doc [[%s]]\n", ctx->jreq->buf.s); + srjson_DeleteDoc(ctx->jreq); return NONSIP_MSG_ERROR; } ctx->transport = JSONRPC_TRANS_HTTP; @@ -1296,6 +1297,7 @@ static int jsonrpc_dispatch(sip_msg_t* msg, char* s1, char* s2) if (!ctx->reply_sent && !(ctx->flags&JSONRPC_DELAYED_REPLY_F)) { ret = jsonrpc_send(ctx); } + srjson_DeleteDoc(ctx->jreq); jsonrpc_clean_context(ctx); if (ret < 0) return -1; return 1;
5 years, 9 months
1
0
0
0
git:master:4038a604: jansson: Log column on parse error
by Henning Westerholt
Module: kamailio Branch: master Commit: 4038a6046bc34c92313817549c93a9f16e993032 URL:
https://github.com/kamailio/kamailio/commit/4038a6046bc34c92313817549c93a9f…
Author: Alex Hermann <alex(a)hexla.nl> Committer: Henning Westerholt <henningw(a)users.noreply.github.com> Date: 2019-02-05T21:11:03+01:00 jansson: Log column on parse error --- Modified: src/modules/jansson/jansson_funcs.c --- Diff:
https://github.com/kamailio/kamailio/commit/4038a6046bc34c92313817549c93a9f…
Patch:
https://github.com/kamailio/kamailio/commit/4038a6046bc34c92313817549c93a9f…
--- diff --git a/src/modules/jansson/jansson_funcs.c b/src/modules/jansson/jansson_funcs.c index 012f1aba40..7eceae4e96 100644 --- a/src/modules/jansson/jansson_funcs.c +++ b/src/modules/jansson/jansson_funcs.c @@ -41,9 +41,9 @@ int janssonmod_get_helper(sip_msg_t* msg, str *path_s, str *src_s, pv_spec_t *ds json = json_loads(src_s->s, JSON_REJECT_DUPLICATES, &parsing_error); if(!json) { - ERR("failed to parse: %.*s\n", src_s->len, src_s->s); - ERR("json error at line %d: %s\n", - parsing_error.line, parsing_error.text); + ERR("failed to parse json: %.*s\n", src_s->len, src_s->s); + ERR("json error at line %d, col %d: %s\n", + parsing_error.line, parsing_error.column, parsing_error.text); goto fail; }
5 years, 9 months
1
0
0
0
git:master:5b23ce26: dispatcher: Don't take modulus of hash twice
by Henning Westerholt
Module: kamailio Branch: master Commit: 5b23ce265b43adda75731a90fdf1a3a47daa3a51 URL:
https://github.com/kamailio/kamailio/commit/5b23ce265b43adda75731a90fdf1a3a…
Author: Alex Hermann <alex(a)hexla.nl> Committer: Henning Westerholt <henningw(a)users.noreply.github.com> Date: 2019-02-05T21:11:03+01:00 dispatcher: Don't take modulus of hash twice --- Modified: src/modules/dispatcher/dispatch.c --- Diff:
https://github.com/kamailio/kamailio/commit/5b23ce265b43adda75731a90fdf1a3a…
Patch:
https://github.com/kamailio/kamailio/commit/5b23ce265b43adda75731a90fdf1a3a…
--- diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c index 9255e9eae6..2a4fd853b2 100644 --- a/src/modules/dispatcher/dispatch.c +++ b/src/modules/dispatcher/dispatch.c @@ -2089,7 +2089,7 @@ int ds_manage_routes(sip_msg_t *msg, ds_select_state_t *rstate) } break; case DS_ALG_RANDOM: /* 6 - random selection */ - hash = kam_rand() % idx->nr; + hash = kam_rand(); break; case DS_ALG_HASHPV: /* 7 - hash on PV value */ if(ds_hash_pvar(msg, &hash) != 0) {
5 years, 9 months
1
0
0
0
← Newer
1
...
27
28
29
30
31
32
33
34
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
Results per page:
10
25
50
100
200