Module: kamailio
Branch: master
Commit: a83729bf733a4fc6f3bba5cf57a139eae7e1b2ab
URL:
https://github.com/kamailio/kamailio/commit/a83729bf733a4fc6f3bba5cf57a139e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-12-19T18:20:32+01:00
jsonrpcs: set default transports to fifo and udp unixsock
- default fifo file name is kamailio_rpc.fifo
- default unix socket file name is kamailio_rpc.sock
- they are created in the runtime dir
---
Modified: src/modules/jsonrpcs/jsonrpcs_fifo.c
Modified: src/modules/jsonrpcs/jsonrpcs_mod.c
Modified: src/modules/jsonrpcs/jsonrpcs_sock.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a83729bf733a4fc6f3bba5cf57a139e…
Patch:
https://github.com/kamailio/kamailio/commit/a83729bf733a4fc6f3bba5cf57a139e…
---
diff --git a/src/modules/jsonrpcs/jsonrpcs_fifo.c b/src/modules/jsonrpcs/jsonrpcs_fifo.c
index 8a81064..e399328 100644
--- a/src/modules/jsonrpcs/jsonrpcs_fifo.c
+++ b/src/modules/jsonrpcs/jsonrpcs_fifo.c
@@ -38,7 +38,7 @@
#include "jsonrpcs_mod.h"
/* FIFO server parameters */
-char *jsonrpc_fifo = NULL; /*!< FIFO file name */
+char *jsonrpc_fifo = NAME "_rpc.fifo"; /*!< FIFO file name */
char *jsonrpc_fifo_reply_dir = "/tmp/"; /*!< dir where reply fifos are
allowed */
int jsonrpc_fifo_uid = -1; /*!< Fifo default UID */
char *jsonrpc_fifo_uid_s = 0; /*!< Fifo default User ID name */
diff --git a/src/modules/jsonrpcs/jsonrpcs_mod.c b/src/modules/jsonrpcs/jsonrpcs_mod.c
index f0205fc..8bb2f6c 100644
--- a/src/modules/jsonrpcs/jsonrpcs_mod.c
+++ b/src/modules/jsonrpcs/jsonrpcs_mod.c
@@ -70,7 +70,7 @@ static str JSONRPC_REASON_OK = str_init("OK");
static str JSONRPC_CONTENT_TYPE_HTML = str_init("application/json");
/*!< 0 - all available; 1 - http; 2 - fifo; 4 - datagram */
-static int jsonrpc_transport = 0;
+static int jsonrpc_transport = 6; /* fifo + datagram */
static int jsonrpc_pretty_format = 0;
diff --git a/src/modules/jsonrpcs/jsonrpcs_sock.c b/src/modules/jsonrpcs/jsonrpcs_sock.c
index 0042411..fbc9f8f 100644
--- a/src/modules/jsonrpcs/jsonrpcs_sock.c
+++ b/src/modules/jsonrpcs/jsonrpcs_sock.c
@@ -74,7 +74,7 @@ static jsonrpc_dgram_sockaddr_t jsonrpc_dgram_addr;
static jsonrpc_dgram_rx_tx_t jsonrpc_dgram_sockets;
/* dgram unixsock specific parameters */
-char *jsonrpc_dgram_socket = 0;
+char *jsonrpc_dgram_socket = NAME "_rpc.sock";
int jsonrpc_dgram_workers = 1;
int jsonrpc_dgram_timeout = 2000;
int jsonrpc_dgram_unix_socket_uid = -1;