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
2025
July
June
May
April
March
February
January
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 2021
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 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
19 participants
269 discussions
Start a n
N
ew thread
git:5.5:ad5f0f52: tm: restore xavps & flags after rebuilding message
by Daniel-Constantin Mierla
20 Aug '21
20 Aug '21
Module: kamailio Branch: 5.5 Commit: ad5f0f522f43a69e0f7f930cac5aefc3f21607df URL:
https://github.com/kamailio/kamailio/commit/ad5f0f522f43a69e0f7f930cac5aefc…
Author: lazedo <luis.azedo(a)factorlusitano.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2021-08-19T21:33:22+02:00 tm: restore xavps & flags after rebuilding message (cherry picked from commit 7ee642c58991e594f38247ab0751fadd07ce758c) --- Modified: src/modules/tm/uac.c --- Diff:
https://
…
[View More]
github.com/kamailio/kamailio/commit/ad5f0f522f43a69e0f7f930cac5aefc…
Patch:
https://github.com/kamailio/kamailio/commit/ad5f0f522f43a69e0f7f930cac5aefc…
--- diff --git a/src/modules/tm/uac.c b/src/modules/tm/uac.c index ad6a74c8cb..9cbc9d5f88 100644 --- a/src/modules/tm/uac.c +++ b/src/modules/tm/uac.c @@ -300,10 +300,6 @@ static inline int t_run_local_req( set_route_type( backup_route_type ); p_onsend=0; - /* restore original environment */ - tm_xdata_swap(new_cell, &backup_xd, 1); - setsflagsval(sflag_bk); - if (unlikely(ra_ctx.run_flags&DROP_R_F)) { LM_DBG("tm:local-request dropped msg. to %.*s\n", lreq.dst_uri.len, lreq.dst_uri.s); @@ -372,6 +368,10 @@ static inline int t_run_local_req( } clean: + /* restore original environment */ + tm_xdata_swap(new_cell, &backup_xd, 1); + setsflagsval(sflag_bk); + /* clean local msg structure */ if (unlikely(lreq.new_uri.s)) {
[View Less]
1
0
0
0
git:5.5:680d98ca: core: ip addr - use POSIX INET6_ADDRSTRLEN and INET_ADDRSTRLEN to define sizes
by Daniel-Constantin Mierla
20 Aug '21
20 Aug '21
Module: kamailio Branch: 5.5 Commit: 680d98caccc0216f43c2b5de83935dbc4853ab9d URL:
https://github.com/kamailio/kamailio/commit/680d98caccc0216f43c2b5de83935db…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2021-08-19T21:33:35+02:00 core: ip addr - use POSIX INET6_ADDRSTRLEN and INET_ADDRSTRLEN to define sizes - set the values of IP4_MAX_STR_SIZE and IP6_MAX_STR_SIZE based on them, if defined, or to 15 and 45
…
[View More]
- cope with IPv6 with IPv4 tunneling representation (RFC 4291 section 2.2) - cover the requirements of using inet_ntop() - GH #2823 (cherry picked from commit 22a72f3a7725d56f00e22bdc52d44bd53da7c091) --- Modified: src/core/ip_addr.h --- Diff:
https://github.com/kamailio/kamailio/commit/680d98caccc0216f43c2b5de83935db…
Patch:
https://github.com/kamailio/kamailio/commit/680d98caccc0216f43c2b5de83935db…
--- diff --git a/src/core/ip_addr.h b/src/core/ip_addr.h index 546c822423..132f653255 100644 --- a/src/core/ip_addr.h +++ b/src/core/ip_addr.h @@ -510,8 +510,20 @@ int hostent2su(union sockaddr_union* su, /* maximum size of a str returned by ip_addr2str */ -#define IP6_MAX_STR_SIZE 39 /*1234:5678:9012:3456:7890:1234:5678:9012*/ -#define IP4_MAX_STR_SIZE 15 /*123.456.789.012*/ +/* POSIX INET6_ADDRSTRLEN (RFC 4291 section 2.2) - IPv6 with IPv4 tunneling + * (39): 1234:5678:9012:3456:7890:1234:5678:9012 + * (45): ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255 */ +#ifdef INET6_ADDRSTRLEN +#define IP6_MAX_STR_SIZE (INET6_ADDRSTRLEN-1) +#else +#define IP6_MAX_STR_SIZE 45 +#endif +/*123.456.789.123*/ +#ifdef INET_ADDRSTRLEN +#define IP4_MAX_STR_SIZE (INET_ADDRSTRLEN-1) +#else +#define IP4_MAX_STR_SIZE 15 +#endif /* converts a raw ipv6 addr (16 bytes) to ascii */ int ip6tosbuf(unsigned char* ip6, char* buff, int len);
[View Less]
1
0
0
0
git:5.5:dadac04b: textops: check session sendrecv_mode in is_audio_on_hold
by Daniel-Constantin Mierla
20 Aug '21
20 Aug '21
Module: kamailio Branch: 5.5 Commit: dadac04b0153a29ed7c1ebb48e887c06989fa49c URL:
https://github.com/kamailio/kamailio/commit/dadac04b0153a29ed7c1ebb48e887c0…
Author: Luis Azedo <luis.azedo(a)factorlusitano.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2021-08-19T21:33:08+02:00 textops: check session sendrecv_mode in is_audio_on_hold - if sendrecv_mode is not set in media, check if its set in session (cherry picked from commit
…
[View More]
cbcc27ef8b1674448bd8b1c45f03388e36f65f51) --- Modified: src/modules/textops/textops.c --- Diff:
https://github.com/kamailio/kamailio/commit/dadac04b0153a29ed7c1ebb48e887c0…
Patch:
https://github.com/kamailio/kamailio/commit/dadac04b0153a29ed7c1ebb48e887c0…
--- diff --git a/src/modules/textops/textops.c b/src/modules/textops/textops.c index 2998906051..4b3216d4d2 100644 --- a/src/modules/textops/textops.c +++ b/src/modules/textops/textops.c @@ -4367,8 +4367,15 @@ static int ki_is_audio_on_hold(sip_msg_t *msg) if(!sdp_stream) break; if(sdp_stream->media.len==AUDIO_STR_LEN && strncmp(sdp_stream->media.s,AUDIO_STR,AUDIO_STR_LEN)==0 && + sdp_stream->sendrecv_mode.len && sdp_stream->is_on_hold) return sdp_stream->is_on_hold; + if(sdp_stream->media.len==AUDIO_STR_LEN && + strncmp(sdp_stream->media.s,AUDIO_STR,AUDIO_STR_LEN)==0 && + !sdp_stream->sendrecv_mode.len && + sdp_session->sendrecv_mode.len && + sdp_session->is_on_hold) + return sdp_session->is_on_hold; sdp_stream_num++; } sdp_session_num++;
[View Less]
1
0
0
0
git:5.5:01ab21c4: core: parse session sendrecv_mode in sdp
by Daniel-Constantin Mierla
20 Aug '21
20 Aug '21
Module: kamailio Branch: 5.5 Commit: 01ab21c4ba28259be72fd704afd389132260e258 URL:
https://github.com/kamailio/kamailio/commit/01ab21c4ba28259be72fd704afd3891…
Author: Luis Azedo <luis.azedo(a)factorlusitano.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2021-08-19T21:32:55+02:00 core: parse session sendrecv_mode in sdp - some user agents send a=sendonly as session attribute which apply to all media streams (cherry picked from commit
…
[View More]
8da4477fd6d9590b9946071b9ac2a778b1d55d01) --- Modified: src/core/parser/sdp/sdp.c Modified: src/core/parser/sdp/sdp.h --- Diff:
https://github.com/kamailio/kamailio/commit/01ab21c4ba28259be72fd704afd3891…
Patch:
https://github.com/kamailio/kamailio/commit/01ab21c4ba28259be72fd704afd3891…
--- diff --git a/src/core/parser/sdp/sdp.c b/src/core/parser/sdp/sdp.c index d5e4f0695b..14779e4d12 100644 --- a/src/core/parser/sdp/sdp.c +++ b/src/core/parser/sdp/sdp.c @@ -453,6 +453,18 @@ static int parse_sdp_session(str *sdp_body, int session_num, str *cnt_disp, sdp_ extract_bwidth(&tmpstr1, &session->bw_type, &session->bw_width); } + /* Find sendrecv_mode between session begin and first media. + * parse session attributes to check is_on_hold for a= for all medias. */ + a1p = find_first_sdp_line(o1p, m1p, 'a', NULL); + while (a1p) { + tmpstr1.s = a1p; + tmpstr1.len = m1p - a1p; + if (extract_sendrecv_mode(&tmpstr1, &session->sendrecv_mode, &session->is_on_hold) == 0) { + break; + } + a1p = find_next_sdp_line(a1p, m1p, 'a', NULL); + } + /* Have session. Iterate media descriptions in session */ m2p = m1p; stream_num = 0; diff --git a/src/core/parser/sdp/sdp.h b/src/core/parser/sdp/sdp.h index 84ebcfc8a2..d8c1b15b66 100644 --- a/src/core/parser/sdp/sdp.h +++ b/src/core/parser/sdp/sdp.h @@ -111,6 +111,8 @@ typedef struct sdp_session_cell { AS - application specific */ str bw_width; /**< The <bandwidth> is interpreted as kilobits per second by default */ int streams_num; /**< number of streams inside a session */ + str sendrecv_mode; + int is_on_hold; /**< flag indicating if this session is on hold */ struct sdp_stream_cell* streams; } sdp_session_cell_t;
[View Less]
1
0
0
0
git:5.5:105b1542: misc/tools/protoshoot: removed svn id and history
by Daniel-Constantin Mierla
20 Aug '21
20 Aug '21
Module: kamailio Branch: 5.5 Commit: 105b15422f611ba1dcc59be30f7f4d474b294d03 URL:
https://github.com/kamailio/kamailio/commit/105b15422f611ba1dcc59be30f7f4d4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2021-08-19T21:30:37+02:00 misc/tools/protoshoot: removed svn id and history (cherry picked from commit e3875c01adf576f179374a926e69e99c0094e5b4) --- Modified: misc/tools/protoshoot/protoshoot.c ---
…
[View More]
Diff:
https://github.com/kamailio/kamailio/commit/105b15422f611ba1dcc59be30f7f4d4…
Patch:
https://github.com/kamailio/kamailio/commit/105b15422f611ba1dcc59be30f7f4d4…
--- diff --git a/misc/tools/protoshoot/protoshoot.c b/misc/tools/protoshoot/protoshoot.c index 352e1018a6..6eced5fc2b 100644 --- a/misc/tools/protoshoot/protoshoot.c +++ b/misc/tools/protoshoot/protoshoot.c @@ -1,4 +1,3 @@ -/* $Id$ */ /* * * Copyright (C) 2001-2003 FhG Fokus @@ -20,14 +19,10 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/* - * History: - * 2005-09-09 basic tcp support added (andrei) - */ @@ -50,7 +45,6 @@ #include <signal.h> -static char *id="$Id$"; static char *version="protoshoot 0.4"; static char* help_msg="\ Usage: protoshoot -f file -d address -p port -c count [-v]\n\ @@ -87,7 +81,7 @@ int main (int argc, char** argv) char buf[BUF_SIZE]; struct hostent* he; struct sockaddr_in addr; - + int count; int verbose; char *fname; @@ -104,7 +98,7 @@ int main (int argc, char** argv) struct linger t_linger; int k; int err; - + /* init */ count=1; verbose=0; @@ -190,7 +184,6 @@ int main (int argc, char** argv) break; case 'V': printf("version: %s\n", version); - printf("%s\n",id); exit(0); break; case 'h': @@ -213,7 +206,7 @@ int main (int argc, char** argv) abort(); } } - + /* check if all the required params are present */ if (fname==0){ fprintf(stderr, "Missing -f file\n"); @@ -238,13 +231,13 @@ int main (int argc, char** argv) exit(-1); } if (proto==PROTO_UDP || (proto==PROTO_SCTP && !sctp_o2o)) con_no=1; - + /* ignore sigpipe */ if (signal(SIGPIPE, SIG_IGN)==SIG_ERR){ fprintf(stderr, "failed to ignore SIGPIPE: %s\n", strerror(errno)); exit(-1); } - + /* open packet file */ fd=open(fname, O_RDONLY); if (fd<0){ @@ -274,7 +267,7 @@ int main (int argc, char** argv) addr.sin_len=sizeof(struct sockaddr_in); #endif memcpy(&addr.sin_addr.s_addr, he->h_addr_list[0], he->h_length); - + for (k=0; k<con_no; k++){ switch(proto){ case PROTO_UDP: @@ -285,7 +278,7 @@ int main (int argc, char** argv) break; #ifdef USE_SCTP case PROTO_SCTP: - sock = socket(he->h_addrtype, + sock = socket(he->h_addrtype, sctp_o2o?SOCK_STREAM:SOCK_SEQPACKET, IPPROTO_SCTP); break; @@ -333,8 +326,7 @@ int main (int argc, char** argv) fprintf(stderr, "ERROR: connect: %s\n", strerror(errno)); goto error; } - - + /* flood loop */ t=throttle; for (r=0; r<count; r++){ @@ -366,7 +358,7 @@ int main (int argc, char** argv) } } } - + close(sock); if ((verbose) && (k%1000==999)) { putchar('#'); fflush(stdout); } }
[View Less]
1
0
0
0
git:5.5:96f24cae: sdpops: refactored sdp_remove_str_codec_id_attrs()
by Daniel-Constantin Mierla
20 Aug '21
20 Aug '21
Module: kamailio Branch: 5.5 Commit: 96f24caed768b1b382b166eea835e555eac5e933 URL:
https://github.com/kamailio/kamailio/commit/96f24caed768b1b382b166eea835e55…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2021-08-19T21:30:01+02:00 sdpops: refactored sdp_remove_str_codec_id_attrs() - line oriented matching of codec addributes - support to remove a=rtcp-fb per codec, GH #2755 (cherry picked from commit
…
[View More]
1a15a18eacd5764e9ba6240acbe37e645368f825) --- Modified: src/modules/sdpops/sdpops_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/96f24caed768b1b382b166eea835e55…
Patch:
https://github.com/kamailio/kamailio/commit/96f24caed768b1b382b166eea835e55…
--- diff --git a/src/modules/sdpops/sdpops_mod.c b/src/modules/sdpops/sdpops_mod.c index bebe01ba5c..37655fde4b 100644 --- a/src/modules/sdpops/sdpops_mod.c +++ b/src/modules/sdpops/sdpops_mod.c @@ -195,48 +195,45 @@ int sdp_locate_line(sip_msg_t* msg, char *pos, str *aline) int sdp_remove_str_codec_id_attrs(sip_msg_t* msg, sdp_stream_cell_t* sdp_stream, str *rm_codec) { + str sdp_attrs_list[] = { + str_init("a=rtpmap:"), + str_init("a=fmtp:"), + str_init("a=rtcp-fb:"), + {0, 0} + }; + int i; str aline = {0, 0}; - sdp_payload_attr_t *payload; + str raw_stream = {0, 0}; struct lump *anchor; - payload = sdp_stream->payload_attr; - while (payload) { - LM_DBG("a= ... for codec %.*s/%.*s\n", - payload->rtp_payload.len, payload->rtp_payload.s, - payload->rtp_enc.len, payload->rtp_enc.s); - if(rm_codec->len==payload->rtp_payload.len - && strncmp(payload->rtp_payload.s, rm_codec->s, - rm_codec->len)==0) { - if(payload->rtp_enc.s!=NULL) { - if(sdp_locate_line(msg, payload->rtp_enc.s, &aline)==0) - { - LM_DBG("removing line: %.*s", aline.len, aline.s); - anchor = del_lump(msg, aline.s - msg->buf, - aline.len, 0); - if (anchor == NULL) { - LM_ERR("failed to remove [%.*s] inside [%.*s]\n", - rm_codec->len, rm_codec->s, - aline.len, aline.s); - return -1; - } - } - } - if(payload->fmtp_string.s!=NULL) { - if(sdp_locate_line(msg, payload->fmtp_string.s, &aline)==0) - { - LM_DBG("removing line: %.*s\n", aline.len, aline.s); - anchor = del_lump(msg, aline.s - msg->buf, - aline.len, 0); - if (anchor == NULL) { - LM_ERR("failed to remove [%.*s] inside [%.*s]\n", - rm_codec->len, rm_codec->s, - aline.len, aline.s); - return -1; + raw_stream = sdp_stream->raw_stream; + while(raw_stream.len>5) { + sdp_locate_line(msg, raw_stream.s, &aline); + /* process attribute lines: a=x:c... */ + if((aline.len>5) && ((aline.s[0] | 0x20)=='a')) { + LM_DBG("processing sdp line [%.*s]\n", aline.len, aline.s); + for(i=0; sdp_attrs_list[i].s!=NULL; i++) { + if(aline.len > sdp_attrs_list[i].len + rm_codec->len) { + if(strncasecmp(aline.s, sdp_attrs_list[i].s, + sdp_attrs_list[i].len)==0 + && strncmp(aline.s+sdp_attrs_list[i].len, rm_codec->s, + rm_codec->len)==0 + && aline.s[sdp_attrs_list[i].len + rm_codec->len]==' ') { + LM_DBG("removing line: [%.*s]\n", aline.len, aline.s); + anchor = del_lump(msg, aline.s - msg->buf, + aline.len, 0); + if (anchor == NULL) { + LM_ERR("failed to remove - id [%.*s] line [%.*s]\n", + rm_codec->len, rm_codec->s, + aline.len, aline.s); + return -1; + } } } } } - payload=payload->next; + raw_stream.s = aline.s + aline.len; + raw_stream.len -= aline.len; } return 0;
[View Less]
1
0
0
0
git:5.5:ede5a839: core: parser sdp - shorten debug message with sdp line
by Daniel-Constantin Mierla
20 Aug '21
20 Aug '21
Module: kamailio Branch: 5.5 Commit: ede5a8399662903c2aa081b7010603398a598e94 URL:
https://github.com/kamailio/kamailio/commit/ede5a8399662903c2aa081b70106033…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2021-08-19T21:29:51+02:00 core: parser sdp - shorten debug message with sdp line - was printing the rest of the body, print now max 20 chars (cherry picked from commit
…
[View More]
4191a8193025499df64f13d59f5716563e573161) --- Modified: src/core/parser/sdp/sdp.c --- Diff:
https://github.com/kamailio/kamailio/commit/ede5a8399662903c2aa081b70106033…
Patch:
https://github.com/kamailio/kamailio/commit/ede5a8399662903c2aa081b70106033…
--- diff --git a/src/core/parser/sdp/sdp.c b/src/core/parser/sdp/sdp.c index 7dbf259379..d5e4f0695b 100644 --- a/src/core/parser/sdp/sdp.c +++ b/src/core/parser/sdp/sdp.c @@ -584,7 +584,8 @@ static int parse_sdp_session(str *sdp_body, int session_num, str *cnt_disp, sdp_ a1p = stream->path.s + stream->path.len; } else { /* unknown a= line, ignore -- jump over it */ - LM_DBG("ignoring unknown type in a= line: `%.*s'\n", tmpstr1.len, tmpstr1.s); + LM_DBG("ignoring unknown type in a= line: `%.*s...'\n", + (tmpstr1.len>20)?20:tmpstr1.len, tmpstr1.s); a1p += 2; }
[View Less]
1
0
0
0
git:5.5:48eb4165: db_redis: fix broken pipe issue, if redis server with timeout setting.
by Daniel-Constantin Mierla
20 Aug '21
20 Aug '21
Module: kamailio Branch: 5.5 Commit: 48eb41654859e6130c82c46400b529f2af9ce908 URL:
https://github.com/kamailio/kamailio/commit/48eb41654859e6130c82c46400b529f…
Author: FredWH <wh720(a)139.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2021-08-19T21:28:34+02:00 db_redis: fix broken pipe issue, if redis server with timeout setting. - issue #2764 (cherry picked from commit 7cec977f8e12bbeb0309d903e02461d1ccbf41a8) --- Modified: src/modules/db_redis/
…
[View More]
redis_connection.c --- Diff:
https://github.com/kamailio/kamailio/commit/48eb41654859e6130c82c46400b529f…
Patch:
https://github.com/kamailio/kamailio/commit/48eb41654859e6130c82c46400b529f…
--- diff --git a/src/modules/db_redis/redis_connection.c b/src/modules/db_redis/redis_connection.c index ad2921f1d5..dd421a7844 100644 --- a/src/modules/db_redis/redis_connection.c +++ b/src/modules/db_redis/redis_connection.c @@ -305,7 +305,8 @@ void *db_redis_command_argv(km_redis_con_t *con, redis_key_t *query) { LM_DBG("query has %d args\n", argc); redisReply *reply = redisCommandArgv(con->con, argc, (const char**)argv, NULL); - if (con->con->err == REDIS_ERR_EOF) { + if (con->con->err != REDIS_OK) { + LM_DBG("redis connection is gone, try reconnect. (%d:%s)\n", con->con->err, con->con->errstr); if (db_redis_connect(con) != 0) { LM_ERR("Failed to reconnect to redis db\n"); pkg_free(argv); @@ -344,7 +345,8 @@ int db_redis_append_command_argv(km_redis_con_t *con, redis_key_t *query, int qu // this should actually never happen, because if all replies // are properly consumed for the previous command, it won't send // out a new query until redisGetReply is called - if (con->con->err == REDIS_ERR_EOF) { + if (con->con->err != REDIS_OK) { + LM_DBG("redis connection is gone, try reconnect. (%d:%s)\n", con->con->err, con->con->errstr); if (db_redis_connect(con) != 0) { LM_ERR("Failed to reconnect to redis db\n"); pkg_free(argv); @@ -374,8 +376,8 @@ int db_redis_get_reply(km_redis_con_t *con, void **reply) { *reply = NULL; ret = redisGetReply(con->con, reply); - if (con->con->err == REDIS_ERR_EOF) { - LM_DBG("redis connection is gone, try reconnect\n"); + if (con->con->err != REDIS_OK) { + LM_DBG("redis connection is gone, try reconnect. (%d:%s)\n", con->con->err, con->con->errstr); con->append_counter = 0; if (db_redis_connect(con) != 0) { LM_ERR("Failed to reconnect to redis db\n"); @@ -396,7 +398,7 @@ int db_redis_get_reply(km_redis_con_t *con, void **reply) { db_redis_key_free(&query); } ret = redisGetReply(con->con, reply); - if (con->con->err != REDIS_ERR_EOF) { + if (con->con->err == REDIS_OK) { con->append_counter--; } } else {
[View Less]
1
0
0
0
git:5.5:ba8a06d2: core: enables compilation with debug symbols by default for other architectures
by Daniel-Constantin Mierla
20 Aug '21
20 Aug '21
Module: kamailio Branch: 5.5 Commit: ba8a06d2988e41b09947d3ae3386a13e3d8415b9 URL:
https://github.com/kamailio/kamailio/commit/ba8a06d2988e41b09947d3ae3386a13…
Author: Sergey Safarov <s.safarov(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2021-08-19T21:27:52+02:00 core: enables compilation with debug symbols by default for other architectures - enables compilation with debug symbols by default for other architectures in core - pull request GH #2811
…
[View More]
- closes GH #2789 (cherry picked from commit ed46adad82e7b6569eb42704c5460263d2af75f7) --- Modified: src/Makefile.defs --- Diff:
https://github.com/kamailio/kamailio/commit/ba8a06d2988e41b09947d3ae3386a13…
Patch:
https://github.com/kamailio/kamailio/commit/ba8a06d2988e41b09947d3ae3386a13…
[View Less]
1
0
0
0
git:master:fedafcff: modules: readme files regenerated - ruxc ... [skip ci]
by Kamailio Dev
20 Aug '21
20 Aug '21
Module: kamailio Branch: master Commit: fedafcff44ab2161314ab4b15e9e9c64ca2f8c7d URL:
https://github.com/kamailio/kamailio/commit/fedafcff44ab2161314ab4b15e9e9c6…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org> Committer: Kamailio Dev <kamailio.dev(a)kamailio.org> Date: 2021-08-20T08:16:19+02:00 modules: readme files regenerated - ruxc ... [skip ci] --- Modified: src/modules/ruxc/README --- Diff:
https://github.com/kamailio/kamailio/commit/fedafcff44ab2161314ab4b15e9e9c6…
…
[View More]
Patch:
https://github.com/kamailio/kamailio/commit/fedafcff44ab2161314ab4b15e9e9c6…
--- diff --git a/src/modules/ruxc/README b/src/modules/ruxc/README index 6bade01585..210aa2303b 100644 --- a/src/modules/ruxc/README +++ b/src/modules/ruxc/README @@ -30,6 +30,8 @@ Daniel-Constantin Mierla 3.2. http_tlsmode (int) 3.3. http_reuse (int) 3.4. http_retry (int) + 3.5. http_logtype (int) + 3.6. http_debug (int) 4. Functions @@ -44,9 +46,11 @@ Daniel-Constantin Mierla 1.2. Set http_tlsmode parameter 1.3. Set http_reuse parameter 1.4. Set http_retry parameter - 1.5. ruxc_http_get() usage - 1.6. ruxc_http_post() usage - 1.7. Libruxc Usage + 1.5. Set http_logtype parameter + 1.6. Set http_debug parameter + 1.7. ruxc_http_get() usage + 1.8. ruxc_http_post() usage + 1.9. Libruxc Usage Chapter 1. Admin Guide @@ -64,6 +68,8 @@ Chapter 1. Admin Guide 3.2. http_tlsmode (int) 3.3. http_reuse (int) 3.4. http_retry (int) + 3.5. http_logtype (int) + 3.6. http_debug (int) 4. Functions @@ -103,6 +109,8 @@ Chapter 1. Admin Guide 3.2. http_tlsmode (int) 3.3. http_reuse (int) 3.4. http_retry (int) + 3.5. http_logtype (int) + 3.6. http_debug (int) 3.1. http_timeout (int) @@ -158,6 +166,29 @@ modparam("ruxc", "http_reuse", 1) modparam("ruxc", "http_retry", 2) ... +3.5. http_logtype (int) + + Set the log type for libruxc http functions: 0 - stdout; 1 - syslog. + + Default value is 0. + + Example 1.5. Set http_logtype parameter +... +modparam("ruxc", "http_logtype", 1) +... + +3.6. http_debug (int) + + Set the debug mode for libruxc http functions: 0 - no debug; 1 - + errors; 2 - debug. + + Default value is 0. + + Example 1.6. Set http_debug parameter +... +modparam("ruxc", "http_debug", 1) +... + 4. Functions 4.1. ruxc_http_get(url, hdrs, respv) @@ -175,7 +206,7 @@ modparam("ruxc", "http_retry", 2) This function can be used from ANY_ROUTE. - Example 1.5. ruxc_http_get() usage + Example 1.7. ruxc_http_get() usage ... ruxc_http_get("
http://api.com/index.php?r_uri=$(ru{s.escape.param})&f_uri=$(fu{s
.escape.param})", @@ -198,7 +229,7 @@ switch ($rc) { This function can be used from ANY_ROUTE. - Example 1.6. ruxc_http_post() usage + Example 1.8. ruxc_http_post() usage ... ruxc_http_post("
http://api.com/index.php?r_uri=$(ru{s.escape.param})&f_uri=$(fu{
s.escape.param})", @@ -221,7 +252,7 @@ switch ($rc) { installed and its environment configured, then run the following commands: - Example 1.7. Libruxc Usage + Example 1.9. Libruxc Usage ... git clone
https://github.com/miconda/ruxc
cd ruxc
[View Less]
1
0
0
0
← Newer
1
...
17
18
19
20
21
22
23
...
27
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
Results per page:
10
25
50
100
200