summaryrefslogtreecommitdiff
path: root/apps/Gateway/Peer/peerd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'apps/Gateway/Peer/peerd.cpp')
-rw-r--r--apps/Gateway/Peer/peerd.cpp59
1 files changed, 0 insertions, 59 deletions
diff --git a/apps/Gateway/Peer/peerd.cpp b/apps/Gateway/Peer/peerd.cpp
deleted file mode 100644
index a26760b33cb..00000000000
--- a/apps/Gateway/Peer/peerd.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-// $Id$
-
-// Driver for the peer daemon (peerd). Note that this is completely
-// generic code due to the Service Configurator framework!
-
-#include "ace/Service_Config.h"
-#include "Peer.h"
-
-class Service_Ptr
- // = TITLE
- // Holds the <ACE_Service_Object> * until we're done.
-{
-public:
- Service_Ptr (ACE_Service_Object *so)
- : service_object_ (so) {}
-
- ~Service_Ptr (void) { this->service_object_->fini (); }
-
- ACE_Service_Object *operator-> () { return this->service_object_; }
-
-private:
- ACE_Service_Object *service_object_;
- // Holds the service object until we're done.
-};
-
-int
-main (int argc, char *argv[])
-{
- ACE_Service_Config daemon;
-
- if (daemon.open (argc, argv) == -1)
- {
- if (errno != ENOENT)
- ACE_ERROR ((LM_ERROR, "%p\n%a", "open", 1));
- else // Use static linking.
- {
- Service_Ptr sp = ACE_SVC_INVOKE (Peer_Acceptor);
-
- if (sp->init (argc - 1, argv + 1) == -1)
- ACE_ERROR ((LM_ERROR, "%p\n%a", "init", 1));
-
- // Run forever, performing the configured services until we
- // are shut down by a SIGINT/SIGQUIT signal.
-
- ACE_Reactor::run_event_loop ();
-
- // Destructors of Service_Ptr's automagically call fini().
-
- }
- }
- else // Use dynamic linking.
-
- // Run forever, performing the configured services until we are shut
- // down by a SIGINT/SIGQUIT signal.
-
- ACE_Reactor::run_event_loop ();
-
- return 0;
-}