[sr-dev] git:kamailio_3.0: core - tm: improved log messages

Daniel-Constantin Mierla miconda at gmail.com
Fri Apr 23 16:48:16 CEST 2010


Module: sip-router
Branch: kamailio_3.0
Commit: 51a49282b60ce7a65a86d839a3e004eab7f3540f
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=51a49282b60ce7a65a86d839a3e004eab7f3540f

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Fri Apr 23 16:44:49 2010 +0200

core - tm: improved log messages

- udp_send() prints outgoing buffer len as unsigned
- build_uac_req() prints the size of attempted memory chunk allocation
(cherry picked from commit 839c9509013abf77a446e1c35620a9fcd4223740)

---

 modules/tm/t_msgbuilder.c |    2 +-
 udp_server.c              |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/tm/t_msgbuilder.c b/modules/tm/t_msgbuilder.c
index b76c659..049386b 100644
--- a/modules/tm/t_msgbuilder.c
+++ b/modules/tm/t_msgbuilder.c
@@ -1368,7 +1368,7 @@ char* build_uac_req(str* method, str* headers, str* body, dlg_t* dialog, int bra
 
 	buf = shm_malloc(*len + 1);
 	if (!buf) {
-		LOG(L_ERR, "build_uac_req(): no shmem\n");
+		LOG(L_ERR, "build_uac_req(): no shmem (%d)\n", *len);
 		goto error;
 	}
 	
diff --git a/udp_server.c b/udp_server.c
index 11d6635..cc75699 100644
--- a/udp_server.c
+++ b/udp_server.c
@@ -561,7 +561,7 @@ again:
 #endif
 	if (n==-1){
 		su2ip_addr(&ip, &dst->to);
-		LOG(L_ERR, "ERROR: udp_send: sendto(sock,%p,%d,0,%s:%d,%d): %s(%d)\n",
+		LOG(L_ERR, "ERROR: udp_send: sendto(sock,%p,%u,0,%s:%d,%d): %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