[asterisk-scf-commits] asterisk-scf/integration/ice-util-cpp.git branch "nat-traversal" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed May 18 15:51:14 CDT 2011


branch "nat-traversal" has been updated
       via  11eec8cf8421391efd44d28b6010afde19c67c44 (commit)
      from  a8e34dcd80f2463264ed293640bc5fad167f7c0c (commit)

Summary of changes:
 include/AsteriskSCF/Helpers/Network.h |    2 ++
 src/Helpers/Network.cpp               |    5 +++++
 2 files changed, 7 insertions(+), 0 deletions(-)


- Log -----------------------------------------------------------------
commit 11eec8cf8421391efd44d28b6010afde19c67c44
Author: Brent Eagles <beagles at digium.com>
Date:   Wed May 18 18:20:52 2011 -0230

    Added a toString() member to the Address class to help with debugging.

diff --git a/include/AsteriskSCF/Helpers/Network.h b/include/AsteriskSCF/Helpers/Network.h
index d67ae61..7a235cd 100644
--- a/include/AsteriskSCF/Helpers/Network.h
+++ b/include/AsteriskSCF/Helpers/Network.h
@@ -47,6 +47,8 @@ public:
     std::string hostname() const;
 
     bool isIPV6();
+
+    std::string toString() const;
     
 private:
     std::string mHostname;
diff --git a/src/Helpers/Network.cpp b/src/Helpers/Network.cpp
index b1768b8..fc670c3 100644
--- a/src/Helpers/Network.cpp
+++ b/src/Helpers/Network.cpp
@@ -45,6 +45,11 @@ bool Address::isIPV6()
     return mIsIPV6;
 }
 
+string Address::toString() const
+{
+    return mHostname + ':' + boost::lexical_cast<string>(mPort);
+}
+
 class DNSQueryImpl : public DNSQuery
 {
 public:

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/ice-util-cpp.git



More information about the asterisk-scf-commits mailing list