[sr-dev] git:master:f6050e23: janssonrpcc: fixed errors from previous commit
Daniel-Constantin Mierla
miconda at gmail.com
Fri Dec 6 09:58:51 CET 2019
Module: kamailio
Branch: master
Commit: f6050e2342c3b7f2c7ede45ce96707a5a45b5aa8
URL: https://github.com/kamailio/kamailio/commit/f6050e2342c3b7f2c7ede45ce96707a5a45b5aa8
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-12-06T09:57:54+01:00
janssonrpcc: fixed errors from previous commit
---
Modified: src/modules/janssonrpcc/janssonrpc.h
Modified: src/modules/janssonrpcc/janssonrpc_io.c
Modified: src/modules/janssonrpcc/janssonrpc_request.c
Modified: src/modules/janssonrpcc/janssonrpc_server.c
---
Diff: https://github.com/kamailio/kamailio/commit/f6050e2342c3b7f2c7ede45ce96707a5a45b5aa8.diff
Patch: https://github.com/kamailio/kamailio/commit/f6050e2342c3b7f2c7ede45ce96707a5a45b5aa8.patch
---
diff --git a/src/modules/janssonrpcc/janssonrpc.h b/src/modules/janssonrpcc/janssonrpc.h
index 32d14a7cb1..d8b6ffbedb 100644
--- a/src/modules/janssonrpcc/janssonrpc.h
+++ b/src/modules/janssonrpcc/janssonrpc.h
@@ -94,8 +94,8 @@ extern const str null_str;
#define jsr_ms_to_tv(ms, tv) \
do { \
memset(&tv, 0, sizeof(struct timeval)); \
- tv.tv_sec = time/1000; \
- tv.tv_usec = ((time % 1000) * 1000); \
+ tv.tv_sec = ms/1000; \
+ tv.tv_usec = ((ms % 1000) * 1000); \
} while(0)
#endif /* _JSONRPC_H_ */
diff --git a/src/modules/janssonrpcc/janssonrpc_io.c b/src/modules/janssonrpcc/janssonrpc_io.c
index 3818662c4a..ebb64705b5 100644
--- a/src/modules/janssonrpcc/janssonrpc_io.c
+++ b/src/modules/janssonrpcc/janssonrpc_io.c
@@ -444,7 +444,7 @@ int jsonrpc_send(str conn, jsonrpc_request_t* req, bool notify_only)
free_req_cmd(req->cmd);
free_request(req);
} else {
- const struct timeval tv;
+ struct timeval tv;
jsr_ms_to_tv(req->timeout, tv);
req->timeout_ev = evtimer_new(global_ev_base, timeout_cb, (void*)req);
diff --git a/src/modules/janssonrpcc/janssonrpc_request.c b/src/modules/janssonrpcc/janssonrpc_request.c
index 8cddee5704..ecd43c1476 100644
--- a/src/modules/janssonrpcc/janssonrpc_request.c
+++ b/src/modules/janssonrpcc/janssonrpc_request.c
@@ -230,7 +230,7 @@ void retry_cb(int fd, short event, void* arg)
int schedule_retry(jsonrpc_request_t* req)
{
- const struct timeval tv;
+ struct timeval tv;
unsigned int ltime;
if(!req) {
diff --git a/src/modules/janssonrpcc/janssonrpc_server.c b/src/modules/janssonrpcc/janssonrpc_server.c
index e8c50cc3fa..6c4b999b50 100644
--- a/src/modules/janssonrpcc/janssonrpc_server.c
+++ b/src/modules/janssonrpcc/janssonrpc_server.c
@@ -280,7 +280,7 @@ int jsonrpc_server_from_srv(str conn, str srv,
server = create_server();
CHECK_MALLOC(server);
- shm_str_dup(&server->conn, &/conn);
+ shm_str_dup(&server->conn, &conn);
CHECK_MALLOC_GOTO(server->conn.s, error);
shm_str_dup(&server->addr, &name);
More information about the sr-dev
mailing list