Revision: 40824
http://brlcad.svn.sourceforge.net/brlcad/?rev=40824&view=rev
Author: davidloman
Date: 2010-09-29 14:31:43 +0000 (Wed, 29 Sep 2010)
Log Message:
-----------
Added Portal::disconnect().
Modified Paths:
--------------
rt^3/trunk/include/Portal.h
rt^3/trunk/src/libNet/Portal.cxx
Modified: rt^3/trunk/include/Portal.h
===================================================================
--- rt^3/trunk/include/Portal.h 2010-09-29 14:31:20 UTC (rev 40823)
+++ rt^3/trunk/include/Portal.h 2010-09-29 14:31:43 UTC (rev 40824)
@@ -42,6 +42,7 @@
virtual ~Portal();
int send(NetMsg* msg);
void sendGSNodeName();
+ void disconnect();
int flush();
QString getRemoteNodeName();
Modified: rt^3/trunk/src/libNet/Portal.cxx
===================================================================
--- rt^3/trunk/src/libNet/Portal.cxx 2010-09-29 14:31:20 UTC (rev 40823)
+++ rt^3/trunk/src/libNet/Portal.cxx 2010-09-29 14:31:43 UTC (rev 40824)
@@ -47,7 +47,8 @@
delete callbackTable;
}
-int Portal::send(NetMsg* msg) {
+int
+Portal::send(NetMsg* msg) {
QByteArray* ba = msg->serialize();
// QString s("Sending msg. Type: ");
@@ -66,7 +67,9 @@
delete ba;
return retval;
}
-void Portal::sendGSNodeName() {
+
+void
+Portal::sendGSNodeName() {
QString localNodeName = Config::getInstance()->getConfigValue(
"LocalGSNodeName");
if (localNodeName.length() == 0) {
@@ -81,10 +84,13 @@
this->send(msg);
}
-int Portal::flush() {
+int
+Portal::flush() {
return this->pkgClient->flush();
}
-int Portal::read() {
+
+int
+Portal::read() {
int retval = 0;
/*
@@ -124,11 +130,13 @@
return 1;
}
-QString Portal::getRemoteNodeName() {
+QString
+Portal::getRemoteNodeName() {
return this->remoteNodeName + "";
}
-bool Portal::handleNetMsg(NetMsg* msg) {
+bool
+Portal::handleNetMsg(NetMsg* msg) {
quint16 type = msg->getMsgType();
if (type == GS_REMOTE_NODENAME_SET) {
@@ -159,7 +167,8 @@
return false;
}
-void Portal::callbackSpringboard(struct pkg_conn* conn, char* buf) {
+void
+Portal::callbackSpringboard(struct pkg_conn* conn, char* buf) {
/* Check to see if we got a good Buffer and Portal Object */
if (buf == 0) {
bu_bomb("pkg callback returned a NULL buffer!\n");
@@ -204,6 +213,11 @@
NetMsgRouter::getInstance()->routeMsg(msg);
}
+void
+Portal::disconnect()
+{
+ close(this->pkgClient->getFileDescriptor());
+}
// Local Variables: ***
// mode: C++ ***
// tab-width: 8 ***
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