Browse Source

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
Daniel-Constantin Mierla 8 years ago
parent
commit
a83729bf73

+ 1 - 1
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 */

+ 1 - 1
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;
 

+ 1 - 1
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;