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
July 2017
----- 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
23 participants
410 discussions
Start a n
N
ew thread
git:master:4363b863: db_postgres: handle return code for setsockopt()
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 4363b863e9dcd3b31c1d2b2febd9b11c40ec3eec URL:
https://github.com/kamailio/kamailio/commit/4363b863e9dcd3b31c1d2b2febd9b11…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-07-21T08:52:44+02:00 db_postgres: handle return code for setsockopt() --- Modified: src/modules/db_postgres/pg_con.c --- Diff:
https://github.com/kamailio/kamailio/commit/4363b863e9dcd3b31c1d2b2febd9b11…
Patch:
https://github.com/kamailio/kamailio/commit/4363b863e9dcd3b31c1d2b2febd9b11…
--- diff --git a/src/modules/db_postgres/pg_con.c b/src/modules/db_postgres/pg_con.c index 7b8085c8ac..851685d353 100644 --- a/src/modules/db_postgres/pg_con.c +++ b/src/modules/db_postgres/pg_con.c @@ -302,8 +302,14 @@ int pg_con_connect(db_con_t* con) #if defined(SO_KEEPALIVE) && defined(TCP_KEEPIDLE) if (pg_keepalive) { i = 1; - setsockopt(PQsocket(pcon->con), SOL_SOCKET, SO_KEEPALIVE, &i, sizeof(i)); - setsockopt(PQsocket(pcon->con), IPPROTO_TCP, TCP_KEEPIDLE, &pg_keepalive, sizeof(pg_keepalive)); + if(setsockopt(PQsocket(pcon->con), SOL_SOCKET, SO_KEEPALIVE, &i, + sizeof(i))<0) { + LM_WARN("failed to set socket option keepalive\n"); + } + if(setsockopt(PQsocket(pcon->con), IPPROTO_TCP, TCP_KEEPIDLE, + &pg_keepalive, sizeof(pg_keepalive))<0) { + M_WARN("failed to set socket option keepidle\n"); + } } #endif
7 years, 5 months
1
0
0
0
git:master:cbc5502e: db_cluster: free in case of error
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: cbc5502e23f58b50cb11124defe0b7ad618899b6 URL:
https://github.com/kamailio/kamailio/commit/cbc5502e23f58b50cb11124defe0b7a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-07-21T08:52:11+02:00 db_cluster: free in case of error --- Modified: src/modules/db_cluster/dbcl_data.c --- Diff:
https://github.com/kamailio/kamailio/commit/cbc5502e23f58b50cb11124defe0b7a…
Patch:
https://github.com/kamailio/kamailio/commit/cbc5502e23f58b50cb11124defe0b7a…
--- diff --git a/src/modules/db_cluster/dbcl_data.c b/src/modules/db_cluster/dbcl_data.c index 47f9444d19..66c3d30e24 100644 --- a/src/modules/db_cluster/dbcl_data.c +++ b/src/modules/db_cluster/dbcl_data.c @@ -115,6 +115,7 @@ int dbcl_init_con(str *name, str *url) if(sc->sinfo==NULL) { LM_ERR("no shm memory\n"); + pkg_free(sc); return -1; } memset(sc->sinfo, 0, sizeof(dbcl_shared_t));
7 years, 5 months
1
0
0
0
git:master:b441903c: avp: removed history, coherent indentation
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: b441903c6c109aaa35c3b4781c268f9497a00fc6 URL:
https://github.com/kamailio/kamailio/commit/b441903c6c109aaa35c3b4781c268f9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-07-21T08:51:26+02:00 avp: removed history, coherent indentation --- Modified: src/modules/avp/avp.c --- Diff:
https://github.com/kamailio/kamailio/commit/b441903c6c109aaa35c3b4781c268f9…
Patch:
https://github.com/kamailio/kamailio/commit/b441903c6c109aaa35c3b4781c268f9…
7 years, 5 months
1
0
0
0
git:master:dc00778d: app_python: free buf in case of get exception error
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: dc00778decd5a7c91208fb1ae31d875677a2b9de URL:
https://github.com/kamailio/kamailio/commit/dc00778decd5a7c91208fb1ae31d875…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-07-21T08:45:18+02:00 app_python: free buf in case of get exception error --- Modified: src/modules/app_python/python_support.c --- Diff:
https://github.com/kamailio/kamailio/commit/dc00778decd5a7c91208fb1ae31d875…
Patch:
https://github.com/kamailio/kamailio/commit/dc00778decd5a7c91208fb1ae31d875…
--- diff --git a/src/modules/app_python/python_support.c b/src/modules/app_python/python_support.c index 57a14d0b08..b48bf2c8b3 100644 --- a/src/modules/app_python/python_support.c +++ b/src/modules/app_python/python_support.c @@ -54,6 +54,7 @@ void python_handle_exception(const char *fmt, ...) PyErr_Clear(); if (exception == NULL) { LM_ERR("Can't get traceback, PyErr_Fetch() has failed.\n"); + if (srcbuf) pkg_free(srcbuf); return; }
7 years, 5 months
1
0
0
0
git:master:5c883b5f: core: pvapi - added free_pvname_list()
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 5c883b5ff70ad24befd5191be41502e6e35fec88 URL:
https://github.com/kamailio/kamailio/commit/5c883b5ff70ad24befd5191be41502e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-07-21T08:44:37+02:00 core: pvapi - added free_pvname_list() --- Modified: src/core/pvapi.c Modified: src/core/pvar.h --- Diff:
https://github.com/kamailio/kamailio/commit/5c883b5ff70ad24befd5191be41502e…
Patch:
https://github.com/kamailio/kamailio/commit/5c883b5ff70ad24befd5191be41502e…
--- diff --git a/src/core/pvapi.c b/src/core/pvapi.c index 93f07a5755..2f85783ea4 100644 --- a/src/core/pvapi.c +++ b/src/core/pvapi.c @@ -1470,6 +1470,19 @@ pvname_list_t* parse_pvname_list(str *in, unsigned int type) return NULL; } +/** + * + */ +void free_pvname_list(pvname_list_t* head) +{ + pvname_list_t* al; + + while(head) { + al = head; + head=head->next; + pkg_free(al); + } +} /** destroy the content of pv_spec_t structure. diff --git a/src/core/pvar.h b/src/core/pvar.h index b82198d841..62ab78267f 100644 --- a/src/core/pvar.h +++ b/src/core/pvar.h @@ -201,6 +201,7 @@ typedef struct pv_spec_list { } pv_spec_list_t, *pv_spec_list_p; pvname_list_t* parse_pvname_list(str *in, unsigned int type); +void free_pvname_list(pvname_list_t* head); int register_pvars_mod(char *mod_name, pv_export_t *items); int pv_free_extra_list(void);
7 years, 5 months
1
0
0
0
git:master:a4ee0d3f: ipops: replace return with goto error to release resources
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: a4ee0d3fd0c1b4147d462c8275d0150e8e934e2f URL:
https://github.com/kamailio/kamailio/commit/a4ee0d3fd0c1b4147d462c8275d0150…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-07-20T21:55:34+02:00 ipops: replace return with goto error to release resources --- Modified: src/modules/ipops/ipops_pv.c --- Diff:
https://github.com/kamailio/kamailio/commit/a4ee0d3fd0c1b4147d462c8275d0150…
Patch:
https://github.com/kamailio/kamailio/commit/a4ee0d3fd0c1b4147d462c8275d0150…
--- diff --git a/src/modules/ipops/ipops_pv.c b/src/modules/ipops/ipops_pv.c index 279995cf42..a619a67f99 100644 --- a/src/modules/ipops/ipops_pv.c +++ b/src/modules/ipops/ipops_pv.c @@ -249,7 +249,7 @@ int pv_parse_dns_name(pv_spec_t *sp, str *in) if(p!=pvi.s+pvi.len) { LM_ERR("invalid index [%.*s]\n", in->len, in->s); - return -1; + goto error; } dpv->nidx *= sign; }
7 years, 5 months
1
0
0
0
git:master:a19a06f6: tsilo: check return code for parse_uri()
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: a19a06f6c302a7fbac9b137cc1558d47730ead2f URL:
https://github.com/kamailio/kamailio/commit/a19a06f6c302a7fbac9b137cc1558d4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-07-20T20:34:57+02:00 tsilo: check return code for parse_uri() --- Modified: src/modules/tsilo/ts_append.c --- Diff:
https://github.com/kamailio/kamailio/commit/a19a06f6c302a7fbac9b137cc1558d4…
Patch:
https://github.com/kamailio/kamailio/commit/a19a06f6c302a7fbac9b137cc1558d4…
--- diff --git a/src/modules/tsilo/ts_append.c b/src/modules/tsilo/ts_append.c index 0076634109..e6e27e40cc 100644 --- a/src/modules/tsilo/ts_append.c +++ b/src/modules/tsilo/ts_append.c @@ -50,9 +50,12 @@ int ts_append(struct sip_msg* msg, str *ruri, char *table) { if (use_domain) { t_uri = ruri; - } - else { - parse_uri(ruri->s, ruri->len, &p_uri); + } else { + if(parse_uri(ruri->s, ruri->len, &p_uri)<0) { + LM_ERR("failed to parse uri %.*s\n", ruri->len, ruri->s); + unlock_entry_by_ruri(ruri); + return -1; + } t_uri = &p_uri.user; }
7 years, 5 months
1
0
0
0
git:master:4ea94956: app_python: implemented the read of 5 or 6 kemi str parameters
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 4ea9495681bca8e8eb559da1ff5887c524076f63 URL:
https://github.com/kamailio/kamailio/commit/4ea9495681bca8e8eb559da1ff5887c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-07-20T16:44:36+02:00 app_python: implemented the read of 5 or 6 kemi str parameters --- Modified: src/modules/app_python/apy_kemi.c --- Diff:
https://github.com/kamailio/kamailio/commit/4ea9495681bca8e8eb559da1ff5887c…
Patch:
https://github.com/kamailio/kamailio/commit/4ea9495681bca8e8eb559da1ff5887c…
--- diff --git a/src/modules/app_python/apy_kemi.c b/src/modules/app_python/apy_kemi.c index 0dd71c3448..72a98de4f2 100644 --- a/src/modules/app_python/apy_kemi.c +++ b/src/modules/app_python/apy_kemi.c @@ -350,12 +350,61 @@ PyObject *sr_apy_kemi_exec_func(PyObject *self, PyObject *args, int idx) } } else if(ket->ptypes[5]==SR_KEMIP_NONE) { i = 5; - LM_ERR("not implemented yet\n"); - return sr_kemi_apy_return_false(); + if(ket->ptypes[0]==SR_KEMIP_STR + || ket->ptypes[1]==SR_KEMIP_STR + || ket->ptypes[2]==SR_KEMIP_STR + || ket->ptypes[3]==SR_KEMIP_STR + || ket->ptypes[4]==SR_KEMIP_STR) { + if(!PyArg_ParseTuple(args, "sssss:kemi-param-sssss", + &vps[0].s.s, &vps[1].s.s, &vps[2].s.s, &vps[3].s.s, + &vps[4].s.s)) { + LM_ERR("unable to retrieve str-str-str-str params %d\n", i); + return sr_kemi_apy_return_false(); + } + vps[0].s.len = strlen(vps[0].s.s); + vps[1].s.len = strlen(vps[1].s.s); + vps[2].s.len = strlen(vps[2].s.s); + vps[3].s.len = strlen(vps[3].s.s); + vps[4].s.len = strlen(vps[4].s.s); + LM_DBG("params[%d] for: %.*s are str: [%.*s] [%.*s]" + " [%.*s] [%.*s] [%.*s]\n", i, + fname.len, fname.s, vps[0].s.len, vps[0].s.s, + vps[1].s.len, vps[1].s.s, vps[2].s.len, vps[2].s.s, + vps[3].s.len, vps[3].s.s, vps[4].s.len, vps[4].s.s); + } else { + LM_ERR("not implemented yet\n"); + return sr_kemi_apy_return_false(); + } } else { i = 6; - LM_ERR("not implemented yet\n"); - return sr_kemi_apy_return_false(); + if(ket->ptypes[0]==SR_KEMIP_STR + || ket->ptypes[1]==SR_KEMIP_STR + || ket->ptypes[2]==SR_KEMIP_STR + || ket->ptypes[3]==SR_KEMIP_STR + || ket->ptypes[4]==SR_KEMIP_STR + || ket->ptypes[5]==SR_KEMIP_STR) { + if(!PyArg_ParseTuple(args, "ssssss:kemi-param-ssssss", + &vps[0].s.s, &vps[1].s.s, &vps[2].s.s, &vps[3].s.s, + &vps[4].s.s, &vps[5].s.s)) { + LM_ERR("unable to retrieve str-str-str-str params %d\n", i); + return sr_kemi_apy_return_false(); + } + vps[0].s.len = strlen(vps[0].s.s); + vps[1].s.len = strlen(vps[1].s.s); + vps[2].s.len = strlen(vps[2].s.s); + vps[3].s.len = strlen(vps[3].s.s); + vps[4].s.len = strlen(vps[4].s.s); + vps[5].s.len = strlen(vps[5].s.s); + LM_DBG("params[%d] for: %.*s are str: [%.*s] [%.*s]" + " [%.*s] [%.*s] [%.*s] [%.*s]\n", i, + fname.len, fname.s, vps[0].s.len, vps[0].s.s, + vps[1].s.len, vps[1].s.s, vps[2].s.len, vps[2].s.s, + vps[3].s.len, vps[3].s.s, vps[4].s.len, vps[4].s.s, + vps[5].s.len, vps[5].s.s); + } else { + LM_ERR("not implemented yet\n"); + return sr_kemi_apy_return_false(); + } } switch(i) {
7 years, 5 months
1
0
0
0
git:master:ab627c14: alias_db: simplify error handling for db query function
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: ab627c14e6f06b8e568f9b6ab4e3cd396368d6bb URL:
https://github.com/kamailio/kamailio/commit/ab627c14e6f06b8e568f9b6ab4e3cd3…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-07-20T16:35:15+02:00 alias_db: simplify error handling for db query function --- Modified: src/modules/alias_db/alookup.c --- Diff:
https://github.com/kamailio/kamailio/commit/ab627c14e6f06b8e568f9b6ab4e3cd3…
Patch:
https://github.com/kamailio/kamailio/commit/ab627c14e6f06b8e568f9b6ab4e3cd3…
--- diff --git a/src/modules/alias_db/alookup.c b/src/modules/alias_db/alookup.c index d980d97113..28dd916999 100644 --- a/src/modules/alias_db/alookup.c +++ b/src/modules/alias_db/alookup.c @@ -103,8 +103,8 @@ static int alias_db_query(struct sip_msg* _msg, str table, adbf.use_table(db_handle, &table); if(adbf.query( db_handle, db_keys, NULL, db_vals, db_cols, - (flags&ALIAS_DOMAIN_FLAG)?2:1 /*no keys*/, 2 /*no cols*/, - NULL, &db_res)!=0) + (flags&ALIAS_DOMAIN_FLAG)?2:1 /*no keys*/, 2 /*no cols*/, + NULL, &db_res)!=0 || db_res==NULL) { LM_ERR("failed to query database\n"); goto err_server; @@ -113,9 +113,7 @@ static int alias_db_query(struct sip_msg* _msg, str table, if (RES_ROW_N(db_res)<=0 || RES_ROWS(db_res)[0].values[0].nul != 0) { LM_DBG("no alias found for R-URI\n"); - if (db_res!=NULL && adbf.free_result(db_handle, db_res) < 0) - LM_DBG("failed to freeing result of query\n"); - return -1; + goto err_server; } memcpy(useruri_buf, "sip:", 4); @@ -144,10 +142,6 @@ static int alias_db_query(struct sip_msg* _msg, str table, break; default: LM_ERR("unknown type of DB user column\n"); - if (db_res != NULL && adbf.free_result(db_handle, db_res) < 0) - { - LM_DBG("failed to freeing result of query\n"); - } goto err_server; } @@ -180,10 +174,6 @@ static int alias_db_query(struct sip_msg* _msg, str table, break; default: LM_ERR("unknown type of DB user column\n"); - if (db_res != NULL && adbf.free_result(db_handle, db_res) < 0) - { - LM_DBG("failed to freeing result of query\n"); - } goto err_server; } user_s.s = useruri_buf; @@ -198,14 +188,18 @@ static int alias_db_query(struct sip_msg* _msg, str table, /** * Free the DB result */ - if (db_res!=NULL && adbf.free_result(db_handle, db_res) < 0) + if (adbf.free_result(db_handle, db_res) < 0) { LM_DBG("failed to freeing result of query\n"); + } return 1; err_server: - if (db_res!=NULL && adbf.free_result(db_handle, db_res) < 0) - LM_DBG("failed to freeing result of query\n"); + if (db_res!=NULL) { + if(adbf.free_result(db_handle, db_res) < 0) { + LM_DBG("failed to freeing result of query\n"); + } + } return -1; }
7 years, 5 months
1
0
0
0
git:master:35d2d50c: topos: handle return code for parse_headers()
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 35d2d50ca5a170bb6518c45bec482a8cd7625177 URL:
https://github.com/kamailio/kamailio/commit/35d2d50ca5a170bb6518c45bec482a8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-07-20T16:25:42+02:00 topos: handle return code for parse_headers() --- Modified: src/modules/topos/topos_mod.c Modified: src/modules/topos/tps_msg.c --- Diff:
https://github.com/kamailio/kamailio/commit/35d2d50ca5a170bb6518c45bec482a8…
Patch:
https://github.com/kamailio/kamailio/commit/35d2d50ca5a170bb6518c45bec482a8…
--- diff --git a/src/modules/topos/topos_mod.c b/src/modules/topos/topos_mod.c index dfa8a7736f..0141c0f2c3 100644 --- a/src/modules/topos/topos_mod.c +++ b/src/modules/topos/topos_mod.c @@ -240,19 +240,21 @@ int tps_prepare_msg(sip_msg_t *msg) return 1; } - if (parse_headers(msg, HDR_EOH_F, 0)==-1) { - LM_DBG("parsing headers failed [[%.*s]]\n", - msg->len, msg->buf); - return 2; + if(parse_headers(msg, HDR_VIA2_F, 0)<0) { + LM_DBG("no via2 has been parsed\n"); } - parse_headers(msg, HDR_VIA2_F, 0); - if(parse_headers(msg, HDR_CSEQ_F, 0)!=0 || msg->cseq==NULL) { LM_ERR("cannot parse cseq header\n"); return -1; } + if (parse_headers(msg, HDR_EOH_F, 0)==-1) { + LM_DBG("parsing headers failed [[%.*s]]\n", + msg->len, msg->buf); + return 2; + } + if(parse_from_header(msg)<0) { LM_ERR("cannot parse FROM header\n"); return 3; diff --git a/src/modules/topos/tps_msg.c b/src/modules/topos/tps_msg.c index 09eda9e1b3..37b075ae94 100644 --- a/src/modules/topos/tps_msg.c +++ b/src/modules/topos/tps_msg.c @@ -115,7 +115,10 @@ int tps_remove_headers(sip_msg_t *msg, uint32_t hdr) struct hdr_field *hf; struct lump* l; - parse_headers(msg, HDR_EOH_F, 0); + if(parse_headers(msg, HDR_EOH_F, 0)<0) { + LM_ERR("failed to parse headers\n"); + return -1; + } for (hf=msg->headers; hf; hf=hf->next) { if (hdr!=hf->type) continue; @@ -139,7 +142,11 @@ int tps_add_headers(sip_msg_t *msg, str *hname, str *hbody, int hpos) if(hname==NULL || hname->len<=0 || hbody==NULL || hbody->len<=0) return 0; - parse_headers(msg, HDR_EOH_F, 0); + if(parse_headers(msg, HDR_EOH_F, 0)<0) { + LM_ERR("failed to parse headers\n"); + return -1; + } + if(hpos == 0) { /* append */ /* after last header */ anchor = anchor_lump(msg, msg->unparsed - msg->buf, 0, 0);
7 years, 5 months
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
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