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
August 2015
----- 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
30 participants
191 discussions
Start a n
N
ew thread
git:master:ec2a72d7: geoip: set null termination to the field used for query
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: ec2a72d75dc0a2c9c3d88361094fdda7a7477935 URL:
https://github.com/kamailio/kamailio/commit/ec2a72d75dc0a2c9c3d88361094fdda…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-08-28T12:31:59+02:00 geoip: set null termination to the field used for query --- Modified: modules/geoip/geoip_pv.c --- Diff:
https://github.com/kamailio/kamailio/commit/ec2a72d75dc0a2c9c3d88361094fdda…
Patch:
https://github.com/kamailio/kamailio/commit/ec2a72d75dc0a2c9c3d88361094fdda…
--- diff --git a/modules/geoip/geoip_pv.c b/modules/geoip/geoip_pv.c index 46c4dff..ba12f16 100644 --- a/modules/geoip/geoip_pv.c +++ b/modules/geoip/geoip_pv.c @@ -422,7 +422,7 @@ int geoip_update_pv(str *tomatch, str *name) } strncpy(gr->tomatch, tomatch->s, tomatch->len); - tomatch->s[tomatch->len] = '\0'; + gr->tomatch[tomatch->len] = '\0'; gr->record = GeoIP_record_by_name(_handle_GeoIP, (const char*)gr->tomatch); LM_DBG("attempt to match: %s\n", gr->tomatch);
9 years, 3 months
1
0
0
0
git:master:2ebcb840: utils: Fix buffer overflow; do not NULL-terminate HTTP result
by Carsten Bock
Module: kamailio Branch: master Commit: 2ebcb840b189d9a992923cdd32d80764987a5923 URL:
https://github.com/kamailio/kamailio/commit/2ebcb840b189d9a992923cdd32d8076…
Author: Carsten Bock <carsten(a)ng-voice.com> Committer: Carsten Bock <carsten(a)ng-voice.com> Date: 2015-08-28T12:11:25+02:00 utils: Fix buffer overflow; do not NULL-terminate HTTP result Fix buffer overflow in the `write_function` that takes the resulting data from libcurl. The function was trying to NULL terminate the string, but this could result in overwriting the buffer by one byte when size*nmemb == 1. This also caused some memory corruptions, reported on sr-dev. Reported by: Travis Cross <tc(a)traviscross.com> --- Modified: modules/utils/functions.c --- Diff:
https://github.com/kamailio/kamailio/commit/2ebcb840b189d9a992923cdd32d8076…
Patch:
https://github.com/kamailio/kamailio/commit/2ebcb840b189d9a992923cdd32d8076…
--- diff --git a/modules/utils/functions.c b/modules/utils/functions.c index 2d06403..e049056 100644 --- a/modules/utils/functions.c +++ b/modules/utils/functions.c @@ -2,7 +2,7 @@ * script functions of utils module * * Copyright (C) 2008 Juha Heinanen - * Copyright (C) 2013 Carsten Bock, ng-voice GmbH + * Copyright (C) 2013-2015 Carsten Bock, ng-voice GmbH * * This file is part of Kamailio, a free SIP server. * @@ -55,7 +55,7 @@ size_t write_function( void *ptr, size_t size, size_t nmemb, void *stream_ptr) http_res_stream_t *stream = (http_res_stream_t *) stream_ptr; stream->buf = (char *) pkg_realloc(stream->buf, stream->curr_size + - (size * nmemb) + 1); + (size * nmemb)); if (stream->buf == NULL) { LM_ERR("cannot allocate memory for stream\n"); @@ -64,15 +64,12 @@ size_t write_function( void *ptr, size_t size, size_t nmemb, void *stream_ptr) memcpy(&stream->buf[stream->pos], (char *) ptr, (size * nmemb)); - stream->curr_size += ((size * nmemb) + 1); + stream->curr_size += (size * nmemb); stream->pos += (size * nmemb); - stream->buf[stream->pos + 1] = '\0'; - return size * nmemb; } - /* * Performs http_query and saves possible result (first body line of reply) * to pvar.
9 years, 3 months
1
0
0
0
git:master:eb4644db: usrloc: regenerated the readme
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: eb4644dbe52e705273f1f5e15777006fd0ee5356 URL:
https://github.com/kamailio/kamailio/commit/eb4644dbe52e705273f1f5e15777006…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-08-28T11:19:01+02:00 usrloc: regenerated the readme --- Modified: modules/usrloc/README --- Diff:
https://github.com/kamailio/kamailio/commit/eb4644dbe52e705273f1f5e15777006…
Patch:
https://github.com/kamailio/kamailio/commit/eb4644dbe52e705273f1f5e15777006…
9 years, 3 months
1
0
0
0
git:master:ac2882e1: rr: regenerated the readme
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: ac2882e1e6e7da4c151a6aa9fe8ee4c0bf9cd543 URL:
https://github.com/kamailio/kamailio/commit/ac2882e1e6e7da4c151a6aa9fe8ee4c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-08-28T11:19:01+02:00 rr: regenerated the readme --- Modified: modules/rr/README --- Diff:
https://github.com/kamailio/kamailio/commit/ac2882e1e6e7da4c151a6aa9fe8ee4c…
Patch:
https://github.com/kamailio/kamailio/commit/ac2882e1e6e7da4c151a6aa9fe8ee4c…
9 years, 3 months
1
0
0
0
git:master:d71d746d: auth: regenerated the readme
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: d71d746d3f9c84f2aa4e822404a1c3fe5c7da122 URL:
https://github.com/kamailio/kamailio/commit/d71d746d3f9c84f2aa4e822404a1c3f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-08-28T11:19:01+02:00 auth: regenerated the readme --- Modified: modules/auth/README --- Diff:
https://github.com/kamailio/kamailio/commit/d71d746d3f9c84f2aa4e822404a1c3f…
Patch:
https://github.com/kamailio/kamailio/commit/d71d746d3f9c84f2aa4e822404a1c3f…
9 years, 3 months
1
0
0
0
git:master:c7f94fd9: dmq_usrloc: check existence of usrloc domain before continuing.
by Charles Chance
Module: kamailio Branch: master Commit: c7f94fd94500270828fcc4cb3011c60c67a8936b URL:
https://github.com/kamailio/kamailio/commit/c7f94fd94500270828fcc4cb3011c60…
Author: Charles Chance <charles.chance(a)sipcentric.com> Committer: Charles Chance <charles.chance(a)sipcentric.com> Date: 2015-08-28T07:58:13+01:00 dmq_usrloc: check existence of usrloc domain before continuing. --- Modified: modules/dmq_usrloc/usrloc_sync.c --- Diff:
https://github.com/kamailio/kamailio/commit/c7f94fd94500270828fcc4cb3011c60…
Patch:
https://github.com/kamailio/kamailio/commit/c7f94fd94500270828fcc4cb3011c60…
--- diff --git a/modules/dmq_usrloc/usrloc_sync.c b/modules/dmq_usrloc/usrloc_sync.c index 172d188..06ef6b6 100644 --- a/modules/dmq_usrloc/usrloc_sync.c +++ b/modules/dmq_usrloc/usrloc_sync.c @@ -51,7 +51,10 @@ static int add_contact(str aor, ucontact_info_t* ci) str contact; int res; - dmq_ul.get_udomain("location", &_d); + if (dmq_ul.get_udomain("location", &_d) < 0) { + LM_ERR("Failed to get domain\n"); + return -1; + } res = dmq_ul.get_urecord(_d, &aor, &r); if (res < 0) { LM_ERR("failed to retrieve record from usrloc\n"); @@ -98,7 +101,10 @@ static int delete_contact(str aor, ucontact_info_t* ci) urecord_t* r; ucontact_t* c; - dmq_ul.get_udomain("location", &_d); + if (dmq_ul.get_udomain("location", &_d) < 0) { + LM_ERR("Failed to get domain\n"); + return -1; + } if (dmq_ul.get_urecord_by_ruid(_d, dmq_ul.get_aorhash(&aor), &ci->ruid, &r, &c) != 0) {
9 years, 3 months
1
0
0
0
git:master:2c199d4f: xlog: regenerated the readme
by Elena-Ramona Modroiu
Module: kamailio Branch: master Commit: 2c199d4f8a92a3ad9665dd3ea3079799b26c32d5 URL:
https://github.com/kamailio/kamailio/commit/2c199d4f8a92a3ad9665dd3ea307979…
Author: Elena-Ramona Modroiu <ramona(a)asipto.com> Committer: Elena-Ramona Modroiu <ramona(a)asipto.com> Date: 2015-08-27T19:02:53+02:00 xlog: regenerated the readme --- Modified: modules/xlog/README --- Diff:
https://github.com/kamailio/kamailio/commit/2c199d4f8a92a3ad9665dd3ea307979…
Patch:
https://github.com/kamailio/kamailio/commit/2c199d4f8a92a3ad9665dd3ea307979…
9 years, 3 months
1
0
0
0
git:master:4eb52469: xlog: documented new functions
by Elena-Ramona Modroiu
Module: kamailio Branch: master Commit: 4eb52469c0f99262737cea445b66b239a32fd629 URL:
https://github.com/kamailio/kamailio/commit/4eb52469c0f99262737cea445b66b23…
Author: Elena-Ramona Modroiu <ramona(a)asipto.com> Committer: Elena-Ramona Modroiu <ramona(a)asipto.com> Date: 2015-08-27T19:02:53+02:00 xlog: documented new functions - xinfo(), xnotice(), xwarn(), xerr(), xbug(), xcrit(), xalert() --- Modified: modules/xlog/doc/xlog_admin.xml --- Diff:
https://github.com/kamailio/kamailio/commit/4eb52469c0f99262737cea445b66b23…
Patch:
https://github.com/kamailio/kamailio/commit/4eb52469c0f99262737cea445b66b23…
9 years, 3 months
1
0
0
0
git:master:15153d5f: xlog: convenience functions for various log levels
by Elena-Ramona Modroiu
Module: kamailio Branch: master Commit: 15153d5f528efa1238e6c8c6b1a5f91018ba06ef URL:
https://github.com/kamailio/kamailio/commit/15153d5f528efa1238e6c8c6b1a5f91…
Author: Elena-Ramona Modroiu <ramona(a)asipto.com> Committer: Elena-Ramona Modroiu <ramona(a)asipto.com> Date: 2015-08-27T19:02:53+02:00 xlog: convenience functions for various log levels - xinfo(), xnotice(), xwarn(), xerr(), xbug(), xcrit(), xalert() --- Modified: modules/xlog/xlog.c --- Diff:
https://github.com/kamailio/kamailio/commit/15153d5f528efa1238e6c8c6b1a5f91…
Patch:
https://github.com/kamailio/kamailio/commit/15153d5f528efa1238e6c8c6b1a5f91…
--- diff --git a/modules/xlog/xlog.c b/modules/xlog/xlog.c index 61947af..efe2c8b 100644 --- a/modules/xlog/xlog.c +++ b/modules/xlog/xlog.c @@ -88,6 +88,13 @@ static int xlog_1(struct sip_msg*, char*, char*); static int xlog_2(struct sip_msg*, char*, char*); static int xlog_3(struct sip_msg*, char*, char*, char*); static int xdbg(struct sip_msg*, char*, char*); +static int xinfo(struct sip_msg*, char*, char*); +static int xnotice(struct sip_msg*, char*, char*); +static int xwarn(struct sip_msg*, char*, char*); +static int xerr(struct sip_msg*, char*, char*); +static int xbug(struct sip_msg*, char*, char*); +static int xcrit(struct sip_msg*, char*, char*); +static int xalert(struct sip_msg*, char*, char*); static int xlogl_1(struct sip_msg*, char*, char*); static int xlogl_2(struct sip_msg*, char*, char*); @@ -138,6 +145,13 @@ static cmd_export_t cmds[]={ {"xlog", (cmd_function)xlog_2, 2, xlog_fixup, 0, ANY_ROUTE}, {"xlog", (cmd_function)xlog_3, 3, xlog3_fixup, 0, ANY_ROUTE}, {"xdbg", (cmd_function)xdbg, 1, xdbg_fixup, 0, ANY_ROUTE}, + {"xinfo", (cmd_function)xinfo, 1, xdbg_fixup, 0, ANY_ROUTE}, + {"xnotice",(cmd_function)xnotice, 1, xdbg_fixup, 0, ANY_ROUTE}, + {"xwarn", (cmd_function)xwarn, 1, xdbg_fixup, 0, ANY_ROUTE}, + {"xerr", (cmd_function)xerr, 1, xdbg_fixup, 0, ANY_ROUTE}, + {"xbug", (cmd_function)xbug, 1, xdbg_fixup, 0, ANY_ROUTE}, + {"xcrit", (cmd_function)xcrit, 1, xdbg_fixup, 0, ANY_ROUTE}, + {"xalert", (cmd_function)xalert, 1, xdbg_fixup, 0, ANY_ROUTE}, {"xlogl", (cmd_function)xlogl_1, 1, xdbgl_fixup, 0, ANY_ROUTE}, {"xlogl", (cmd_function)xlogl_2, 2, xlogl_fixup, 0, ANY_ROUTE}, {"xlogl", (cmd_function)xlogl_3, 3, xlogl3_fixup,0, ANY_ROUTE}, @@ -391,6 +405,76 @@ static int xdbg(struct sip_msg* msg, char* frm, char* str2) } /** + * print log message to L_INFO level + */ +static int xinfo(struct sip_msg* msg, char* frm, char* str2) +{ + if(!is_printable(L_INFO)) + return 1; + return xlog_helper(msg, (xl_msg_t*)frm, L_INFO, 0, NOFACILITY); +} + +/** + * print log message to L_NOTICE level + */ +static int xnotice(struct sip_msg* msg, char* frm, char* str2) +{ + if(!is_printable(L_NOTICE)) + return 1; + return xlog_helper(msg, (xl_msg_t*)frm, L_NOTICE, 0, NOFACILITY); +} + +/** + * print log message to L_WARN level + */ +static int xwarn(struct sip_msg* msg, char* frm, char* str2) +{ + if(!is_printable(L_WARN)) + return 1; + return xlog_helper(msg, (xl_msg_t*)frm, L_WARN, 0, NOFACILITY); +} + +/** + * print log message to L_ERR level + */ +static int xerr(struct sip_msg* msg, char* frm, char* str2) +{ + if(!is_printable(L_ERR)) + return 1; + return xlog_helper(msg, (xl_msg_t*)frm, L_ERR, 0, NOFACILITY); +} + +/** + * print log message to L_BUG level + */ +static int xbug(struct sip_msg* msg, char* frm, char* str2) +{ + if(!is_printable(L_BUG)) + return 1; + return xlog_helper(msg, (xl_msg_t*)frm, L_BUG, 0, NOFACILITY); +} + +/** + * print log message to L_CRIT level + */ +static int xcrit(struct sip_msg* msg, char* frm, char* str2) +{ + if(!is_printable(L_CRIT2)) + return 1; + return xlog_helper(msg, (xl_msg_t*)frm, L_CRIT2, 0, NOFACILITY); +} + +/** + * print log message to L_ALERT level + */ +static int xalert(struct sip_msg* msg, char* frm, char* str2) +{ + if(!is_printable(L_ALERT)) + return 1; + return xlog_helper(msg, (xl_msg_t*)frm, L_ALERT, 0, NOFACILITY); +} + +/** * print log message to L_DBG level along with cfg line */ static int xdbgl(struct sip_msg* msg, char* frm, char* str2)
9 years, 3 months
1
0
0
0
git:master:ec0ba37b: jsonrpc-c: proper error handling for pipe cmd callback
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: ec0ba37b9f2b6c60303227ea0527d69896f2930e URL:
https://github.com/kamailio/kamailio/commit/ec0ba37b9f2b6c60303227ea0527d69…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-08-27T15:58:48+02:00 jsonrpc-c: proper error handling for pipe cmd callback - credits to Hugh Waite for spotting missing return - free vars if already set when error handling is done --- Modified: modules/jsonrpc-c/jsonrpc_io.c --- Diff:
https://github.com/kamailio/kamailio/commit/ec0ba37b9f2b6c60303227ea0527d69…
Patch:
https://github.com/kamailio/kamailio/commit/ec0ba37b9f2b6c60303227ea0527d69…
--- diff --git a/modules/jsonrpc-c/jsonrpc_io.c b/modules/jsonrpc-c/jsonrpc_io.c index 42d16be..aac3eab 100644 --- a/modules/jsonrpc-c/jsonrpc_io.c +++ b/modules/jsonrpc-c/jsonrpc_io.c @@ -144,6 +144,11 @@ int (*res_cb)(json_object*, char*, int) = &result_cb; void cmd_pipe_cb(int fd, short event, void *arg) { struct jsonrpc_pipe_cmd *cmd; + char *ns = 0; + size_t bytes; + json_object *payload = NULL; + jsonrpc_request_t *req = NULL; + json_object *params; /* struct event *ev = (struct event*)arg; */ if (read(fd, &cmd, sizeof(cmd)) != sizeof(cmd)) { @@ -151,9 +156,7 @@ void cmd_pipe_cb(int fd, short event, void *arg) return; } - json_object *params = json_tokener_parse(cmd->params); - json_object *payload = NULL; - jsonrpc_request_t *req = NULL; + params = json_tokener_parse(cmd->params); if (cmd->notify_only) { payload = build_jsonrpc_notification(cmd->method, params); @@ -169,7 +172,6 @@ void cmd_pipe_cb(int fd, short event, void *arg) } char *json = (char*)json_object_get_string(payload); - char *ns; size_t bytes; bytes = netstring_encode_new(&ns, json, (size_t)strlen(json)); struct jsonrpc_server_group *g; @@ -240,7 +242,11 @@ void cmd_pipe_cb(int fd, short event, void *arg) pkg_free(ns); json_object_put(payload); if (cmd->notify_only) free_pipe_cmd(cmd); + return; + error: + if(ns) pkg_free(ns); + if(payload) json_object_put(payload); if (cmd->notify_only) free_pipe_cmd(cmd); return; }
9 years, 3 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
20
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Results per page:
10
25
50
100
200