Revision: 41954
          http://brlcad.svn.sourceforge.net/brlcad/?rev=41954&view=rev
Author:   davidloman
Date:     2011-01-05 17:07:48 +0000 (Wed, 05 Jan 2011)

Log Message:
-----------
Commence wiring up the test harness.  First mod is to libPkgCpp:  Need to allow 
for optional ip/Hostname in the PkgServer::listen() function.  Defaults to 
'localhost'.

Modified Paths:
--------------
    rt^3/trunk/include/PkgServer.h
    rt^3/trunk/src/libPkgCpp/PkgServer.cxx

Modified: rt^3/trunk/include/PkgServer.h
===================================================================
--- rt^3/trunk/include/PkgServer.h      2011-01-05 16:33:58 UTC (rev 41953)
+++ rt^3/trunk/include/PkgServer.h      2011-01-05 17:07:48 UTC (rev 41954)
@@ -35,7 +35,7 @@
   PkgServer(std::string proto);
   virtual ~PkgServer();
 
-  int listen(unsigned short port);
+  int listen(unsigned short port, std::string ipOrHostname = "localhost");
   PkgClient* connectToHost(std::string ipOrHostname, short port, struct 
pkg_switch* callbackTable);
 
   /*

Modified: rt^3/trunk/src/libPkgCpp/PkgServer.cxx
===================================================================
--- rt^3/trunk/src/libPkgCpp/PkgServer.cxx      2011-01-05 16:33:58 UTC (rev 
41953)
+++ rt^3/trunk/src/libPkgCpp/PkgServer.cxx      2011-01-05 17:07:48 UTC (rev 
41954)
@@ -37,13 +37,13 @@
 
 PkgServer::~PkgServer() {}
 
-int PkgServer::listen(unsigned short port) {
+int PkgServer::listen(unsigned short port, std::string ipOrHostname) {
        //Convert port -> char* to make libpkg happy.
        char portCString[7] = { 0 };
        int fd;
        snprintf(portCString, 6, "%d", port);
 
-       fd = pkg_permserver(portCString, this->proto.c_str(), 0, 0);
+       fd = pkg_permserver_ip(ipOrHostname.c_str(), portCString, 
this->proto.c_str(), 0, 0);
 
        if (fd < 0)
                return fd;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to