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

Author: Václav Kubart <[email protected]>
Committer: Václav Kubart <[email protected]>
Date:   Thu May  3 17:49:35 2012 +0200

RTP stream IP address errors: exception extended with the IP address itself

---

 core/AmRtpStream.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/core/AmRtpStream.cpp b/core/AmRtpStream.cpp
index 87a7fe4..97628c0 100644
--- a/core/AmRtpStream.cpp
+++ b/core/AmRtpStream.cpp
@@ -83,11 +83,11 @@ void AmRtpStream::setLocalIP(const string& ip)
 {
 #ifdef SUPPORT_IPV6
   if (!inet_aton_v6(ip.c_str(), &l_saddr)) {
-    throw string ("Invalid IPv6 address.");
+    throw string ("Invalid IPv6 address: ") + ip;
   }
 #else
   if (!inet_aton(ip.c_str(), (in_addr*)&l_saddr.sin_addr.s_addr)) {
-    throw string ("Invalid IPv4 address.");
+    throw string ("Invalid IPv4 address: ") + ip;
   }
 #endif
 }
@@ -435,7 +435,7 @@ void AmRtpStream::setRAddr(const string& addr, unsigned 
short port)
   dns_handle dh;
   if (resolver::instance()->resolve_name(addr.c_str(),&dh,&ss,IPv4) < 0) {
     WARN("Address not valid (host: %s).\n", addr.c_str());
-    throw string("invalid address");
+    throw string("invalid address") + addr;
   }
 
 #ifdef SUPPORT_IPV6

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

Reply via email to