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
October 2009
----- 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
468 discussions
Start a n
N
ew thread
git:sr_3.0: statistics(k): minor warning in printf fmt
by Andrei Pelinescu-Onciul
Module: sip-router Branch: sr_3.0 Commit: 3cacd9314a90bf128a93cad066b4f3db0908fc1e URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3cacd93…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org> Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org> Date: Mon Oct 12 18:07:15 2009 +0200 statistics(k): minor warning in printf fmt --- modules_k/statistics/statistics.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/modules_k/statistics/statistics.c b/modules_k/statistics/statistics.c index ee6e61b..9cf0bcb 100644 --- a/modules_k/statistics/statistics.c +++ b/modules_k/statistics/statistics.c @@ -123,7 +123,7 @@ static int fixup_stat(void** param, int param_no) /* is it pv? */ if (s.s[0]=='$') { if (fixup_pvar_null(param, 1)!=0) { - LM_ERR("invalid pv %.s as parameter\n",s.s); + LM_ERR("invalid pv %s as parameter\n",s.s); return E_CFG; } sopv->pv = (pv_spec_t*)(*param);
15 years, 2 months
1
0
0
0
git:sr_3.0: siputils(k): gcc 2.95 compile fixes
by Andrei Pelinescu-Onciul
Module: sip-router Branch: sr_3.0 Commit: 19bd6bd8c4cedc561497c8ff7ccd8d326ca59a2a URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=19bd6bd…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org> Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org> Date: Mon Oct 12 18:06:35 2009 +0200 siputils(k): gcc 2.95 compile fixes - variables must be declared at the beginning of a block --- modules_k/siputils/contact_ops.c | 5 ++- modules_k/siputils/ring.c | 46 ++++++++++++++++++++++++------------- 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/modules_k/siputils/contact_ops.c b/modules_k/siputils/contact_ops.c index 872c239..a796610 100644 --- a/modules_k/siputils/contact_ops.c +++ b/modules_k/siputils/contact_ops.c @@ -210,6 +210,7 @@ decode_contact_header (struct sip_msg *msg,char *unused1,char *unused2) #ifdef DEBUG + str* ruri; fprintf (stdout,"---START--------DECODE CONTACT HEADER-----------------\n"); #endif @@ -227,9 +228,9 @@ decode_contact_header (struct sip_msg *msg,char *unused1,char *unused2) #ifdef DEBUG fprintf (stdout,"Using separator %c\n",separator); - str* ruri; ruri = GET_RURI(msg); - fprintf (stdout,"[len = %d]New uri is->%*.s\n",ruri->len,ruri->len,ruri->s); + fprintf (stdout,"[len = %d]New uri is->%.*s\n", + ruri->len,ruri->len,ruri->s); ruri = &msg->first_line.u.request.uri; fprintf (stdout, "INITIAL.s=[%.*s]\n", ruri->len, ruri->s); #endif diff --git a/modules_k/siputils/ring.c b/modules_k/siputils/ring.c index 8c69a96..7528c12 100644 --- a/modules_k/siputils/ring.c +++ b/modules_k/siputils/ring.c @@ -192,10 +192,10 @@ static void remove_timeout(unsigned int index) static void insert(str callid) { unsigned int index = hash(callid.s, callid.len) & HASHTABLEMASK; - + struct ring_record_t* rr; + remove_timeout(index); - - struct ring_record_t* rr = shm_malloc(sizeof(struct ring_record_t)); + rr = shm_malloc(sizeof(struct ring_record_t)); assert(rr); rr->next = NULL; @@ -224,10 +224,11 @@ static void insert(str callid) static int contains(str callid) { unsigned int index = hash(callid.s, callid.len) & HASHTABLEMASK; + struct ring_record_t* rr; remove_timeout(index); - struct ring_record_t* rr = (*hashtable)[index].head; + rr = (*hashtable)[index].head; while (rr) { if (strncmp(rr->callid, callid.s, callid.len) == 0) return 1; rr = rr->next; @@ -245,25 +246,38 @@ static int conv183(struct sip_msg *msg) /* content-length and content-type headers are removed */ char *del1_start = strstr(msg->buf, "Content-Length:"); char *del2_start = strstr(msg->buf, "Content-Type:"); + char *del1_end; + char *del2_end; + char *eoh; + char *chunk1_start; + int chunk1_len; + char *chunk1_dst; + char *chunk2_start; + int chunk2_len; + char *chunk2_dst; + char *chunk3_start; + int chunk3_len; + char *chunk3_dst; + if (del1_start>del2_start) { char *tmp = del1_start; del1_start = del2_start; del2_start = tmp; } - char *del1_end = NULL; + del1_end = NULL; if (del1_start) { del1_end = strstr(del1_start, "\r\n"); if (del1_end) del1_end+=2; } - char *del2_end = NULL; + del2_end = NULL; if (del2_start) { del2_end = strstr(del2_start, "\r\n"); if (del2_end) del2_end+=2; } /* 180 message does not need session description */ - char *eoh = strstr(msg->buf, "\r\n\r\n"); + eoh = strstr(msg->buf, "\r\n\r\n"); if (eoh) eoh+=2; if ((!del1_start) || (!del2_start) || (!del1_end) || (!del2_end) || (!eoh)) { @@ -288,17 +302,17 @@ static int conv183(struct sip_msg *msg) strncpy(msg->first_line.u.reply.reason.s, "Ringing ", msg->first_line.u.reply.reason.len); /* calculate addresses of chunks to be moved */ - char *chunk1_start = del1_end; - int chunk1_len = del2_start-del1_end; - char *chunk1_dst = del1_start; + chunk1_start = del1_end; + chunk1_len = (int)(long)(del2_start-del1_end); + chunk1_dst = del1_start; - char *chunk2_start = del2_end; - int chunk2_len = eoh-del2_end; - char *chunk2_dst = chunk1_dst+chunk1_len; + chunk2_start = del2_end; + chunk2_len = (int)(long)(eoh-del2_end); + chunk2_dst = chunk1_dst+chunk1_len; - char *chunk3_start = "Content-Length: 0\r\n\r\n"; - int chunk3_len = strlen(chunk3_start); - char *chunk3_dst = chunk2_dst+chunk2_len; + chunk3_start = "Content-Length: 0\r\n\r\n"; + chunk3_len = strlen(chunk3_start); + chunk3_dst = chunk2_dst+chunk2_len; // move chunks memmove(chunk1_dst, chunk1_start, chunk1_len);
15 years, 2 months
1
0
0
0
git:sr_3.0: lcr: compile & warning fixes for gcc 2.95
by Andrei Pelinescu-Onciul
Module: sip-router Branch: sr_3.0 Commit: 663a4d47e1513296d78388ebed93a3d4d8bae8e7 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=663a4d4…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org> Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org> Date: Mon Oct 12 16:45:27 2009 +0200 lcr: compile & warning fixes for gcc 2.95 - variables must be declared at the beginning of a block --- modules/lcr/lcr_mod.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/lcr/lcr_mod.c b/modules/lcr/lcr_mod.c index 26cfa48..549e570 100644 --- a/modules/lcr/lcr_mod.c +++ b/modules/lcr/lcr_mod.c @@ -399,6 +399,7 @@ static int mod_init(void) str s; unsigned short avp_flags; unsigned int i; + db1_con_t* dbh; if(register_mi_mod(exports.name, mi_cmds)!=0) { @@ -556,7 +557,6 @@ static int mod_init(void) } /* Check table version */ - db1_con_t* dbh; if (lcr_dbf.init==0){ LM_CRIT("unbound database\n"); return -1; @@ -1277,7 +1277,7 @@ int reload_gws_and_lcrs(int lcr_id) first_gw = find_first_gw(gw_grps, grp_cnt, grp_id); if (first_gw == 0) { LM_ERR("gw grp_id <%u> of prefix <%.*s> has no gateways\n", - grp_id, prefix_len, prefix); + grp_id, (int)prefix_len, prefix); goto lcr_err; } if ((VAL_NULL(ROW_VALUES(row) + 3) == 1) || @@ -1892,7 +1892,7 @@ static int generate_uris(char *r_uri, str *r_uri_user, unsigned int *r_uri_len, destroy_avp(gu_avp); LM_DBG("r_uri <%.*s>, dst_uri <%.*s>\n", - *r_uri_len, r_uri, *dst_uri_len, dst_uri); + (int)*r_uri_len, r_uri, (int)*dst_uri_len, dst_uri); return 1; }
15 years, 2 months
1
0
0
0
git:sr_3.0: pua_mi: gcc 2.95 compile fixes
by Andrei Pelinescu-Onciul
Module: sip-router Branch: sr_3.0 Commit: 18ff125720ef9265a271a1bcbc62a25d5a4064c9 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=18ff125…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org> Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org> Date: Mon Oct 12 18:04:30 2009 +0200 pua_mi: gcc 2.95 compile fixes - variables must be declared at the beginning of a block --- modules_k/pua_mi/pua_mi.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/modules_k/pua_mi/pua_mi.c b/modules_k/pua_mi/pua_mi.c index 969303d..a6ab82c 100644 --- a/modules_k/pua_mi/pua_mi.c +++ b/modules_k/pua_mi/pua_mi.c @@ -84,9 +84,10 @@ struct module_exports exports= { */ static int mod_init(void) { - LM_DBG("...\n"); bind_pua_t bind_pua; + LM_DBG("...\n"); + if(register_mi_mod(exports.name, mi_cmds)!=0) { LM_ERR("failed to register MI commands\n");
15 years, 2 months
1
0
0
0
git:sr_3.0: db_postgres: compile fixes for gcc 2.95
by Andrei Pelinescu-Onciul
Module: sip-router Branch: sr_3.0 Commit: 204503d4aa5b839b596946c4edae428babfa9d41 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=204503d…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org> Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org> Date: Mon Oct 12 16:43:33 2009 +0200 db_postgres: compile fixes for gcc 2.95 - variables must be declared at the beginning of a block - #ifdefs not allowed in macro arguments --- modules/db_postgres/km_pg_con.c | 3 ++- modules/db_postgres/pg_con.c | 9 ++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/db_postgres/km_pg_con.c b/modules/db_postgres/km_pg_con.c index aa1d510..98dbb43 100644 --- a/modules/db_postgres/km_pg_con.c +++ b/modules/db_postgres/km_pg_con.c @@ -108,9 +108,10 @@ struct pg_con* db_postgres_new_connection(struct db_id* id) void db_postgres_free_connection(struct pool_con* con) { + struct pg_con * _c; + if (!con) return; - struct pg_con * _c; _c = (struct pg_con*)con; if (_c->res) { diff --git a/modules/db_postgres/pg_con.c b/modules/db_postgres/pg_con.c index b846b18..32b9be7 100644 --- a/modules/db_postgres/pg_con.c +++ b/modules/db_postgres/pg_con.c @@ -277,14 +277,13 @@ int pg_con_connect(db_con_t* con) /* Override default notice processor */ PQsetNoticeProcessor(pcon->con, notice_processor, 0); - DBG("postgres: Connected. Protocol version=%d, Server version=%d\n", - PQprotocolVersion(pcon->con), #ifdef HAVE_PGSERVERVERSION - PQserverVersion(pcon->con) + DBG("postgres: Connected. Protocol version=%d, Server version=%d\n", + PQprotocolVersion(pcon->con), PQserverVersion(pcon->con)); #else - 0 + DBG("postgres: Connected. Protocol version=%d, Server version=%d\n", + PQprotocolVersion(pcon->con), 0 ); #endif - ); ret = timestamp_format(pcon->con); if (ret == 1 || ret == -1) {
15 years, 2 months
1
0
0
0
git:sr_3.0: db_mysql: compile fix for gcc 2.95
by Andrei Pelinescu-Onciul
Module: sip-router Branch: sr_3.0 Commit: 030ed0e68b4c4a00a9462646b969fb5c5b1fe282 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=030ed0e…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org> Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org> Date: Mon Oct 12 16:41:32 2009 +0200 db_mysql: compile fix for gcc 2.95 - variables must be declared at the beginning of a block --- modules/db_mysql/km_my_con.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/modules/db_mysql/km_my_con.c b/modules/db_mysql/km_my_con.c index b938117..953c574 100644 --- a/modules/db_mysql/km_my_con.c +++ b/modules/db_mysql/km_my_con.c @@ -136,9 +136,10 @@ struct my_con* db_mysql_new_connection(const struct db_id* id) */ void db_mysql_free_connection(struct pool_con* con) { + struct my_con * _c; + if (!con) return; - struct my_con * _c; _c = (struct my_con*) con; if (_c->res) mysql_free_result(_c->res);
15 years, 2 months
1
0
0
0
git:sr_3.0: registrar(k): gcc 2.95 compile fixes
by Andrei Pelinescu-Onciul
Module: sip-router Branch: sr_3.0 Commit: 744634370288693d7c2c0ea88af14aff45add729 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7446343…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org> Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org> Date: Mon Oct 12 18:05:33 2009 +0200 registrar(k): gcc 2.95 compile fixes - variables must be declared at the beginning of a block --- modules_k/registrar/common.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/modules_k/registrar/common.c b/modules_k/registrar/common.c index e6cb541..8dbd5e1 100644 --- a/modules_k/registrar/common.c +++ b/modules_k/registrar/common.c @@ -50,8 +50,6 @@ int extract_aor(str* _uri, str* _a) { static char aor_buf[MAX_AOR_LEN]; - memset(aor_buf, 0, MAX_AOR_LEN); - str tmp; struct sip_uri puri; int user_len; @@ -59,6 +57,7 @@ int extract_aor(str* _uri, str* _a) struct usr_avp *avp; str *uri; + memset(aor_buf, 0, MAX_AOR_LEN); if (aor_avp_name.n!=0) { avp = search_first_avp( aor_avp_type, aor_avp_name, &avp_val, 0); if (avp && is_avp_str_val(avp)) {
15 years, 2 months
1
0
0
0
git:sr_3.0: cfgutils(k): gcc 2.95 compile fixes
by Andrei Pelinescu-Onciul
Module: sip-router Branch: sr_3.0 Commit: 90031b9224f2cf74c37770f6da8300969f4a63dc URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=90031b9…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org> Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org> Date: Mon Oct 12 18:03:48 2009 +0200 cfgutils(k): gcc 2.95 compile fixes - variables must be declared at the beginning of a block --- modules_k/cfgutils/cfgutils.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/modules_k/cfgutils/cfgutils.c b/modules_k/cfgutils/cfgutils.c index 8b6f37f..828a460 100644 --- a/modules_k/cfgutils/cfgutils.c +++ b/modules_k/cfgutils/cfgutils.c @@ -488,11 +488,6 @@ error: */ static int MD5File(char *dest, const char *file_name) { - if (!dest || !file_name) { - LM_ERR("invalid parameter value\n"); - return -1; - } - MD5_CTX context; FILE *input; unsigned char buffer[32768]; @@ -500,6 +495,12 @@ static int MD5File(char *dest, const char *file_name) unsigned int counter, size; struct stat stats; + + if (!dest || !file_name) { + LM_ERR("invalid parameter value\n"); + return -1; + } + if (stat(file_name, &stats) != 0) { LM_ERR("could not stat file %s\n", file_name); return -1; @@ -588,12 +589,13 @@ static int get_prob(struct sip_msg *bar, char *foo1, char *foo2) static int rand_event(struct sip_msg *bar, char *foo1, char *foo2) { + double tmp; /* most of the time this will be disabled completly. Tis will also fix the * problem with the corner cases if rand() returned zero or RAND_MAX */ if ((*probability) == 0) return -1; if ((*probability) == 100) return 1; - double tmp = ((double) rand() / RAND_MAX); + tmp = ((double) rand() / RAND_MAX); LM_DBG("generated random %f\n", tmp); if (tmp < ((double) (*probability) / 100)) { LM_DBG("return true\n");
15 years, 2 months
1
0
0
0
git:sr_3.0: compile: don't warn on old gcc versions
by Andrei Pelinescu-Onciul
Module: sip-router Branch: sr_3.0 Commit: 18d2bb2c8a72f508a93a0e802f439390731909a6 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=18d2bb2…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org> Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org> Date: Mon Oct 12 16:39:38 2009 +0200 compile: don't warn on old gcc versions --- compiler_opt.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/compiler_opt.h b/compiler_opt.h index 7fe2c21..fd39638 100644 --- a/compiler_opt.h +++ b/compiler_opt.h @@ -52,7 +52,7 @@ #else /* __GNUC__ */ -#warning "No compiler optimizations supported try gcc 4.x" +/* #warning "No compiler optimizations supported try gcc 4.x" */ #define likely(expr) (expr) #define unlikely(expr) (expr)
15 years, 2 months
1
0
0
0
PDB Module
by Olle E. Johansson
Can someone explain the PDB module to me? The docs doesn't say much. It seems to be about connecting to some kind of server... /O
15 years, 2 months
2
2
0
0
← Newer
1
...
27
28
29
30
31
32
33
...
47
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
42
43
44
45
46
47
Results per page:
10
25
50
100
200