Module: sems
Branch: master
Commit: 84326506315b3e9df3febcbf8304f4e8bed70aa4
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=84326506315b3e9df3febcbf8304f4e8bed70aa4

Author: Raphael Coeffic <[email protected]>
Committer: Raphael Coeffic <[email protected]>
Date:   Thu May 23 10:25:50 2013 +0200

sip: added more debug info in case sendto returns an error

---

 core/sip/udp_trsp.cpp |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/core/sip/udp_trsp.cpp b/core/sip/udp_trsp.cpp
index ffc7fe5..1706979 100644
--- a/core/sip/udp_trsp.cpp
+++ b/core/sip/udp_trsp.cpp
@@ -169,7 +169,9 @@ int udp_trsp_socket::sendto(const sockaddr_storage* sa,
                     SA_len(sa));
 
   if (err < 0) {
-    ERROR("sendto: %s\n",strerror(errno));
+    ERROR("sendto(%i;%s:%i): %s\n",
+         get_addr_str_sip(sa).c_str(),am_get_port(sa),
+         strerror(errno));
     return err;
   }
   else if (err != msg_len) {
@@ -229,7 +231,9 @@ int udp_trsp_socket::sendmsg(const sockaddr_storage* sa,
   
   // bytes_sent = ;
   if(::sendmsg(sd, &hdr, 0) < 0) {
-      ERROR("sendto: %s\n",strerror(errno));
+      ERROR("sendto(%i;%s:%i): %s\n",
+           get_addr_str_sip(sa).c_str(),am_get_port(sa),
+           strerror(errno));
       return -1;
   }
 

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to