Module: kamailio
Branch: master
Commit: 389c409cb51fd8cd8036aca081530720e61c42af
URL:
https://github.com/kamailio/kamailio/commit/389c409cb51fd8cd8036aca08153072…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-04-18T08:28:20+02:00
jsonrpcs: set pretty_format param to 1 by default
- kamctl relies on it for some response processing
---
Modified: src/modules/jsonrpcs/doc/jsonrpcs_admin.xml
Modified: src/modules/jsonrpcs/jsonrpcs_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/389c409cb51fd8cd8036aca08153072…
Patch:
https://github.com/kamailio/kamailio/commit/389c409cb51fd8cd8036aca08153072…
---
diff --git a/src/modules/jsonrpcs/doc/jsonrpcs_admin.xml
b/src/modules/jsonrpcs/doc/jsonrpcs_admin.xml
index 4b64db557e..d6d7d7c753 100644
--- a/src/modules/jsonrpcs/doc/jsonrpcs_admin.xml
+++ b/src/modules/jsonrpcs/doc/jsonrpcs_admin.xml
@@ -86,18 +86,19 @@
<section id="jsonrpcs.p.pretty_format">
<title><varname>pretty_format</varname> (int)</title>
<para>
- Pretty format for JSON-RPC response document.
+ Pretty format for JSON-RPC response document if set to 1. To
+ disable, set to 0.
</para>
<para>
<emphasis>
- Default value is '0'.
+ Default value is '1' (on).
</emphasis>
</para>
<example>
<title>Set <varname>pretty_format</varname> parameter</title>
<programlisting format="linespecific">
...
-modparam("jsonrpcs", "pretty_format", 1)
+modparam("jsonrpcs", "pretty_format", 0)
...
</programlisting>
</example>
diff --git a/src/modules/jsonrpcs/jsonrpcs_mod.c b/src/modules/jsonrpcs/jsonrpcs_mod.c
index 98d66cc5cb..7ef1e39d34 100644
--- a/src/modules/jsonrpcs/jsonrpcs_mod.c
+++ b/src/modules/jsonrpcs/jsonrpcs_mod.c
@@ -76,7 +76,7 @@ static str JSONRPC_CONTENT_TYPE_HTML =
str_init("application/json");
/*!< 0 - all available; 1 - http; 2 - fifo; 4 - datagram */
static int jsonrpc_transport = 6; /* fifo + datagram */
-static int jsonrpc_pretty_format = 0;
+static int jsonrpc_pretty_format = 1;
static int jsonrpc_register_rpc(void);