Revision: 40734
http://brlcad.svn.sourceforge.net/brlcad/?rev=40734&view=rev
Author: davidloman
Date: 2010-09-28 14:57:41 +0000 (Tue, 28 Sep 2010)
Log Message:
-----------
Added in callback table as an arg to connectToHost and waitForClient
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 2010-09-28 14:56:29 UTC (rev 40733)
+++ rt^3/trunk/include/PkgServer.h 2010-09-28 14:57:41 UTC (rev 40734)
@@ -36,12 +36,12 @@
virtual ~PkgServer();
int listen(unsigned short port);
- PkgClient* connectToHost(std::string ipOrHostname, short port);
+ PkgClient* connectToHost(std::string ipOrHostname, short port, struct
pkg_switch* callbackTable);
/*
* This function blocks if waitTime is set to '0'. '0' is default.
*/
- PkgClient* waitForClient(int waitTime = 0);
+ PkgClient* waitForClient(struct pkg_switch* callbackTable, int waitTime =
0);
int getListeningFD();
private:
Modified: rt^3/trunk/src/libPkgCpp/PkgServer.cxx
===================================================================
--- rt^3/trunk/src/libPkgCpp/PkgServer.cxx 2010-09-28 14:56:29 UTC (rev
40733)
+++ rt^3/trunk/src/libPkgCpp/PkgServer.cxx 2010-09-28 14:57:41 UTC (rev
40734)
@@ -43,13 +43,14 @@
* Attempts to open a new connection to ipOrHostname:port. Returns NULL if
connection fails for any reason.
*/
PkgClient*
-PkgServer::connectToHost(std::string ipOrHostname, short port)
+PkgServer::connectToHost(std::string ipOrHostname, short port, struct
pkg_switch* callbackTable)
{
std::stringstream ss;
ss << port;
std::string s_port = ss.str();
- pkg_conn* conn = pkg_open(ipOrHostname.c_str(), s_port.c_str(),
this->proto.c_str(), NULL, NULL, NULL, NULL);
+ pkg_conn* conn = pkg_open(ipOrHostname.c_str(), s_port.c_str(),
+ this->proto.c_str(), NULL, NULL, callbackTable, NULL);
if (conn == PKC_ERROR) {
bu_log("Connection to %s, port %d, failed.\n",
ipOrHostname.c_str(), port);
@@ -73,7 +74,7 @@
this->listenFD = fd;
- bu_log("Listening on port '%d'.\n", port);
+ // bu_log("Listening on port '%d' (FD:%d).\n", port,fd);
return fd;
}
@@ -84,8 +85,8 @@
}
PkgClient*
-PkgServer::waitForClient(int waitTime) {
- pkg_conn* clientStruct = pkg_getclient(this->listenFD, NULL, NULL,
waitTime);
+PkgServer::waitForClient(struct pkg_switch* callbackTable, int waitTime) {
+ pkg_conn* clientStruct = pkg_getclient(this->listenFD, callbackTable,
NULL, waitTime);
if (clientStruct == PKC_NULL)
{
if (waitTime == 0)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits