diff options
author | Marc Laukien <marc@zeroc.com> | 2002-04-17 16:09:52 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-04-17 16:09:52 +0000 |
commit | c6f774e56bf03201499884a3baad18c230eeff7f (patch) | |
tree | 4687d98a8728c94310651305d40cf847b7b888c0 /cpp/src | |
parent | Uncommented call to configure() - now IceSSL configures itself (diff) | |
download | ice-c6f774e56bf03201499884a3baad18c230eeff7f.tar.bz2 ice-c6f774e56bf03201499884a3baad18c230eeff7f.tar.xz ice-c6f774e56bf03201499884a3baad18c230eeff7f.zip |
interrupt fixes
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Glacier/GlacierRouter.cpp | 13 | ||||
-rw-r--r-- | cpp/src/Glacier/GlacierStarter.cpp | 8 |
2 files changed, 14 insertions, 7 deletions
diff --git a/cpp/src/Glacier/GlacierRouter.cpp b/cpp/src/Glacier/GlacierRouter.cpp index 3d392fe2bbe..eb2bd8f3bad 100644 --- a/cpp/src/Glacier/GlacierRouter.cpp +++ b/cpp/src/Glacier/GlacierRouter.cpp @@ -168,7 +168,6 @@ Glacier::Router::run(int argc, char* argv[]) } ObjectAdapterPtr clientAdapter = communicator()->createObjectAdapterFromProperty("Client", clientEndpointsProperty); - clientAdapter->activate(); // // Initialize the server object adapter. @@ -179,7 +178,6 @@ Glacier::Router::run(int argc, char* argv[]) if (!serverEndpoints.empty()) { serverAdapter = communicator()->createObjectAdapterFromProperty("Server", serverEndpointsProperty); - serverAdapter->activate(); } // @@ -216,7 +214,6 @@ Glacier::Router::run(int argc, char* argv[]) communicator()->createObjectAdapterFromProperty("Router", routerEndpointsProperty); RouterPtr router = new RouterI(clientAdapter, serverAdapter, routingTable); routerAdapter->add(router, stringToIdentity(routerIdentity)); - routerAdapter->activate(); #ifndef _WIN32 // @@ -250,9 +247,17 @@ Glacier::Router::run(int argc, char* argv[]) #endif // - // We're done, let's wait for shutdown. + // Everything ok, let's go. // + shutdownOnInterrupt(); + clientAdapter->activate(); + if (serverAdapter) + { + serverAdapter->activate(); + } + routerAdapter->activate(); communicator()->waitForShutdown(); + ignoreInterrupt(); // // Destroy the router. The client and server blobjects get diff --git a/cpp/src/Glacier/GlacierStarter.cpp b/cpp/src/Glacier/GlacierStarter.cpp index bedaa8192d7..a03e15f1fd7 100644 --- a/cpp/src/Glacier/GlacierStarter.cpp +++ b/cpp/src/Glacier/GlacierStarter.cpp @@ -136,16 +136,18 @@ Glacier::Router::run(int argc, char* argv[]) } // - // Create the starter object and activate the object adapter. + // Create and initialize the starter object. // StarterPtr starter = new StarterI(communicator(), verifier); adapter->add(starter, stringToIdentity("Glacier/starter")); - adapter->activate(); // - // We're done, let's wait for shutdown. + // Everything ok, let's go. // + shutdownOnInterrupt(); + adapter->activate(); communicator()->waitForShutdown(); + ignoreInterrupt(); // // Destroy the starter and the password verifier. |