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
October 2017
----- 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
33 participants
302 discussions
Start a n
N
ew thread
git:master:a2b862a7: jsonrpcs: set rank PROC_RPC for fifo and dgram processes
by Daniel-Constantin Mierla
21 Oct '17
21 Oct '17
Module: kamailio Branch: master Commit: a2b862a74c77bc71238d9b8c9ef19ddb629c75ce URL:
https://github.com/kamailio/kamailio/commit/a2b862a74c77bc71238d9b8c9ef19dd…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-10-21T11:47:35+02:00 jsonrpcs: set rank PROC_RPC for fifo and dgram processes --- Modified: src/modules/jsonrpcs/jsonrpcs_fifo.c Modified: src/modules/jsonrpcs/jsonrpcs_sock.c --- Diff:
https://github.com/kamailio/kamailio/commit/a2b862a74c77bc71238d9b8c9ef19dd…
Patch:
https://github.com/kamailio/kamailio/commit/a2b862a74c77bc71238d9b8c9ef19dd…
--- diff --git a/src/modules/jsonrpcs/jsonrpcs_fifo.c b/src/modules/jsonrpcs/jsonrpcs_fifo.c index 53d62662b0..85b65c43bc 100644 --- a/src/modules/jsonrpcs/jsonrpcs_fifo.c +++ b/src/modules/jsonrpcs/jsonrpcs_fifo.c @@ -550,7 +550,7 @@ int jsonrpc_fifo_child_init(int rank) LM_ERR("invalid fifo file path\n"); } - pid=fork_process(PROC_NOCHLDINIT, "JSONRPCS FIFO", 1); + pid=fork_process(PROC_RPC, "JSONRPCS FIFO", 1); if (pid<0) { return -1; /* error */ } diff --git a/src/modules/jsonrpcs/jsonrpcs_sock.c b/src/modules/jsonrpcs/jsonrpcs_sock.c index 3347959448..94a068b3f5 100644 --- a/src/modules/jsonrpcs/jsonrpcs_sock.c +++ b/src/modules/jsonrpcs/jsonrpcs_sock.c @@ -453,7 +453,7 @@ int jsonrpc_dgram_child_init(int rank) return -1; } for(i=0; i<jsonrpc_dgram_workers; i++) { - pid=fork_process(PROC_NOCHLDINIT, "JSONRPCS DATAGRAM", 1); + pid=fork_process(PROC_RPC, "JSONRPCS DATAGRAM", 1); if (pid<0) return -1; /* error */ if(pid==0) {
1
0
0
0
git:master:d4f11b6f: jsonrpcs: updated the name of module in description of extra procs
by Daniel-Constantin Mierla
20 Oct '17
20 Oct '17
Module: kamailio Branch: master Commit: d4f11b6ffc459faf5c6577cc3374420c1469baeb URL:
https://github.com/kamailio/kamailio/commit/d4f11b6ffc459faf5c6577cc3374420…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-10-20T11:23:06+02:00 jsonrpcs: updated the name of module in description of extra procs --- Modified: src/modules/jsonrpcs/jsonrpcs_fifo.c Modified: src/modules/jsonrpcs/jsonrpcs_sock.c --- Diff:
https://github.com/kamailio/kamailio/commit/d4f11b6ffc459faf5c6577cc3374420…
Patch:
https://github.com/kamailio/kamailio/commit/d4f11b6ffc459faf5c6577cc3374420…
--- diff --git a/src/modules/jsonrpcs/jsonrpcs_fifo.c b/src/modules/jsonrpcs/jsonrpcs_fifo.c index c44a55c236..53d62662b0 100644 --- a/src/modules/jsonrpcs/jsonrpcs_fifo.c +++ b/src/modules/jsonrpcs/jsonrpcs_fifo.c @@ -550,7 +550,7 @@ int jsonrpc_fifo_child_init(int rank) LM_ERR("invalid fifo file path\n"); } - pid=fork_process(PROC_NOCHLDINIT, "JSONRPC-S FIFO", 1); + pid=fork_process(PROC_NOCHLDINIT, "JSONRPCS FIFO", 1); if (pid<0) { return -1; /* error */ } diff --git a/src/modules/jsonrpcs/jsonrpcs_sock.c b/src/modules/jsonrpcs/jsonrpcs_sock.c index c61fa6da28..3347959448 100644 --- a/src/modules/jsonrpcs/jsonrpcs_sock.c +++ b/src/modules/jsonrpcs/jsonrpcs_sock.c @@ -453,7 +453,7 @@ int jsonrpc_dgram_child_init(int rank) return -1; } for(i=0; i<jsonrpc_dgram_workers; i++) { - pid=fork_process(PROC_NOCHLDINIT, "JSONRPC-S DATAGRAM", 1); + pid=fork_process(PROC_NOCHLDINIT, "JSONRPCS DATAGRAM", 1); if (pid<0) return -1; /* error */ if(pid==0) {
1
0
0
0
[kamailio/kamailio] No music on hold (#1273)
by Fyodor
19 Oct '17
19 Oct '17
os: ubuntu 16.04 installation: apt install kamailio rttproxy configured and works(SRTP works fine) Databases for mohqueue exist My kamailio.cfg: ``` loadmodule "mohqueue.so" # --- music on hold moh ---- modparam ("mohqueue", "db_url", "mysql://kamailio:MYPASSWORDHERE@localhost/kamailio") modparam ("mohqueue", "mohdir", "/etc/kamailio/moh") modparam ("mohqueue", "moh_maxcalls", 3000) ``` ``` fed@vps1:/etc/kamailio# ls -al /etc/kamailio/moh/ total 185424 drwxr-xr-x 2 kamailio kamailio 4096 Oct 8 09:32 ./ drwxr-xr-x 3 root root 4096 Oct 8 10:04 ../ -rw-r--r-- 1 kamailio kamailio 8627660 Oct 8 09:32 hold.0 -rw-r--r-- 1 kamailio kamailio 8627660 Oct 8 09:32 hold.1 -rw-r--r-- 1 kamailio kamailio 8627660 Oct 8 09:32 hold.10 -rw-r--r-- 1 kamailio kamailio 8627660 Oct 8 09:32 hold.11 -rw-r--r-- 1 kamailio kamailio 8627660 Oct 8 09:32 hold.12 -rw-r--r-- 1 kamailio kamailio 8627660 Oct 8 09:32 hold.13 -rw-r--r-- 1 kamailio kamailio 8627660 Oct 8 09:32 hold.14 -rw-r--r-- 1 kamailio kamailio 8627660 Oct 8 09:32 hold.15 -rw-r--r-- 1 kamailio kamailio 8627660 Oct 8 09:32 hold.16 -rw-r--r-- 1 kamailio kamailio 8627660 Oct 8 09:32 hold.17 -rw-r--r-- 1 kamailio kamailio 8627660 Oct 8 09:32 hold.18 -rw-r--r-- 1 kamailio kamailio 8627660 Oct 8 09:32 hold.19 -rw-r--r-- 1 kamailio kamailio 8627660 Oct 8 09:32 hold.2 -rw-r--r-- 1 kamailio kamailio 8627660 Oct 8 09:32 hold.20 -rw-r--r-- 1 kamailio kamailio 8627660 Oct 8 09:32 hold.3 -rw-r--r-- 1 kamailio kamailio 8627660 Oct 8 09:32 hold.4 -rw-r--r-- 1 kamailio kamailio 8627660 Oct 8 09:32 hold.5 -rw-r--r-- 1 kamailio kamailio 8627660 Oct 8 09:32 hold.6 -rw-r--r-- 1 kamailio kamailio 8627660 Oct 8 09:32 hold.7 -rw-r--r-- 1 kamailio kamailio 8627660 Oct 8 09:32 hold.8 -rw-r--r-- 1 kamailio kamailio 8627660 Oct 8 09:32 hold.9 -rw-r--r-- 1 kamailio kamailio 8627660 Jan 2 2017 hold.wav ``` No errors or warnings in log file. Calls work fine, but no music on hold. Can anybody help me, please? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1273
3
4
0
0
git:4.4:471f8843: pkg/kamailio/deb: fix kamailio-berkeley-modules dependence
by Victor Seva
19 Oct '17
19 Oct '17
Module: kamailio Branch: 4.4 Commit: 471f8843cf3fa65e5215c284337e1206e1e96c9e URL:
https://github.com/kamailio/kamailio/commit/471f8843cf3fa65e5215c284337e120…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2017-10-19T10:40:45+02:00 pkg/kamailio/deb: fix kamailio-berkeley-modules dependence --- Modified: pkg/kamailio/deb/debian/control Modified: pkg/kamailio/deb/jessie/control Modified: pkg/kamailio/deb/precise/control Modified: pkg/kamailio/deb/sid/control Modified: pkg/kamailio/deb/squeeze/control Modified: pkg/kamailio/deb/stretch/control Modified: pkg/kamailio/deb/trusty/control Modified: pkg/kamailio/deb/wheezy/control Modified: pkg/kamailio/deb/xenial/control --- Diff:
https://github.com/kamailio/kamailio/commit/471f8843cf3fa65e5215c284337e120…
Patch:
https://github.com/kamailio/kamailio/commit/471f8843cf3fa65e5215c284337e120…
1
0
0
0
git:5.0:60dc10a3: pkg/kamailio/deb: fix kamailio-berkeley-modules dependence
by Victor Seva
19 Oct '17
19 Oct '17
Module: kamailio Branch: 5.0 Commit: 60dc10a3948bdc51d1c9298e8a174a0af066557a URL:
https://github.com/kamailio/kamailio/commit/60dc10a3948bdc51d1c9298e8a174a0…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2017-10-19T10:36:27+02:00 pkg/kamailio/deb: fix kamailio-berkeley-modules dependence --- Modified: pkg/kamailio/deb/debian/control Modified: pkg/kamailio/deb/jessie/control Modified: pkg/kamailio/deb/precise/control Modified: pkg/kamailio/deb/sid/control Modified: pkg/kamailio/deb/stretch/control Modified: pkg/kamailio/deb/trusty/control Modified: pkg/kamailio/deb/wheezy/control Modified: pkg/kamailio/deb/xenial/control --- Diff:
https://github.com/kamailio/kamailio/commit/60dc10a3948bdc51d1c9298e8a174a0…
Patch:
https://github.com/kamailio/kamailio/commit/60dc10a3948bdc51d1c9298e8a174a0…
--- diff --git a/pkg/kamailio/deb/debian/control b/pkg/kamailio/deb/debian/control index 488c082045..eb22c68222 100644 --- a/pkg/kamailio/deb/debian/control +++ b/pkg/kamailio/deb/debian/control @@ -422,7 +422,7 @@ Package: kamailio-berkeley-modules Architecture: linux-any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} -Depends: db5.1-util, +Depends: db-util (>= 4.6.19), kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} diff --git a/pkg/kamailio/deb/jessie/control b/pkg/kamailio/deb/jessie/control index eb2e603f3c..5c71aa4150 100644 --- a/pkg/kamailio/deb/jessie/control +++ b/pkg/kamailio/deb/jessie/control @@ -420,7 +420,7 @@ Package: kamailio-berkeley-modules Architecture: linux-any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} -Depends: db5.1-util, +Depends: db-util (>= 4.6.19), kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} diff --git a/pkg/kamailio/deb/precise/control b/pkg/kamailio/deb/precise/control index 070856edcc..afb94c80f3 100644 --- a/pkg/kamailio/deb/precise/control +++ b/pkg/kamailio/deb/precise/control @@ -416,7 +416,7 @@ Package: kamailio-berkeley-modules Architecture: linux-any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} -Depends: db5.1-util, +Depends: db-util (>= 4.6.19), kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} diff --git a/pkg/kamailio/deb/sid/control b/pkg/kamailio/deb/sid/control index e9e8231d62..2747c390d5 100644 --- a/pkg/kamailio/deb/sid/control +++ b/pkg/kamailio/deb/sid/control @@ -420,7 +420,7 @@ Package: kamailio-berkeley-modules Architecture: linux-any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} -Depends: db5.1-util, +Depends: db-util (>= 4.6.19), kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} diff --git a/pkg/kamailio/deb/stretch/control b/pkg/kamailio/deb/stretch/control index e9e8231d62..2747c390d5 100644 --- a/pkg/kamailio/deb/stretch/control +++ b/pkg/kamailio/deb/stretch/control @@ -420,7 +420,7 @@ Package: kamailio-berkeley-modules Architecture: linux-any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} -Depends: db5.1-util, +Depends: db-util (>= 4.6.19), kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} diff --git a/pkg/kamailio/deb/trusty/control b/pkg/kamailio/deb/trusty/control index d63ab59d31..4e375f6700 100644 --- a/pkg/kamailio/deb/trusty/control +++ b/pkg/kamailio/deb/trusty/control @@ -418,7 +418,7 @@ Package: kamailio-berkeley-modules Architecture: linux-any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} -Depends: db5.1-util, +Depends: db-util (>= 4.6.19), kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} diff --git a/pkg/kamailio/deb/wheezy/control b/pkg/kamailio/deb/wheezy/control index 070856edcc..afb94c80f3 100644 --- a/pkg/kamailio/deb/wheezy/control +++ b/pkg/kamailio/deb/wheezy/control @@ -416,7 +416,7 @@ Package: kamailio-berkeley-modules Architecture: linux-any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} -Depends: db5.1-util, +Depends: db-util (>= 4.6.19), kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} diff --git a/pkg/kamailio/deb/xenial/control b/pkg/kamailio/deb/xenial/control index 0a03ef75fc..2e931f4cd9 100644 --- a/pkg/kamailio/deb/xenial/control +++ b/pkg/kamailio/deb/xenial/control @@ -421,7 +421,7 @@ Package: kamailio-berkeley-modules Architecture: linux-any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} -Depends: db5.1-util, +Depends: db-util (>= 4.6.19), kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
1
0
0
0
git:master:3a1e8807: pkg/kamailio/deb: fix kamailio-berkeley-modules dependence
by Victor Seva
19 Oct '17
19 Oct '17
Module: kamailio Branch: master Commit: 3a1e8807d340dd7907b310006a18a7e82e795d2b URL:
https://github.com/kamailio/kamailio/commit/3a1e8807d340dd7907b310006a18a7e…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2017-10-19T10:31:51+02:00 pkg/kamailio/deb: fix kamailio-berkeley-modules dependence --- Modified: pkg/kamailio/deb/buster/control Modified: pkg/kamailio/deb/debian/control Modified: pkg/kamailio/deb/jessie/control Modified: pkg/kamailio/deb/precise/control Modified: pkg/kamailio/deb/sid/control Modified: pkg/kamailio/deb/stretch/control Modified: pkg/kamailio/deb/trusty/control Modified: pkg/kamailio/deb/wheezy/control Modified: pkg/kamailio/deb/xenial/control --- Diff:
https://github.com/kamailio/kamailio/commit/3a1e8807d340dd7907b310006a18a7e…
Patch:
https://github.com/kamailio/kamailio/commit/3a1e8807d340dd7907b310006a18a7e…
1
0
0
0
git:5.0:1b86bf2f: jsonrpcs: proper propagation of rpc fault code and message
by Daniel-Constantin Mierla
19 Oct '17
19 Oct '17
Module: kamailio Branch: 5.0 Commit: 1b86bf2faa09d3a9ef3684f42582a83267635668 URL:
https://github.com/kamailio/kamailio/commit/1b86bf2faa09d3a9ef3684f42582a83…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-10-19T09:00:34+02:00 jsonrpcs: proper propagation of rpc fault code and message (cherry picked from commit 9364b1691412ec1d3d59ca8a801613470e079c1d) --- Modified: src/modules/jsonrpcs/jsonrpcs_mod.c Modified: src/modules/jsonrpcs/jsonrpcs_mod.h --- Diff:
https://github.com/kamailio/kamailio/commit/1b86bf2faa09d3a9ef3684f42582a83…
Patch:
https://github.com/kamailio/kamailio/commit/1b86bf2faa09d3a9ef3684f42582a83…
--- diff --git a/src/modules/jsonrpcs/jsonrpcs_mod.c b/src/modules/jsonrpcs/jsonrpcs_mod.c index 2103f75dfc..adf423d4ef 100644 --- a/src/modules/jsonrpcs/jsonrpcs_mod.c +++ b/src/modules/jsonrpcs/jsonrpcs_mod.c @@ -298,13 +298,23 @@ static void jsonrpc_fault(jsonrpc_ctx_t* ctx, int code, char* fmt, ...) jsonrpc_delayed_reply_ctx_init(ctx); - ctx->http_code = code; + if(code <= 100) { + ctx->http_code = 500; + } else { + ctx->http_code = code; + } va_start(ap, fmt); vsnprintf(jsonrpc_error_buf, JSONRPC_ERROR_REASON_BUF_LEN, fmt, ap); va_end(ap); - ctx->http_text.len = strlen(jsonrpc_error_buf); + ctx->error_text.len = strlen(jsonrpc_error_buf); + ctx->error_text.s = jsonrpc_error_buf; + ctx->http_text.len = ctx->error_text.len; ctx->http_text.s = jsonrpc_error_buf; - if(ctx->error_code == 0) ctx->error_code = -32000; + if(code == 0) { + ctx->error_code = -32000; + } else { + ctx->error_code = code; + } return; } @@ -347,8 +357,14 @@ static int jsonrpc_send(jsonrpc_ctx_t* ctx) _jsonrpc_error_table[i].text.s, _jsonrpc_error_table[i].text.len); } else { - srjson_AddStrStrToObject(ctx->jrpl, nj, - "message", 7, "Unexpected Error", 16); + if(ctx->error_text.len>0) { + srjson_AddStrStrToObject(ctx->jrpl, nj, + "message", 7, + ctx->error_text.s, ctx->error_text.len); + } else { + srjson_AddStrStrToObject(ctx->jrpl, nj, + "message", 7, "Unexpected Error", 16); + } } srjson_AddItemToObject(ctx->jrpl, ctx->jrpl->root, "error", nj); } diff --git a/src/modules/jsonrpcs/jsonrpcs_mod.h b/src/modules/jsonrpcs/jsonrpcs_mod.h index eec2a743b0..ef15c3ec93 100644 --- a/src/modules/jsonrpcs/jsonrpcs_mod.h +++ b/src/modules/jsonrpcs/jsonrpcs_mod.h @@ -50,6 +50,7 @@ typedef struct jsonrpc_ctx { srjson_t *rpl_node; /**< Pointer to crt node in json reply doc */ int reply_sent; /**< Flag set if the json reply was sent */ int error_code; /**< Json error code */ + str error_text; /**< Json error text */ int http_code; /**< http reply code */ str http_text; /**< http reply reason text */ int transport; /**< RPC transport */
1
0
0
0
git:5.0:71876926: xmlrpc: fix handling the optional param spec on no more params
by Daniel-Constantin Mierla
19 Oct '17
19 Oct '17
Module: kamailio Branch: 5.0 Commit: 71876926dd7add9f7423bda1aa4489933d8174ac URL:
https://github.com/kamailio/kamailio/commit/71876926dd7add9f7423bda1aa44899…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-10-19T09:00:21+02:00 xmlrpc: fix handling the optional param spec on no more params (cherry picked from commit 9483efe6af26a2a8b08ee132e8ed2afe25e71cbc) --- Modified: src/modules/xmlrpc/xmlrpc.c --- Diff:
https://github.com/kamailio/kamailio/commit/71876926dd7add9f7423bda1aa44899…
Patch:
https://github.com/kamailio/kamailio/commit/71876926dd7add9f7423bda1aa44899…
--- diff --git a/src/modules/xmlrpc/xmlrpc.c b/src/modules/xmlrpc/xmlrpc.c index e40f32b485..7cce80090d 100644 --- a/src/modules/xmlrpc/xmlrpc.c +++ b/src/modules/xmlrpc/xmlrpc.c @@ -1525,7 +1525,13 @@ static int rpc_scan(rpc_ctx_t* ctx, char* fmt, ...) f=(autoconvert?GET_X_AUTOCONV:0) | (lflf2crlf?GET_X_LFLF2CRLF:0); while(*fmt) { - if (!ctx->act_param) goto error; + if (!ctx->act_param) { + if(*fmt=='*') { + break; + } else { + goto error; + } + } value = ctx->act_param->xmlChildrenNode; switch(*fmt) {
1
0
0
0
git:5.0:dc9efda1: jsonrpcs: fix handling the optional param spec on no more params
by Daniel-Constantin Mierla
19 Oct '17
19 Oct '17
Module: kamailio Branch: 5.0 Commit: dc9efda1bb416874fd3fe4320326d067fa9fb0c0 URL:
https://github.com/kamailio/kamailio/commit/dc9efda1bb416874fd3fe4320326d06…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-10-19T09:00:10+02:00 jsonrpcs: fix handling the optional param spec on no more params (cherry picked from commit 87d71619e7896d3d333bb6c15d4c00616add71a6) --- Modified: src/modules/jsonrpcs/jsonrpcs_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/dc9efda1bb416874fd3fe4320326d06…
Patch:
https://github.com/kamailio/kamailio/commit/dc9efda1bb416874fd3fe4320326d06…
--- diff --git a/src/modules/jsonrpcs/jsonrpcs_mod.c b/src/modules/jsonrpcs/jsonrpcs_mod.c index b30beafd55..2103f75dfc 100644 --- a/src/modules/jsonrpcs/jsonrpcs_mod.c +++ b/src/modules/jsonrpcs/jsonrpcs_mod.c @@ -648,7 +648,7 @@ static int jsonrpc_scan(jsonrpc_ctx_t* ctx, char* fmt, ...) ctx->req_node = ctx->req_node->next; } /* error if there is still a scan char type and it is not optional */ - if(*fmt && mandatory_param==1) + if(*fmt && *fmt!='*' && mandatory_param==1) goto error; va_end(ap);
1
0
0
0
git:master:9364b169: jsonrpcs: proper propagation of rpc fault code and message
by Daniel-Constantin Mierla
19 Oct '17
19 Oct '17
Module: kamailio Branch: master Commit: 9364b1691412ec1d3d59ca8a801613470e079c1d URL:
https://github.com/kamailio/kamailio/commit/9364b1691412ec1d3d59ca8a8016134…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-10-19T08:58:59+02:00 jsonrpcs: proper propagation of rpc fault code and message --- Modified: src/modules/jsonrpcs/jsonrpcs_mod.c Modified: src/modules/jsonrpcs/jsonrpcs_mod.h --- Diff:
https://github.com/kamailio/kamailio/commit/9364b1691412ec1d3d59ca8a8016134…
Patch:
https://github.com/kamailio/kamailio/commit/9364b1691412ec1d3d59ca8a8016134…
--- diff --git a/src/modules/jsonrpcs/jsonrpcs_mod.c b/src/modules/jsonrpcs/jsonrpcs_mod.c index e2b4b80cb6..633847fc9d 100644 --- a/src/modules/jsonrpcs/jsonrpcs_mod.c +++ b/src/modules/jsonrpcs/jsonrpcs_mod.c @@ -299,13 +299,23 @@ static void jsonrpc_fault(jsonrpc_ctx_t* ctx, int code, char* fmt, ...) jsonrpc_delayed_reply_ctx_init(ctx); - ctx->http_code = code; + if(code <= 100) { + ctx->http_code = 500; + } else { + ctx->http_code = code; + } va_start(ap, fmt); vsnprintf(jsonrpc_error_buf, JSONRPC_ERROR_REASON_BUF_LEN, fmt, ap); va_end(ap); - ctx->http_text.len = strlen(jsonrpc_error_buf); + ctx->error_text.len = strlen(jsonrpc_error_buf); + ctx->error_text.s = jsonrpc_error_buf; + ctx->http_text.len = ctx->error_text.len; ctx->http_text.s = jsonrpc_error_buf; - if(ctx->error_code == 0) ctx->error_code = -32000; + if(code == 0) { + ctx->error_code = -32000; + } else { + ctx->error_code = code; + } return; } @@ -348,8 +358,14 @@ static int jsonrpc_send(jsonrpc_ctx_t* ctx) _jsonrpc_error_table[i].text.s, _jsonrpc_error_table[i].text.len); } else { - srjson_AddStrStrToObject(ctx->jrpl, nj, - "message", 7, "Unexpected Error", 16); + if(ctx->error_text.len>0) { + srjson_AddStrStrToObject(ctx->jrpl, nj, + "message", 7, + ctx->error_text.s, ctx->error_text.len); + } else { + srjson_AddStrStrToObject(ctx->jrpl, nj, + "message", 7, "Unexpected Error", 16); + } } srjson_AddItemToObject(ctx->jrpl, ctx->jrpl->root, "error", nj); } diff --git a/src/modules/jsonrpcs/jsonrpcs_mod.h b/src/modules/jsonrpcs/jsonrpcs_mod.h index eec2a743b0..ef15c3ec93 100644 --- a/src/modules/jsonrpcs/jsonrpcs_mod.h +++ b/src/modules/jsonrpcs/jsonrpcs_mod.h @@ -50,6 +50,7 @@ typedef struct jsonrpc_ctx { srjson_t *rpl_node; /**< Pointer to crt node in json reply doc */ int reply_sent; /**< Flag set if the json reply was sent */ int error_code; /**< Json error code */ + str error_text; /**< Json error text */ int http_code; /**< http reply code */ str http_text; /**< http reply reason text */ int transport; /**< RPC transport */
1
0
0
0
← Newer
1
...
18
19
20
21
22
23
24
...
31
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
Results per page:
10
25
50
100
200