[sr-dev] git:master:317701dc: core: more info in log message when sendto() fails

Daniel-Constantin Mierla miconda at gmail.com
Fri Sep 14 08:52:46 CEST 2018


Module: kamailio
Branch: master
Commit: 317701dc3d1ddb27395ded873a3055af2d029a5a
URL: https://github.com/kamailio/kamailio/commit/317701dc3d1ddb27395ded873a3055af2d029a5a

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2018-09-14T08:51:47+02:00

core: more info in log message when sendto() fails

---

Modified: src/core/udp_server.c

---

Diff:  https://github.com/kamailio/kamailio/commit/317701dc3d1ddb27395ded873a3055af2d029a5a.diff
Patch: https://github.com/kamailio/kamailio/commit/317701dc3d1ddb27395ded873a3055af2d029a5a.patch

---

diff --git a/src/core/udp_server.c b/src/core/udp_server.c
index 862bed174d..1a1d200ab0 100644
--- a/src/core/udp_server.c
+++ b/src/core/udp_server.c
@@ -591,7 +591,8 @@ int udp_send(struct dest_info* dst, char *buf, unsigned len)
 #endif
 		if (unlikely(n==-1)){
 			su2ip_addr(&ip, &dst->to);
-			LM_ERR("sendto(sock,%p,%u,0,%s:%d,%d): %s(%d)\n",
+			LM_ERR("sendto(sock, buf: %p, len: %u, 0, dst: (%s:%d), tolen: %d)"
+					" - err: %s (%d)\n",
 					buf,len, ip_addr2a(&ip),
 					su_getport(&dst->to), tolen, strerror(errno), errno);
 			if (errno==EINTR) goto again;




More information about the sr-dev mailing list