Revision: 40837
http://brlcad.svn.sourceforge.net/brlcad/?rev=40837&view=rev
Author: davidloman
Date: 2010-09-29 16:27:12 +0000 (Wed, 29 Sep 2010)
Log Message:
-----------
Made GeometryService a INetMsgHandler so it can recv a remote shutdown.
Modified Paths:
--------------
rt^3/trunk/include/GeometryService.h
rt^3/trunk/src/GS/GeometryService.cxx
Modified: rt^3/trunk/include/GeometryService.h
===================================================================
--- rt^3/trunk/include/GeometryService.h 2010-09-29 16:23:04 UTC (rev
40836)
+++ rt^3/trunk/include/GeometryService.h 2010-09-29 16:27:12 UTC (rev
40837)
@@ -31,12 +31,13 @@
#include <QtCore/QString>
-class GeometryService : public ControlledThread
+class GeometryService : public ControlledThread, public INetMsgHandler
{
public:
GeometryService(const QString localNodeName, const quint16 listenPort);
virtual ~GeometryService();
+ bool handleNetMsg(NetMsg* msg);
protected:
bool preRunHook();
Modified: rt^3/trunk/src/GS/GeometryService.cxx
===================================================================
--- rt^3/trunk/src/GS/GeometryService.cxx 2010-09-29 16:23:04 UTC (rev
40836)
+++ rt^3/trunk/src/GS/GeometryService.cxx 2010-09-29 16:27:12 UTC (rev
40837)
@@ -54,6 +54,8 @@
router->registerType(DISCONNECTREQ, this->pm);
+ router->registerType(CMD_SHUTDOWN, this);
+
}
bool
@@ -81,6 +83,20 @@
return true;
}
+
+bool
+GeometryService::handleNetMsg(NetMsg* msg)
+{
+ quint16 type = msg->getMsgType();
+ switch(type) {
+ case CMD_SHUTDOWN:
+ log->logINFO("GeometryService", "Remote Shutdown Initiated.");
+ this->shutdown();
+ return true;
+ }
+ return false;
+}
+
// 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