[sr-dev] git:master:30d206d1: jsonrpc: log message if rpc response fails to be sent via datagram
Daniel-Constantin Mierla
miconda at gmail.com
Sun Dec 4 22:08:10 CET 2016
Module: kamailio
Branch: master
Commit: 30d206d1c0254aea9a4fd0a8d06419a90de62e0d
URL: https://github.com/kamailio/kamailio/commit/30d206d1c0254aea9a4fd0a8d06419a90de62e0d
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2016-12-04T22:07:56+01:00
jsonrpc: log message if rpc response fails to be sent via datagram
---
Modified: modules/jsonrpc-s/jsonrpcs_sock.c
---
Diff: https://github.com/kamailio/kamailio/commit/30d206d1c0254aea9a4fd0a8d06419a90de62e0d.diff
Patch: https://github.com/kamailio/kamailio/commit/30d206d1c0254aea9a4fd0a8d06419a90de62e0d.patch
---
diff --git a/modules/jsonrpc-s/jsonrpcs_sock.c b/modules/jsonrpc-s/jsonrpcs_sock.c
index 7dca3d2..223dd05 100644
--- a/modules/jsonrpc-s/jsonrpcs_sock.c
+++ b/modules/jsonrpc-s/jsonrpcs_sock.c
@@ -530,6 +530,12 @@ static int jsonrpc_dgram_send_data(int fd, char* buf, unsigned int len,
}
/*LM_DBG("destination address length is %i\n", tolen);*/
n=sendto(fd, buf, len, 0, to, tolen);
+ if(n!=len) {
+ LM_ERR("failed to sent the response (%d - %d:%s)\n",
+ n, errno, strerror(errno));
+ return n;
+ }
+ LM_DBG("rpc response sent out\n");
return n;
}
More information about the sr-dev
mailing list