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

Author: Stefan Sayer <[email protected]>
Committer: Stefan Sayer <[email protected]>
Date:   Tue Dec 13 16:47:53 2011 +0100

fixed printing port number in sems-stats utility

---

 core/plug-in/stats/query_stats.cxx |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/core/plug-in/stats/query_stats.cxx 
b/core/plug-in/stats/query_stats.cxx
index 5f37c13..4b6f317 100644
--- a/core/plug-in/stats/query_stats.cxx
+++ b/core/plug-in/stats/query_stats.cxx
@@ -115,13 +115,13 @@ int main(int argc, char** argv)
     fprintf(stderr,"port '%s' is not a valid integer\n",port.c_str());
     return -1;
   }
-
+  unsigned short port_i = addr.sin_port;
   addr.sin_family = AF_INET;
   addr.sin_port = htons(addr.sin_port);
 
   msg_buf = cmd;    
-  printf("sending '%s\\n' to %s:%u\n", msg_buf.c_str(),
-        server.c_str(), addr.sin_port);
+  printf("sending '%s\\n' to %s:%d\n", msg_buf.c_str(),
+        server.c_str(), port_i);
 
   msg_buf += "\n";
 

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

Reply via email to