diff options
author | Michi Henning <michi@zeroc.com> | 2005-01-15 01:14:19 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2005-01-15 01:14:19 +0000 |
commit | 9e54a8065644aa3f1abb2019acf21da8f5040dd9 (patch) | |
tree | f22028c4112ea0ecc2ad1f599735ab02e78a55d9 | |
parent | Oops, forgot to save all.dsw before I committed the change to remove (diff) | |
download | ice-9e54a8065644aa3f1abb2019acf21da8f5040dd9.tar.bz2 ice-9e54a8065644aa3f1abb2019acf21da8f5040dd9.tar.xz ice-9e54a8065644aa3f1abb2019acf21da8f5040dd9.zip |
Removed Glacier from source tree.
49 files changed, 1 insertions, 5477 deletions
diff --git a/cpp/all.dsw b/cpp/all.dsw index ab211221edb..c45c4cefb89 100644 --- a/cpp/all.dsw +++ b/cpp/all.dsw @@ -258,9 +258,6 @@ Package=<4> Project_Dep_Name thread
End Project Dependency
Begin Project Dependency
- Project_Dep_Name glacierrouter
- End Project Dependency
- Begin Project Dependency
Project_Dep_Name callbackC
End Project Dependency
Begin Project Dependency
@@ -270,9 +267,6 @@ Package=<4> Project_Dep_Name unicode
End Project Dependency
Begin Project Dependency
- Project_Dep_Name glacier
- End Project Dependency
- Begin Project Dependency
Project_Dep_Name icexml
End Project Dependency
Begin Project Dependency
@@ -333,12 +327,6 @@ Package=<4> Project_Dep_Name icessl
End Project Dependency
Begin Project Dependency
- Project_Dep_Name sessionC
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name sessionS
- End Project Dependency
- Begin Project Dependency
Project_Dep_Name evictorC
End Project Dependency
Begin Project Dependency
@@ -435,15 +423,6 @@ Package=<4> Project_Dep_Name simpleS
End Project Dependency
Begin Project Dependency
- Project_Dep_Name starterC
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name starterS
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name glacierstarter
- End Project Dependency
- Begin Project Dependency
Project_Dep_Name freezescriptdbmap
End Project Dependency
Begin Project Dependency
@@ -1269,36 +1248,6 @@ Package=<4> ###############################################################################
-Project: "glacier"=.\src\Glacier\Glacier.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name ice
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name icecpp
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name icessl
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name iceutil
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name slice
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name slice2cpp
- End Project Dependency
-}}}
-
-###############################################################################
-
Project: "glacier2"=.\src\Glacier2\Glacier2.dsp - Package Owner=<4>
Package=<5>
@@ -1407,54 +1356,6 @@ Package=<4> ###############################################################################
-Project: "glacierrouter"=.\src\glacier\glacierrouter.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name ice
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name iceutil
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name glacier
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name icessl
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "glacierstarter"=.\src\glacier\glacierstarter.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glacier
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name ice
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name icessl
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name iceutil
- End Project Dependency
-}}}
-
-###############################################################################
-
Project: "helloC"=.\demo\ice\hello\helloC.dsp - Package Owner=<4>
Package=<5>
@@ -2682,51 +2583,6 @@ Package=<4> ###############################################################################
-Project: "sessionC"=.\demo\glacier\session\sessionC.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glacier
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name ice
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name iceutil
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name icessl
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "sessionS"=.\demo\glacier\session\sessionS.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glacier
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name ice
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name iceutil
- End Project Dependency
-}}}
-
-###############################################################################
-
Project: "simpleC"=.\test\icepack\simple\simpleC.dsp - Package Owner=<4>
Package=<5>
@@ -3177,54 +3033,6 @@ Package=<4> ###############################################################################
-Project: "starterC"=.\test\glacier\starter\starterC.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glacier
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name glacierrouter
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name glacierstarter
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name ice
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name icessl
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name iceutil
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "starterS"=.\test\glacier\starter\starterS.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name ice
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name iceutil
- End Project Dependency
-}}}
-
-###############################################################################
-
Project: "streamC"=.\test\ice\stream\streamC.dsp - Package Owner=<4>
Package=<5>
diff --git a/cpp/allTests.py b/cpp/allTests.py index c801c7b9dfd..83ab66c5192 100755 --- a/cpp/allTests.py +++ b/cpp/allTests.py @@ -93,7 +93,7 @@ tests = [ \ # if TestUtil.isCygwin() == 0: tests += [ \ - "Glacier/starter", \ + # "Glacier/starter", \ # Glacier removed from the source tree, so this list is empty for now. ] def usage(): diff --git a/cpp/demo/Glacier/Makefile b/cpp/demo/Glacier/Makefile deleted file mode 100644 index 8bf6446d809..00000000000 --- a/cpp/demo/Glacier/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# ********************************************************************** -# -# Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -# -# This copy of Ice is licensed to you under the terms described in the -# ICE_LICENSE file included in this distribution. -# -# ********************************************************************** - -top_srcdir = ../.. - -include $(top_srcdir)/config/Make.rules - -SUBDIRS = session - -$(EVERYTHING):: - @for subdir in $(SUBDIRS); \ - do \ - echo "making $@ in $$subdir"; \ - ( cd $$subdir && $(MAKE) $@ ) || exit 1; \ - done diff --git a/cpp/demo/Glacier/README b/cpp/demo/Glacier/README deleted file mode 100644 index 26dbcf7e900..00000000000 --- a/cpp/demo/Glacier/README +++ /dev/null @@ -1,14 +0,0 @@ -********************************************************************** - -Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. - -This copy of Ice is licensed to you under the terms described in the -ICE_LICENSE file included in this distribution. - -********************************************************************** - -Demos in this directory: - -- session - - Shows how to use Glacier to establish secure sessions. diff --git a/cpp/demo/Glacier/session/Client.cpp b/cpp/demo/Glacier/session/Client.cpp deleted file mode 100644 index a0184adea70..00000000000 --- a/cpp/demo/Glacier/session/Client.cpp +++ /dev/null @@ -1,281 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <Ice/Ice.h> -#include <Glacier/Glacier.h> -#include <Glacier/Router.h> -#include <IceSSL/Plugin.h> - -#include <HelloSession.h> - -using namespace std; -using namespace Demo; - -void -menu() -{ - cout << - "usage:\n" - "t: send greeting as twoway\n" - "o: send greeting as oneway\n" - "O: send greeting as batch oneway\n" - "d: send greeting as datagram\n" - "D: send greeting as batch datagram\n" - "f: flush all batch requests\n" - "T: set a timeout\n" - "S: switch secure mode on/off\n" - "x: exit\n" - "?: help\n"; -} - -int -run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) -{ - Ice::PropertiesPtr properties = communicator->getProperties(); - // - // Do Glacier setup. - // - const char* glacierStarterEndpointsProperty = "Glacier.Starter.Endpoints"; - string glacierStarterEndpoints = properties->getProperty(glacierStarterEndpointsProperty); - Ice::ObjectPrx starterBase = communicator->stringToProxy("Glacier/starter:" + glacierStarterEndpoints); - Glacier::StarterPrx starter = Glacier::StarterPrx::checkedCast(starterBase); - if(!starter) - { - cerr << argv[0] << ": endpoints `" << glacierStarterEndpoints - << "' do not refer to a glacier router starter" << endl; - return EXIT_FAILURE; - } - - Ice::ByteSeq privateKey; - Ice::ByteSeq publicKey; - Ice::ByteSeq routerCert; - - Glacier::RouterPrx router; - string id; - string pw; - - while(true) - { - cout << "user id: " << flush; - cin >> id; - cout << "password: " << flush; - cin >> pw; - - try - { - router = starter->startRouter(id, pw, privateKey, publicKey, routerCert); - } - catch(const Glacier::CannotStartRouterException& ex) - { - cerr << argv[0] << ": " << ex << ":\n" << ex.reason << endl; - return EXIT_FAILURE; - } - catch(const Glacier::PermissionDeniedException&) - { - cout << "password is invalid, try again" << endl; - continue; - } - break; - } - - // - // Required in order to activate the trust relationship with - // the glacier router. - // - - // - // Get the SSL plugin. - // - Ice::PluginManagerPtr pluginManager = communicator->getPluginManager(); - Ice::PluginPtr plugin = pluginManager->getPlugin("IceSSL"); - IceSSL::PluginPtr sslPlugin = IceSSL::PluginPtr::dynamicCast(plugin); - assert(sslPlugin); - - // Configure the client context of the IceSSL Plugin - sslPlugin->configure(IceSSL::Client); - - // Trust only the router certificate, no other certificate. - sslPlugin->addTrustedCertificate(IceSSL::Client, routerCert); - sslPlugin->setCertificateVerifier(IceSSL::Client, sslPlugin->getSingleCertVerifier(routerCert)); - - // Set the public and private keys that the Router will accept. - sslPlugin->setRSAKeys(IceSSL::Client, privateKey, publicKey); - - communicator->setDefaultRouter(router); - - Glacier::SessionPrx session = router->createSession(); - HelloSessionPrx base = HelloSessionPrx::checkedCast(session); - - HelloSessionPrx twoway = HelloSessionPrx::checkedCast(base->ice_twoway()->ice_timeout(-1)->ice_secure(false)); - if(!twoway) - { - cerr << argv[0] << ": invalid object reference" << endl; - return EXIT_FAILURE; - } - HelloSessionPrx oneway = HelloSessionPrx::uncheckedCast(twoway->ice_oneway()); - HelloSessionPrx batchOneway = HelloSessionPrx::uncheckedCast(twoway->ice_batchOneway()); - HelloSessionPrx datagram = HelloSessionPrx::uncheckedCast(twoway->ice_datagram()); - HelloSessionPrx batchDatagram = HelloSessionPrx::uncheckedCast(twoway->ice_batchDatagram()); - - bool secure = false; - int timeout = -1; - - menu(); - - char c; - do - { - try - { - cout << "==> "; - cin >> c; - if(c == 't') - { - twoway->hello(); - } - else if(c == 'o') - { - oneway->hello(); - } - else if(c == 'O') - { - batchOneway->hello(); - } - else if(c == 'd') - { - if(secure) - { - cout << "secure datagrams are not supported" << endl; - } - else - { - datagram->hello(); - } - } - else if(c == 'D') - { - if(secure) - { - cout << "secure datagrams are not supported" << endl; - } - else - { - batchDatagram->hello(); - } - } - else if(c == 'f') - { - communicator->flushBatchRequests(); - } - else if(c == 'T') - { - if(timeout == -1) - { - timeout = 2000; - } - else - { - timeout = -1; - } - - twoway = HelloSessionPrx::uncheckedCast(twoway->ice_timeout(timeout)); - oneway = HelloSessionPrx::uncheckedCast(oneway->ice_timeout(timeout)); - batchOneway = HelloSessionPrx::uncheckedCast(batchOneway->ice_timeout(timeout)); - - if(timeout == -1) - { - cout << "timeout is now switched off" << endl; - } - else - { - cout << "timeout is now set to 2000ms" << endl; - } - } - else if(c == 'S') - { - secure = !secure; - - twoway = HelloSessionPrx::uncheckedCast(twoway->ice_secure(secure)); - oneway = HelloSessionPrx::uncheckedCast(oneway->ice_secure(secure)); - batchOneway = HelloSessionPrx::uncheckedCast(batchOneway->ice_secure(secure)); - datagram = HelloSessionPrx::uncheckedCast(datagram->ice_secure(secure)); - batchDatagram = HelloSessionPrx::uncheckedCast(batchDatagram->ice_secure(secure)); - - if(secure) - { - cout << "secure mode is now on" << endl; - } - else - { - cout << "secure mode is now off" << endl; - } - } - else if(c == 'x') - { - // Nothing to do - } - else if(c == '?') - { - menu(); - } - else - { - cout << "unknown command `" << c << "'" << endl; - menu(); - } - } - catch(const Ice::Exception& ex) - { - cerr << ex << endl; - } - } - while(cin.good() && c != 'x'); - - // - // Shutdown the router. - // - router->shutdown(); - - return EXIT_SUCCESS; -} - -int -main(int argc, char* argv[]) -{ - int status; - Ice::CommunicatorPtr communicator; - - try - { - Ice::PropertiesPtr properties = Ice::createProperties(); - properties->load("config"); - communicator = Ice::initializeWithProperties(argc, argv, properties); - status = run(argc, argv, communicator); - } - catch(const Ice::Exception& ex) - { - cerr << ex << endl; - status = EXIT_FAILURE; - } - - if(communicator) - { - try - { - communicator->destroy(); - } - catch(const Ice::Exception& ex) - { - cerr << ex << endl; - status = EXIT_FAILURE; - } - } - - return status; -} diff --git a/cpp/demo/Glacier/session/HelloSession.ice b/cpp/demo/Glacier/session/HelloSession.ice deleted file mode 100644 index 140ee60222d..00000000000 --- a/cpp/demo/Glacier/session/HelloSession.ice +++ /dev/null @@ -1,25 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#ifndef HELLO_ICE -#define HELLO_ICE - -#include <Glacier/Session.ice> - -module Demo -{ - -interface HelloSession extends Glacier::Session -{ - void hello(); -}; - -}; - -#endif diff --git a/cpp/demo/Glacier/session/HelloSessionI.cpp b/cpp/demo/Glacier/session/HelloSessionI.cpp deleted file mode 100644 index 10ac499c95e..00000000000 --- a/cpp/demo/Glacier/session/HelloSessionI.cpp +++ /dev/null @@ -1,54 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <Ice/Ice.h> -#include <HelloSessionI.h> - -using namespace std; - -HelloSessionManagerI::HelloSessionManagerI(const Ice::ObjectAdapterPtr& adapter) : - _adapter(adapter) -{ -} - -Glacier::SessionPrx -HelloSessionManagerI::create(const string& userId, const Ice::Current&) -{ - Glacier::SessionPtr session = new HelloSessionI(userId, this); - Ice::Identity ident; - ident.category = userId; - ident.name = "session"; - - _adapter->add(session, ident); - return Glacier::SessionPrx::uncheckedCast(_adapter->createProxy(ident)); -} - -void -HelloSessionManagerI::remove(const Ice::Identity& ident) -{ - _adapter->remove(ident); -} - -HelloSessionI::HelloSessionI(const string& userId, const HelloSessionManagerIPtr& manager) : - _userId(userId), - _manager(manager) -{ -} - -void -HelloSessionI::destroy(const Ice::Current& current) -{ - _manager->remove(current.id); -} - -void -HelloSessionI::hello(const Ice::Current&) -{ - cout << "Hello " << _userId << endl; -} diff --git a/cpp/demo/Glacier/session/HelloSessionI.h b/cpp/demo/Glacier/session/HelloSessionI.h deleted file mode 100644 index 3c2d8d30dfd..00000000000 --- a/cpp/demo/Glacier/session/HelloSessionI.h +++ /dev/null @@ -1,47 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#ifndef HELLO_SESSION_I_H -#define HELLO_SESSION_I_H - -#include <Glacier/SessionManager.h> -#include <HelloSession.h> - -class HelloSessionManagerI : public Glacier::SessionManager -{ -public: - - HelloSessionManagerI(const Ice::ObjectAdapterPtr&); - - virtual Glacier::SessionPrx create(const ::std::string&, const Ice::Current&); - - void remove(const Ice::Identity&); - -private: - - Ice::ObjectAdapterPtr _adapter; -}; -typedef IceUtil::Handle<HelloSessionManagerI> HelloSessionManagerIPtr; - -class HelloSessionI : public Demo::HelloSession -{ -public: - - HelloSessionI(const ::std::string&, const HelloSessionManagerIPtr&); - - virtual void destroy(const Ice::Current&); - virtual void hello(const Ice::Current&); - -private: - - ::std::string _userId; - HelloSessionManagerIPtr _manager; -}; - -#endif diff --git a/cpp/demo/Glacier/session/Makefile b/cpp/demo/Glacier/session/Makefile deleted file mode 100644 index a358656b557..00000000000 --- a/cpp/demo/Glacier/session/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# ********************************************************************** -# -# Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -# -# This copy of Ice is licensed to you under the terms described in the -# ICE_LICENSE file included in this distribution. -# -# ********************************************************************** - -top_srcdir = ../../.. - -CLIENT = client -SERVER = server - -TARGETS = $(CLIENT) $(SERVER) - -OBJS = HelloSession.o - -COBJS = Client.o - -SOBJS = HelloSessionI.o \ - Server.o - -SRCS = $(OBJS:.o=.cpp) \ - $(COBJS:.o=.cpp) \ - $(SOBJS:.o=.cpp) - -SLICE_SRCS = HelloSession.ice - -include $(top_srcdir)/config/Make.rules - -CPPFLAGS := -I. $(CPPFLAGS) - -$(CLIENT): $(OBJS) $(COBJS) - rm -f $@ - $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) -lGlacier -lIceSSL $(LIBS) $(OPENSSL_LIBS) $(EXPAT_LIBS) - -$(SERVER): $(OBJS) $(SOBJS) - rm -f $@ - $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) -lGlacier $(LIBS) - -include .depend diff --git a/cpp/demo/Glacier/session/README b/cpp/demo/Glacier/session/README deleted file mode 100644 index 11119a0c9d5..00000000000 --- a/cpp/demo/Glacier/session/README +++ /dev/null @@ -1,21 +0,0 @@ -To run this demo, open three terminal windows. In the first window, -start the server: - -$ ./server - -In the second window, run the Glacier starter: - -$ ../../../bin/glacierstarter --Ice.Config=config - -In the third window, run the client: - -$ ./client - -You will be asked for a userid and a password. Any userid/password -combination with the password being the same as the userid will be -accepted (for example, userid="test" and password="test"). - -If no data is received from the client for a period of 60 seconds -(this timeout is configurable) the glacier session will be terminated. -In order for more data to be sent it is required that a new session be -created by restarting the client and logging in again. diff --git a/cpp/demo/Glacier/session/Server.cpp b/cpp/demo/Glacier/session/Server.cpp deleted file mode 100644 index 7d767890602..00000000000 --- a/cpp/demo/Glacier/session/Server.cpp +++ /dev/null @@ -1,82 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <Ice/Ice.h> -#include <Glacier/Glacier.h> -#include <HelloSessionI.h> - -using namespace std; - -class PermissionsVerifierI : public Glacier::PermissionsVerifier -{ -public: - - virtual bool - checkPermissions(const string& userId, const string& password, string&, const Ice::Current&) const - { - return userId == password; - } -}; - -int -run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) -{ - Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("HelloSessionManager"); - - // - // Create the SessionManager. - // - Ice::ObjectPtr object = new HelloSessionManagerI(adapter); - adapter->add(object, Ice::stringToIdentity("HelloSessionManager")); - - // - // Create the PermissionsVerifier. - // - Ice::ObjectPtr verifier = new PermissionsVerifierI; - adapter->add(verifier, Ice::stringToIdentity("PermissionsVerifier")); - - adapter->activate(); - communicator->waitForShutdown(); - return EXIT_SUCCESS; -} - -int -main(int argc, char* argv[]) -{ - int status; - Ice::CommunicatorPtr communicator; - - try - { - Ice::PropertiesPtr properties = Ice::createProperties(); - properties->load("config"); - communicator = Ice::initializeWithProperties(argc, argv, properties); - status = run(argc, argv, communicator); - } - catch(const Ice::Exception& ex) - { - cerr << ex << endl; - status = EXIT_FAILURE; - } - - if(communicator) - { - try - { - communicator->destroy(); - } - catch(const Ice::Exception& ex) - { - cerr << ex << endl; - status = EXIT_FAILURE; - } - } - - return status; -} diff --git a/cpp/demo/Glacier/session/config b/cpp/demo/Glacier/session/config deleted file mode 100644 index 3696c3db8a0..00000000000 --- a/cpp/demo/Glacier/session/config +++ /dev/null @@ -1,23 +0,0 @@ -HelloSessionManager.Endpoints=tcp -p 10000:udp -p 10000:ssl -p 10001 - -Ice.Warn.Connections=1 -Ice.Trace.Network=1 -#Ice.Trace.Protocol=1 - -Ice.Plugin.IceSSL=IceSSL:create -IceSSL.Client.CertPath=../../../certs -IceSSL.Client.Config=sslconfig.xml -IceSSL.Server.CertPath=../../../certs -IceSSL.Server.Config=sslconfig.xml -#IceSSL.Trace.Security=1 - -Glacier.Router.Endpoints=default -Glacier.Router.SessionManager=HelloSessionManager:tcp -p 10000:ssl -p 10001 -Glacier.Router.Client.Endpoints=tcp:udp:ssl -Glacier.Router.Trace.Client=2 -Glacier.Router.Trace.RoutingTable=1 - -Glacier.Starter.PermissionsVerifier=PermissionsVerifier:tcp -p 10000:ssl -p 10001 -Glacier.Starter.AddUserToAllowCategories=1 -Glacier.Starter.Endpoints=tcp -p 11000:ssl -p 11001 -Glacier.Starter.PropertiesOverride=Ice.ServerIdleTime=60 diff --git a/cpp/demo/Glacier/session/sessionC.dsp b/cpp/demo/Glacier/session/sessionC.dsp deleted file mode 100644 index f1d002c799e..00000000000 --- a/cpp/demo/Glacier/session/sessionC.dsp +++ /dev/null @@ -1,153 +0,0 @@ -# Microsoft Developer Studio Project File - Name="sessionC" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=sessionC - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "sessionC.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "sessionC.mak" CFG="sessionC - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "sessionC - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "sessionC - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "sessionC - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I "." /I "../../../include" /D "NDEBUG" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /Fr /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 Glacier.lib IceSSL.lib Ice.lib IceUtil.lib /nologo /subsystem:console /machine:I386 /out:"client.exe" /libpath:"../../../lib"
-# SUBTRACT LINK32 /debug /nodefaultlib
-
-!ELSEIF "$(CFG)" == "sessionC - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /WX /Gm /GR /GX /Zi /Od /I "." /I "../../../include" /D "_DEBUG" /D "_CONSOLE" /FD /GZ /c
-# SUBTRACT CPP /Fr /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 Glacierd.lib IceSSLd.lib Iced.lib IceUtild.lib /nologo /subsystem:console /debug /machine:I386 /out:"client.exe" /pdbtype:sept /libpath:"../../../lib"
-# SUBTRACT LINK32 /nodefaultlib
-
-!ENDIF
-
-# Begin Target
-
-# Name "sessionC - Win32 Release"
-# Name "sessionC - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\Client.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\HelloSession.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\HelloSession.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=.\HelloSession.ice
-
-!IF "$(CFG)" == "sessionC - Win32 Release"
-
-USERDEP__HELLO="..\..\..\bin\slice2cpp.exe" "..\..\..\lib\slice.lib"
-# Begin Custom Build
-InputPath=.\HelloSession.ice
-
-BuildCmds= \
- ..\..\..\bin\slice2cpp.exe -I../../../slice HelloSession.ice
-
-"HelloSession.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"HelloSession.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "sessionC - Win32 Debug"
-
-USERDEP__HELLO="..\..\..\bin\slice2cpp.exe" "..\..\..\lib\sliced.lib"
-# Begin Custom Build
-InputPath=.\HelloSession.ice
-
-BuildCmds= \
- ..\..\..\bin\slice2cpp.exe -I../../../slice HelloSession.ice
-
-"HelloSession.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"HelloSession.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/cpp/demo/Glacier/session/sessionS.dsp b/cpp/demo/Glacier/session/sessionS.dsp deleted file mode 100644 index ffd3ea03e72..00000000000 --- a/cpp/demo/Glacier/session/sessionS.dsp +++ /dev/null @@ -1,161 +0,0 @@ -# Microsoft Developer Studio Project File - Name="sessionS" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=sessionS - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "sessionS.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "sessionS.mak" CFG="sessionS - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "sessionS - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "sessionS - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "sessionS - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I "." /I "../../../include" /D "NDEBUG" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /Fr /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 Glacier.lib IceSSL.lib Ice.lib IceUtil.lib /nologo /subsystem:console /machine:I386 /out:"server.exe" /libpath:"../../../lib"
-# SUBTRACT LINK32 /debug /nodefaultlib
-
-!ELSEIF "$(CFG)" == "sessionS - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /WX /Gm /GR /GX /Zi /Od /I "." /I "../../../include" /D "_DEBUG" /D "_CONSOLE" /FD /GZ /c
-# SUBTRACT CPP /Fr /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 Glacierd.lib IceSSLd.lib Iced.lib IceUtild.lib /nologo /subsystem:console /debug /machine:I386 /out:"server.exe" /pdbtype:sept /libpath:"../../../lib"
-# SUBTRACT LINK32 /nodefaultlib
-
-!ENDIF
-
-# Begin Target
-
-# Name "sessionS - Win32 Release"
-# Name "sessionS - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\HelloSession.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\HelloSessionI.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Server.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\HelloSession.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\HelloSessionI.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=.\HelloSession.ice
-
-!IF "$(CFG)" == "sessionS - Win32 Release"
-
-USERDEP__HELLO="..\..\..\bin\slice2cpp.exe" "..\..\..\lib\slice.lib"
-# Begin Custom Build
-InputPath=.\HelloSession.ice
-
-BuildCmds= \
- ..\..\..\bin\slice2cpp.exe -I../../../slice HelloSession.ice
-
-"HelloSession.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"HelloSession.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "sessionS - Win32 Debug"
-
-USERDEP__HELLO="..\..\..\bin\slice2cpp.exe" "..\..\..\lib\sliced.lib"
-# Begin Custom Build
-InputPath=.\HelloSession.ice
-
-BuildCmds= \
- ..\..\..\bin\slice2cpp.exe -I../../../slice HelloSession.ice
-
-"HelloSession.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"HelloSession.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/cpp/demo/Makefile b/cpp/demo/Makefile index c8dee7dae56..40e7758b91a 100644 --- a/cpp/demo/Makefile +++ b/cpp/demo/Makefile @@ -17,7 +17,6 @@ SUBDIRS = IceUtil \ IceStorm \ IceBox \ IcePack \ - Glacier \ Glacier2 \ book diff --git a/cpp/include/Glacier/Glacier.h b/cpp/include/Glacier/Glacier.h deleted file mode 100644 index b3972ca1f34..00000000000 --- a/cpp/include/Glacier/Glacier.h +++ /dev/null @@ -1,18 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#ifndef GLACIER_H -#define GLACIER_H - -#include <Glacier/Router.h> -#include <Glacier/Starter.h> -#include <Glacier/Session.h> -#include <Glacier/SessionManager.h> - -#endif diff --git a/cpp/include/Glacier/Makefile b/cpp/include/Glacier/Makefile deleted file mode 100644 index 2c30a270ced..00000000000 --- a/cpp/include/Glacier/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -# ********************************************************************** -# -# Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -# -# This copy of Ice is licensed to you under the terms described in the -# ICE_LICENSE file included in this distribution. -# -# ********************************************************************** - -top_srcdir = ../.. - -include $(top_srcdir)/config/Make.rules - -install:: - @if test ! -d $(install_includedir)/Glacier ; \ - then \ - echo "Creating $(install_includedir)/Glacier..." ; \ - mkdir $(install_includedir)/Glacier ; \ - chmod a+rx $(install_includedir)/Glacier ; \ - fi - - @for i in *.h ; \ - do \ - echo "Installing $$i" ; \ - $(INSTALL_DATA) $$i $(install_includedir)/Glacier/$$i ; \ - done diff --git a/cpp/include/Makefile b/cpp/include/Makefile index b866c134e4d..e7107c90455 100644 --- a/cpp/include/Makefile +++ b/cpp/include/Makefile @@ -12,7 +12,6 @@ top_srcdir = .. include $(top_srcdir)/config/Make.rules SUBDIRS = Freeze \ - Glacier \ Glacier2 \ Ice \ IceBox \ diff --git a/cpp/src/Glacier/Blobject.cpp b/cpp/src/Glacier/Blobject.cpp deleted file mode 100644 index c2a2710ba9f..00000000000 --- a/cpp/src/Glacier/Blobject.cpp +++ /dev/null @@ -1,331 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <Glacier/Blobject.h> - -using namespace std; -using namespace Ice; -using namespace Glacier; - -Glacier::TwowayThrottle::TwowayThrottle(const CommunicatorPtr& communicator, bool reverse) : - _communicator(communicator), - _reverse(reverse), - _properties(_communicator->getProperties()), - _logger(_communicator->getLogger()), - _traceLevel(_properties->getPropertyAsInt("Glacier.Router.Trace.Throttle")), - _max(_reverse ? - _properties->getPropertyAsInt("Glacier.Router.Server.Throttle.Twoways") : - _properties->getPropertyAsInt("Glacier.Router.Client.Throttle.Twoways")), - _count(0) -{ -} - -Glacier::TwowayThrottle::~TwowayThrottle() -{ - assert(_count == 0); -} - -void -Glacier::TwowayThrottle::twowayStarted(const Ice::ObjectPrx& proxy, const Ice::Current& current) -{ - if(_max <= 0) - { - return; - } - - { - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - - assert(_count <= _max); - - while(_count == _max) - { - if(_traceLevel >= 1) - { - Trace out(_logger, "Glacier"); - out << "throttling "; - if(_reverse) - { - out << "reverse "; - } - out << "twoway call:"; - out << "\nnumber of calls = " << _count; - out << "\nproxy = " << _communicator->proxyToString(proxy); - out << "\noperation = " << current.operation; - } - - wait(); - } - - ++_count; - } -} - -void -Glacier::TwowayThrottle::twowayFinished() -{ - if(_max <= 0) - { - return; - } - - { - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - - assert(_count <= _max); - - if(_count == _max) - { - notifyAll(); - } - - --_count; - } -} - - -#ifdef __HP_aCC -// -// Compiler bug! -// The conditional in Glacier::Blobject::Blobject below result in a -// std::exception "thread synchronization error" at runtime -// when using string literals (looks like a RogueWave bug) -// The work around is to use static strings: -// - -static const string traceServer = "Glacier.Router.Trace.Server"; -static const string traceClient = "Glacier.Router.Trace.Client"; - -static const string serverForwardContext = "Glacier.Router.Server.ForwardContext"; -static const string clientForwardContext = "Glacier.Router.Client.ForwardContext"; - -static const string serverSleepTime = "Glacier.Router.Server.SleepTime"; -static const string clientSleepTime = "Glacier.Router.Client.SleepTime"; -#endif - -Glacier::Blobject::Blobject(const CommunicatorPtr& communicator, bool reverse) : - _communicator(communicator), - _reverse(reverse), - _properties(_communicator->getProperties()), - _logger(_communicator->getLogger()), - -#ifdef __HP_aCC - // - // Compiler bug, see above - // - _traceLevel(_reverse ? - _properties->getPropertyAsInt(traceServer) : - _properties->getPropertyAsInt(traceClient)), - _forwardContext(_reverse ? - _properties->getPropertyAsInt(serverForwardContext) > 0 : - _properties->getPropertyAsInt(clientForwardContext) > 0), - _sleepTime(_reverse ? - IceUtil::Time::milliSeconds(_properties->getPropertyAsInt(serverSleepTime)) : - IceUtil::Time::milliSeconds(_properties->getPropertyAsInt(clientSleepTime))), - -#else - _traceLevel(_reverse ? - _properties->getPropertyAsInt("Glacier.Router.Trace.Server") : - _properties->getPropertyAsInt("Glacier.Router.Trace.Client")), - _forwardContext(_reverse ? - _properties->getPropertyAsInt("Glacier.Router.Server.ForwardContext") > 0 : - _properties->getPropertyAsInt("Glacier.Router.Client.ForwardContext") > 0), - _sleepTime(_reverse ? - IceUtil::Time::milliSeconds(_properties->getPropertyAsInt("Glacier.Router.Server.SleepTime")) : - IceUtil::Time::milliSeconds(_properties->getPropertyAsInt("Glacier.Router.Client.SleepTime"))), -#endif - - _twowayThrottle(_communicator, _reverse) -{ - _requestQueue = new RequestQueue(_communicator, _traceLevel, _reverse, _sleepTime); - _requestQueueControl = _requestQueue->start(); -} - -Glacier::Blobject::~Blobject() -{ - assert(!_communicator); - assert(!_requestQueue); -} - -void -Glacier::Blobject::destroy() -{ - // - // No mutex protection necessary, destroy is only called after all - // object adapters have shut down. - // - _communicator = 0; - - _requestQueue->destroy(); - _requestQueueControl.join(); - _requestQueue = 0; -} - -class GlacierCB : public AMI_Object_ice_invoke -{ -public: - - GlacierCB(const AMD_Object_ice_invokePtr& cb, TwowayThrottle& twowayThrottle) : - _cb(cb), - _twowayThrottle(twowayThrottle) - { - } - - virtual - ~GlacierCB() - { - _twowayThrottle.twowayFinished(); - } - - virtual void - ice_response(bool ok, const ::std::vector< ::Ice::Byte>& outParams) - { - _cb->ice_response(ok, outParams); - } - - virtual void - ice_exception(const ::IceUtil::Exception& ex) - { - _cb->ice_exception(ex); - } - -private: - - AMD_Object_ice_invokePtr _cb; - TwowayThrottle& _twowayThrottle; -}; - -void -Glacier::Blobject::invoke(ObjectPrx& proxy, const AMD_Object_ice_invokePtr& amdCB, const vector<Byte>& inParams, - const Current& current) -{ - try - { - bool missive = modifyProxy(proxy, current); - - if(missive) // Batch routing? - { - vector<Byte> dummy; - amdCB->ice_response(true, dummy); - - _requestQueue->addMissive(new Request(proxy, inParams, current, _forwardContext)); - } - else // Regular routing. - { - AMI_Object_ice_invokePtr amiCB; - - if(proxy->ice_isTwoway()) - { - amiCB = new GlacierCB(amdCB, _twowayThrottle); - _twowayThrottle.twowayStarted(proxy, current); - } - else - { - vector<Byte> dummy; - amdCB->ice_response(true, dummy); - } - - _requestQueue->addRequest(new Request(proxy, inParams, current, _forwardContext, amiCB)); - } - } - catch(const Exception& ex) - { - if(_traceLevel >= 1) - { - Trace out(_logger, "Glacier"); - if(_reverse) - { - out << "reverse "; - } - out << "routing exception:\n" << ex; - } - - ex.ice_throw(); - } - - return; -} - -bool -Glacier::Blobject::modifyProxy(ObjectPrx& proxy, const Current& current) -{ - if(!current.facet.empty()) - { - proxy = proxy->ice_newFacet(current.facet); - } - - bool missive = false; - - Context::const_iterator p = current.ctx.find("_fwd"); - if(p != current.ctx.end()) - { - for(unsigned int i = 0; i < p->second.length(); ++i) - { - char option = p->second[i]; - switch(option) - { - case 't': - { - proxy = proxy->ice_twoway(); - missive = false; - break; - } - - case 'o': - { - proxy = proxy->ice_oneway(); - missive = false; - break; - } - - case 'd': - { - proxy = proxy->ice_datagram(); - missive = false; - break; - } - - case 'O': - { - proxy = proxy->ice_batchOneway(); - missive = true; - break; - } - - case 'D': - { - proxy = proxy->ice_batchDatagram(); - missive = true; - break; - } - - case 's': - { - proxy = proxy->ice_secure(true); - break; - } - - case 'z': - { - proxy = proxy->ice_compress(true); - break; - } - - default: - { - Warning out(_logger); - out << "unknown forward option `" << option << "'"; - break; - } - } - } - } - - return missive; -} diff --git a/cpp/src/Glacier/Blobject.h b/cpp/src/Glacier/Blobject.h deleted file mode 100644 index cc757d8ce3b..00000000000 --- a/cpp/src/Glacier/Blobject.h +++ /dev/null @@ -1,78 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#ifndef BLOBJECT_H -#define BLOBJECT_H - -#include <Ice/Ice.h> -#include <IceUtil/Monitor.h> -#include <Glacier/Request.h> - -namespace Glacier -{ - -class TwowayThrottle : public IceUtil::Monitor<IceUtil::Mutex> -{ -public: - - TwowayThrottle(const Ice::CommunicatorPtr&, bool); - ~TwowayThrottle(); - - void twowayStarted(const Ice::ObjectPrx&, const Ice::Current&); - void twowayFinished(); - -private: - - const Ice::CommunicatorPtr _communicator; - const bool _reverse; - - const Ice::PropertiesPtr _properties; - const Ice::LoggerPtr _logger; - const int _traceLevel; - const int _max; - - int _count; -}; - -class Blobject : public Ice::BlobjectAsync -{ -public: - - Blobject(const Ice::CommunicatorPtr&, bool); - virtual ~Blobject(); - - virtual void destroy(); - -protected: - - void invoke(Ice::ObjectPrx&, const Ice::AMD_Object_ice_invokePtr&, const std::vector<Ice::Byte>&, - const Ice::Current&); - bool modifyProxy(Ice::ObjectPrx&, const Ice::Current&); - - Ice::CommunicatorPtr _communicator; - const bool _reverse; - - const Ice::PropertiesPtr _properties; - const Ice::LoggerPtr _logger; - const int _traceLevel; - -private: - - const bool _forwardContext; - const IceUtil::Time _sleepTime; - - RequestQueuePtr _requestQueue; - IceUtil::ThreadControl _requestQueueControl; - - TwowayThrottle _twowayThrottle; -}; - -} - -#endif diff --git a/cpp/src/Glacier/ClientBlobject.cpp b/cpp/src/Glacier/ClientBlobject.cpp deleted file mode 100644 index 947fd187d01..00000000000 --- a/cpp/src/Glacier/ClientBlobject.cpp +++ /dev/null @@ -1,85 +0,0 @@ - -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <Ice/RoutingTable.h> -#include <Ice/IdentityUtil.h> - -#include <Glacier/ClientBlobject.h> - -using namespace std; -using namespace Ice; -using namespace Glacier; - -Glacier::ClientBlobject::ClientBlobject(const CommunicatorPtr& communicator, - const IceInternal::RoutingTablePtr& routingTable, - const string& allowCategories) : - Glacier::Blobject(communicator, false), - _routingTable(routingTable) -{ - const string ws = " \t"; - string::size_type current = allowCategories.find_first_not_of(ws, 0); - while(current != string::npos) - { - string::size_type pos = allowCategories.find_first_of(ws, current); - string::size_type len = (pos == string::npos) ? string::npos : pos - current; - string category = allowCategories.substr(current, len); - _allowCategories.push_back(category); - current = allowCategories.find_first_not_of(ws, pos); - } - sort(_allowCategories.begin(), _allowCategories.end()); // Must be sorted. - _allowCategories.erase(unique(_allowCategories.begin(), _allowCategories.end()), _allowCategories.end()); -} - -void -Glacier::ClientBlobject::destroy() -{ - // - // No mutex protection necessary, destroy is only called after all - // object adapters have shut down. - // - _routingTable = 0; - Blobject::destroy(); -} - -void -Glacier::ClientBlobject::ice_invoke_async(const Ice::AMD_Object_ice_invokePtr& amdCB, const vector<Byte>& inParams, - const Current& current) -{ - assert(_communicator); // Destroyed? - - // - // If there is an _allowCategories set then enforce it. - // - if(!_allowCategories.empty()) - { - if(!binary_search(_allowCategories.begin(), _allowCategories.end(), current.id.category)) - { - if(_traceLevel >= 1) - { - Trace out(_logger, "Glacier"); - out << "rejecting request\n"; - out << "identity: " << identityToString(current.id); - } - ObjectNotExistException ex(__FILE__, __LINE__); - ex.id = current.id; - throw ex; - } - } - - ObjectPrx proxy = _routingTable->get(current.id); - if(!proxy) - { - ObjectNotExistException ex(__FILE__, __LINE__); - ex.id = current.id; - throw ex; - } - - invoke(proxy, amdCB, inParams, current); -} diff --git a/cpp/src/Glacier/ClientBlobject.h b/cpp/src/Glacier/ClientBlobject.h deleted file mode 100644 index 7deeb9677e4..00000000000 --- a/cpp/src/Glacier/ClientBlobject.h +++ /dev/null @@ -1,38 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#ifndef CLIENT_BLOBJECT_H -#define CLIENT_BLOBJECT_H - -#include <Ice/RoutingTableF.h> -#include <Glacier/Blobject.h> - -namespace Glacier -{ - -class ClientBlobject : public Glacier::Blobject -{ -public: - - ClientBlobject(const Ice::CommunicatorPtr&, const IceInternal::RoutingTablePtr&, const std::string&); - - virtual void destroy(); - - virtual void ice_invoke_async(const Ice::AMD_Object_ice_invokePtr&, const std::vector<Ice::Byte>&, - const Ice::Current&); - -private: - - IceInternal::RoutingTablePtr _routingTable; - std::vector<std::string> _allowCategories; -}; - -} - -#endif diff --git a/cpp/src/Glacier/GlacierRouter.cpp b/cpp/src/Glacier/GlacierRouter.cpp deleted file mode 100644 index e085ac19869..00000000000 --- a/cpp/src/Glacier/GlacierRouter.cpp +++ /dev/null @@ -1,385 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <Ice/Application.h> -#include <Ice/RoutingTable.h> -#include <Glacier/RouterI.h> -#include <Glacier/ClientBlobject.h> -#include <Glacier/ServerBlobject.h> -#include <Glacier/SessionManager.h> -#include <IceUtil/Base64.h> -#include <IceUtil/Options.h> -#include <IceSSL/CertificateVerifierF.h> -#include <IceSSL/Plugin.h> - -using namespace std; -using namespace Ice; -using namespace Glacier; - -namespace Glacier -{ - -class ServantLocator : public Ice::ServantLocator -{ -public: - - ServantLocator(const ObjectPtr&); - - virtual ObjectPtr locate(const Current&, LocalObjectPtr&); - virtual void finished(const Current&, const ObjectPtr&, const LocalObjectPtr&); - virtual void deactivate(const string&); - -private: - - ObjectPtr _blobject; -}; - -class RouterApp : public Application -{ -public: - - void usage(); - virtual int run(int, char*[]); -}; - -}; - -Glacier::ServantLocator::ServantLocator(const ObjectPtr& blobject) : - _blobject(blobject) -{ -} - -ObjectPtr -Glacier::ServantLocator::locate(const Current&, LocalObjectPtr&) -{ - return _blobject; -} - -void -Glacier::ServantLocator::finished(const Current&, const ObjectPtr&, const LocalObjectPtr&) -{ - // Nothing to do -} - -void -Glacier::ServantLocator::deactivate(const string&) -{ - ClientBlobject* clientBlobject = dynamic_cast<ClientBlobject*>(_blobject.get()); - if(clientBlobject) - { - clientBlobject->destroy(); - } - - ServerBlobject* serverBlobject = dynamic_cast<ServerBlobject*>(_blobject.get()); - if(serverBlobject) - { - serverBlobject->destroy(); - } - - _blobject = 0; -} - -void -Glacier::RouterApp::usage() -{ - cerr << "Usage: " << appName() << " [options]\n"; - cerr << - "Options:\n" - "-h, --help Show this message.\n" - "-v, --version Display the Ice version.\n" - ; -} - -int -Glacier::RouterApp::run(int argc, char* argv[]) -{ - IceUtil::Options opts; - opts.addOpt("h", "help"); - opts.addOpt("v", "version"); - - vector<string> args; - try - { - args = opts.parse(argc, argv); - } - catch(const IceUtil::Options::BadOpt& e) - { - cerr << e.reason << endl; - usage(); - return EXIT_FAILURE; - } - - if(opts.isSet("h") || opts.isSet("help")) - { - usage(); - return EXIT_SUCCESS; - } - if(opts.isSet("v") || opts.isSet("version")) - { - cout << ICE_STRING_VERSION << endl; - return EXIT_SUCCESS; - } - - if(!args.empty()) - { - usage(); - return EXIT_FAILURE; - } - - PropertiesPtr properties = communicator()->getProperties(); - - string clientConfig = properties->getProperty("IceSSL.Client.Config"); - string serverConfig = properties->getProperty("IceSSL.Server.Config"); - - // - // Only do this if we've been configured for SSL. - // - if(!clientConfig.empty() && !serverConfig.empty()) - { - IceSSL::ContextType contextType = IceSSL::ClientServer; - - // - // Get the SSL plugin. - // - PluginManagerPtr pluginManager = communicator()->getPluginManager(); - PluginPtr plugin = pluginManager->getPlugin("IceSSL"); - IceSSL::PluginPtr sslPlugin = IceSSL::PluginPtr::dynamicCast(plugin); - assert(sslPlugin); - - // - // The plug-in must configure itself (using config files as specified). - // - sslPlugin->configure(contextType); - - // If we have been told only to only accept a single certificate. - string clientCertBase64 = properties->getProperty("Glacier.Router.AcceptCert"); - if(!clientCertBase64.empty()) - { - // Install a Certificate Verifier that only accepts indicated certificate. - ByteSeq clientCert = IceUtil::Base64::decode(clientCertBase64); - sslPlugin->setCertificateVerifier(contextType, sslPlugin->getSingleCertVerifier(clientCert)); - - // Add the Client's certificate as a trusted certificate. - sslPlugin->addTrustedCertificateBase64(contextType, clientCertBase64); - } - } - - // - // Create the routing table. - // - IceInternal::RoutingTablePtr routingTable = new IceInternal::RoutingTable; - - // - // Initialize the client object adapter. - // - const char* clientEndpointsProperty = "Glacier.Router.Client.Endpoints"; - if(properties->getProperty(clientEndpointsProperty).empty()) - { - cerr << appName() << ": property `" << clientEndpointsProperty << "' is not set" << endl; - return EXIT_FAILURE; - } - ObjectAdapterPtr clientAdapter = communicator()->createObjectAdapter("Glacier.Router.Client"); - - // - // Initialize the server object adapter. - // - ObjectAdapterPtr serverAdapter; - if(!properties->getProperty("Glacier.Router.Server.Endpoints").empty()) - { - serverAdapter = communicator()->createObjectAdapter("Glacier.Router.Server"); - } - - // - // Create the client and server blobjects and the associated - // servant locators. - // - const char* allowCategoriesProperty = "Glacier.Router.AllowCategories"; - string allowCategories = properties->getProperty(allowCategoriesProperty); - ObjectPtr clientBlobject = new ClientBlobject(communicator(), routingTable, allowCategories); - Ice::ServantLocatorPtr clientServantLocator = new Glacier::ServantLocator(clientBlobject); - clientAdapter->addServantLocator(clientServantLocator, ""); - if(serverAdapter) - { - ObjectPtr serverBlobject = new ServerBlobject(clientAdapter); - Ice::ServantLocatorPtr serverServantLocator = new Glacier::ServantLocator(serverBlobject); - serverAdapter->addServantLocator(serverServantLocator, ""); - } - - // - // Initialize the router object adapter and the router object. - // - const char* routerEndpointsProperty = "Glacier.Router.Endpoints"; - if(properties->getProperty(routerEndpointsProperty).empty()) - { - cerr << appName() << ": property `" << routerEndpointsProperty << "' is not set" << endl; - return EXIT_FAILURE; - } - - const char* routerIdentityProperty = "Glacier.Router.Identity"; - string routerIdentity = properties->getPropertyWithDefault(routerIdentityProperty, "Glacier/router"); - - const char* sessionManagerProperty = "Glacier.Router.SessionManager"; - string sessionManager = properties->getProperty(sessionManagerProperty); - - SessionManagerPrx sessionManagerPrx; - if(!sessionManager.empty()) - { - sessionManagerPrx = SessionManagerPrx::checkedCast(communicator()->stringToProxy(sessionManager)); - } - - const char* userIdProperty = "Glacier.Router.UserId"; - string userId = properties->getProperty(userIdProperty); - - ObjectAdapterPtr routerAdapter = communicator()->createObjectAdapter("Glacier.Router"); - RouterPtr router = new RouterI(clientAdapter, serverAdapter, routingTable, sessionManagerPrx, userId); - routerAdapter->add(router, stringToIdentity(routerIdentity)); - -#ifdef _WIN32 - // - // Send the stringified router proxy to a named pipe, if so requested. - // - string outputFd = properties->getProperty("Glacier.Router.PrintProxyOnFd"); - if(!outputFd.empty()) - { - // - // Windows 9x/ME does not allow colons in a pipe name, so we ensure - // our UUID does not have any. - // - string pipeName = "\\\\.\\pipe\\" + routerIdentity; - string::size_type pos; - while((pos = pipeName.find(':')) != string::npos) - { - pipeName[pos] = '-'; - } - - HANDLE pipe = CreateFile( - pipeName.c_str(), // Pipe name - GENERIC_WRITE, // Write access - 0, // No sharing - NULL, // No security attributes - OPEN_EXISTING, // Opens existing pipe - 0, // Default attributes - NULL); // No template file - - if(pipe == INVALID_HANDLE_VALUE) - { - cerr << appName() << ": cannot open pipe `" << pipeName << "' to starter" << endl; - - // - // Destroy the router. The client and server blobjects get destroyed by ServantLocator::deactivate. - // - RouterI* rtr = dynamic_cast<RouterI*>(router.get()); - assert(rtr); - rtr->destroy(); - - return EXIT_FAILURE; - } - - string ref = communicator()->proxyToString(routerAdapter->createProxy(stringToIdentity(routerIdentity))); - string::size_type count = 0; - while(count < ref.size()) - { - DWORD n; - if(!WriteFile(pipe, ref.c_str(), ref.length(), &n, NULL)) - { - cerr << appName() << ": unable to write proxy to pipe" << endl; - - // - // Destroy the router. The client and server blobjects get destroyed by ServantLocator::deactivate. - // - RouterI* rtr = dynamic_cast<RouterI*>(router.get()); - assert(rtr); - rtr->destroy(); - - return EXIT_FAILURE; - } - count += n; - } - - FlushFileBuffers(pipe); - CloseHandle(pipe); - } -#else - // - // Print the stringified router proxy on a filedescriptor - // specified in the properties, if so requested. - // - string outputFd = properties->getProperty("Glacier.Router.PrintProxyOnFd"); - if(!outputFd.empty()) - { - int fd = atoi(outputFd.c_str()); - string ref = communicator()->proxyToString(routerAdapter->createProxy(stringToIdentity(routerIdentity))); - ref += "\n"; - string::size_type sz = static_cast<string::size_type>(write(fd, ref.c_str(), ref.length())); - if(sz != ref.length()) - { - cerr << appName() << ": cannot write stringified router proxy to filedescriptor " << fd << ": " - << strerror(errno) << endl; - - // - // Destroy the router. The client and server blobjects get - // destroyed by ServantLocator::deactivate. - // - RouterI* rtr = dynamic_cast<RouterI*>(router.get()); - assert(rtr); - rtr->destroy(); - - return EXIT_FAILURE; - } - close(fd); - } -#endif - - // - // 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 - // destroyed by ServantLocator::deactivate. - // - // Destroying the router will also destroy all sessions associated - // with the router. - // - RouterI* rtr = dynamic_cast<RouterI*>(router.get()); - assert(rtr); - rtr->destroy(); - - return EXIT_SUCCESS; -} - -int -main(int argc, char* argv[]) -{ - // - // Make sure that this process doesn't use a router. - // - try - { - PropertiesPtr defaultProperties = getDefaultProperties(argc, argv); - defaultProperties->setProperty("Ice.Default.Router", ""); - } - catch(const Exception& e) - { - cerr << e << endl; - exit(EXIT_FAILURE); - } - - Glacier::RouterApp app; - return app.main(argc, argv); -} diff --git a/cpp/src/Glacier/GlacierStarter.cpp b/cpp/src/Glacier/GlacierStarter.cpp deleted file mode 100644 index ce5f5fe6ae6..00000000000 --- a/cpp/src/Glacier/GlacierStarter.cpp +++ /dev/null @@ -1,283 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <Ice/Service.h> -#include <IceUtil/Options.h> -#include <Glacier/StarterI.h> -#include <fstream> - -#ifndef _WIN32 -# include <signal.h> -# include <sys/wait.h> -#endif - -using namespace std; - -namespace Glacier -{ - -class StarterService : public Ice::Service -{ -public: - - StarterService(); - -protected: - - virtual bool start(int, char*[]); - virtual bool stop(); - virtual Ice::CommunicatorPtr initializeCommunicator(int&, char*[]); - -private: - - void usage(const std::string&); - - StarterIPtr _starter; -}; - -} // End of namespace Glacier - -#ifndef _WIN32 -extern "C" -{ - -static void -childHandler(int) -{ - // - // Call wait to de-allocate any resources allocated for the child - // process and avoid zombie processes. See man wait or waitpid for - // more information. - // - int olderrno = errno; - - pid_t pid; - do - { - pid = waitpid(-1, 0, WNOHANG); - } - while(pid > 0); - - assert(pid != -1 || errno == ECHILD); - - errno = olderrno; -} - -} -#endif - -Glacier::StarterService::StarterService() -{ -} - -bool -Glacier::StarterService::start(int argc, char* argv[]) -{ - IceUtil::Options opts; - opts.addOpt("h", "help"); - opts.addOpt("v", "version"); - - vector<string> args; - try - { - args = opts.parse(argc, argv); - } - catch(const IceUtil::Options::BadOpt& e) - { - cerr << argv[0] << ": " << e.reason << endl; - usage(argv[0]); - return false; - } - - if(opts.isSet("h") || opts.isSet("help")) - { - usage(argv[0]); - return false; - } - if(opts.isSet("v") || opts.isSet("version")) - { - cout << ICE_STRING_VERSION << endl; - return false; - } - - if(!args.empty()) - { - usage(argv[0]); - return false; - } - - Ice::PropertiesPtr properties = communicator()->getProperties(); - - // - // Initialize the object adapter (and make sure this object - // adapter doesn't register itself with the locator). - // - const string endpointsProperty = "Glacier.Starter.Endpoints"; - if(properties->getProperty(endpointsProperty).empty()) - { - error("property `" + endpointsProperty + "' is not set"); - return false; - } - - Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Glacier.Starter"); - - // - // Get the permissions verifier, or create a default one if no - // verifier is specified. - // - string verifierProperty = properties->getProperty("Glacier.Starter.PermissionsVerifier"); - PermissionsVerifierPrx verifier; - if(!verifierProperty.empty()) - { - verifier = PermissionsVerifierPrx::checkedCast(communicator()->stringToProxy(verifierProperty)); - if(!verifier) - { - error("permissions verifier `" + verifierProperty + "' is invalid"); - return false; - } - } - else - { - string passwordsProperty = properties->getPropertyWithDefault("Glacier.Starter.CryptPasswords", "passwords"); - - ifstream passwordFile(passwordsProperty.c_str()); - if(!passwordFile) - { - string err = strerror(errno); - error("cannot open `" + passwordsProperty + "' for reading: " + err); - return false; - } - - map<string, string> passwords; - - while(true) - { - string userId; - passwordFile >> userId; - if(!passwordFile) - { - break; - } - - string password; - passwordFile >> password; - if(!passwordFile) - { - break; - } - - assert(!userId.empty()); - assert(!password.empty()); - passwords.insert(make_pair(userId, password)); - } - - PermissionsVerifierPtr verifierImpl = new CryptPasswordVerifierI(passwords); - verifier = PermissionsVerifierPrx::uncheckedCast(adapter->addWithUUID(verifierImpl)); - } - - // - // Create and initialize the starter object. - // - _starter = new StarterI(communicator(), verifier); - adapter->add(_starter, Ice::stringToIdentity("Glacier/starter")); - - // - // Everything ok, let's go. - // - adapter->activate(); - - return true; -} - -bool -Glacier::StarterService::stop() -{ - // - // Destroy the starter. - // - assert(_starter); - _starter->destroy(); - - return true; -} - -Ice::CommunicatorPtr -Glacier::StarterService::initializeCommunicator(int& argc, char* argv[]) -{ - // - // Make sure that this process doesn't use a router. - // - Ice::PropertiesPtr defaultProperties = Ice::getDefaultProperties(argc, argv); - defaultProperties->setProperty("Ice.Default.Router", ""); - - return Service::initializeCommunicator(argc, argv); -} - -void -Glacier::StarterService::usage(const string& appName) -{ - string options = - "Options:\n" - "-h, --help Show this message.\n" - "-v, --version Display the Ice version."; -#ifdef _WIN32 - if(checkSystem()) - { - options.append( - "\n" - "\n" - "--service NAME Run as the Windows service NAME.\n" - "\n" - "--install NAME [--display DISP] [--executable EXEC] [args]\n" - " Install as Windows service NAME. If DISP is\n" - " provided, use it as the display name,\n" - " otherwise NAME is used. If EXEC is provided,\n" - " use it as the service executable, otherwise\n" - " this executable is used. Any additional\n" - " arguments are passed unchanged to the\n" - " service at startup.\n" - "--uninstall NAME Uninstall Windows service NAME.\n" - "--start NAME [args] Start Windows service NAME. Any additional\n" - " arguments are passed unchanged to the\n" - " service.\n" - "--stop NAME Stop Windows service NAME." - ); - } -#else - options.append( - "\n" - "\n" - "--daemon Run as a daemon.\n" - "--noclose Do not close open file descriptors.\n" - "--nochdir Do not change the current working directory." - ); -#endif - cerr << "Usage: " << appName << " [options]" << endl; - cerr << options << endl; -} - -int -main(int argc, char* argv[]) -{ -#ifndef _WIN32 - // - // This application forks, so we need a signal handler for child - // termination. - // - struct sigaction action; - action.sa_handler = childHandler; - sigemptyset(&action.sa_mask); - sigaddset(&action.sa_mask, SIGCHLD); - action.sa_flags = 0; - sigaction(SIGCHLD, &action, 0); -#endif - - Glacier::StarterService svc; - return svc.main(argc, argv); -} diff --git a/cpp/src/Glacier/Makefile b/cpp/src/Glacier/Makefile deleted file mode 100644 index 69f4fe2aec7..00000000000 --- a/cpp/src/Glacier/Makefile +++ /dev/null @@ -1,84 +0,0 @@ -# ********************************************************************** -# -# Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -# -# This copy of Ice is licensed to you under the terms described in the -# ICE_LICENSE file included in this distribution. -# -# ********************************************************************** - -top_srcdir = ../.. - -LIBFILENAME = $(call mklibfilename,Glacier,$(VERSION)) -SONAME = $(call mksoname,Glacier,$(SOVERSION)) -LIBNAME = $(call mklibname,Glacier) - -ROUTER = $(top_srcdir)/bin/glacierrouter -STARTER = $(top_srcdir)/bin/glacierstarter - -LIBTARGETS = $(call mklibtargets,$(libdir)/$(LIBFILENAME),$(libdir)/$(SONAME),$(libdir)/$(LIBNAME)) -TARGETS = $(LIBTARGETS) $(ROUTER) $(STARTER) - -OBJS = Router.o \ - SessionF.o \ - Session.o \ - SessionManagerF.o \ - SessionManager.o \ - Starter.o - -ROBJS = GlacierRouter.o \ - RouterI.o \ - Blobject.o \ - ClientBlobject.o \ - ServerBlobject.o \ - Request.o - -SOBJS = GlacierStarter.o \ - StarterI.o - -SRCS = $(OBJS:.o=.cpp) \ - $(ROBJS:.o=.cpp) \ - $(SOBJS:.o=.cpp) - -SLICE_SRCS = $(SDIR)/Starter.ice \ - $(SDIR)/Router.ice \ - $(SDIR)/Session.ice \ - $(SDIR)/SessionManager.ice \ - $(SDIR)/SessionF.ice \ - $(SDIR)/SessionManagerF.ice - -HDIR = $(includedir)/Glacier -SDIR = $(slicedir)/Glacier - -include $(top_srcdir)/config/Make.rules - -CPPFLAGS := -I.. $(CPPFLAGS) -DGLACIER_API_EXPORTS $(OPENSSL_FLAGS) -SLICE2CPPFLAGS := --checksum --include-dir Glacier --dll-export GLACIER_API $(SLICE2CPPFLAGS) -LINKWITH := -lIce -lIceUtil - -$(libdir)/$(LIBFILENAME): $(OBJS) - rm -f $@ - $(call mkshlib,$@,$(SONAME),$(OBJS),$(LINKWITH)) - -$(libdir)/$(SONAME): $(libdir)/$(LIBFILENAME) - rm -f $@ - ln -s $(LIBFILENAME) $@ - -$(libdir)/$(LIBNAME): $(libdir)/$(SONAME) - rm -f $@ - ln -s $(SONAME) $@ - -$(ROUTER): $(ROBJS) $(LIBTARGETS) - rm -f $@ - $(CXX) $(LDFLAGS) -o $@ $(ROBJS) -lGlacier -lIceSSL $(LIBS) $(OPENSSL_LIBS) $(EXPAT_LIBS) - -$(STARTER): $(SOBJS) $(LIBTARGETS) - rm -f $@ - $(CXX) $(LDFLAGS) -o $@ $(SOBJS) -lGlacier -lIceSSL $(LIBS) $(OPENSSL_LIBS) $(EXPAT_LIBS) - -install:: all - $(call installlib,$(install_libdir),$(libdir),$(LIBFILENAME),$(SONAME),$(LIBNAME)) - $(INSTALL_PROGRAM) $(ROUTER) $(install_bindir) - $(INSTALL_PROGRAM) $(STARTER) $(install_bindir) - -include .depend diff --git a/cpp/src/Glacier/Request.cpp b/cpp/src/Glacier/Request.cpp deleted file mode 100644 index 3dd7a552577..00000000000 --- a/cpp/src/Glacier/Request.cpp +++ /dev/null @@ -1,288 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <Glacier/Request.h> - -using namespace std; -using namespace Ice; -using namespace Glacier; - -Glacier::Request::Request(const ObjectPrx& proxy, const vector<Byte>& inParams, const Current& current, - bool forwardContext, const AMI_Object_ice_invokePtr& amiCB) : - _proxy(proxy), - _inParams(inParams), - _current(current), - _forwardContext(forwardContext), - _amiCB(amiCB) -{ - Context::const_iterator p = current.ctx.find("_ovrd"); - if(p != current.ctx.end()) - { - _override = p->second; - } -} - -void -Glacier::Request::invoke() -{ - - if(_proxy->ice_isTwoway()) - { - assert(_amiCB); - try - { - if(_forwardContext) - { - _proxy->ice_invoke_async(_amiCB, _current.operation, _current.mode, _inParams, _current.ctx); - } - else - { - _proxy->ice_invoke_async(_amiCB, _current.operation, _current.mode, _inParams); - } - } - catch(const Ice::Exception& ex) - { - _amiCB->ice_exception(ex); - } - } - else - { - vector<Byte> dummy; - if(_forwardContext) - { - _proxy->ice_invoke(_current.operation, _current.mode, _inParams, dummy, _current.ctx); - } - else - { - _proxy->ice_invoke(_current.operation, _current.mode, _inParams, dummy); - } - } -} - -bool -Glacier::Request::override(const RequestPtr& other) -{ - if(_override.empty() || other->_override.empty()) - { - return false; - } - - return _override == other->_override; -} - -const ObjectPrx& -Glacier::Request::getProxy() const -{ - return _proxy; -} - -const Current& -Glacier::Request::getCurrent() const -{ - return _current; -} - -Glacier::RequestQueue::RequestQueue(const Ice::CommunicatorPtr& communicator, int traceLevel, bool reverse, - const IceUtil::Time& sleepTime) : - _communicator(communicator), - _logger(communicator->getLogger()), - _traceLevel(traceLevel), - _reverse(reverse), - _sleepTime(sleepTime), - _destroy(false) -{ -} - -Glacier::RequestQueue::~RequestQueue() -{ - assert(_destroy); - assert(_missives.empty()); - assert(_requests.empty()); - assert(!_communicator); -} - -void -Glacier::RequestQueue::destroy() -{ - IceUtil::Monitor<IceUtil::Mutex>::Lock lock(*this); - - _destroy = true; - _missives.clear(); - _requests.clear(); - _communicator = 0; - - notify(); -} - -void -Glacier::RequestQueue::addMissive(const RequestPtr& missive) -{ - assert(missive); - - IceUtil::Monitor<IceUtil::Mutex>::Lock lock(*this); - - assert(!_destroy); - - for(vector<RequestPtr>::iterator p = _missives.begin(); p != _missives.end(); ++p) - { - if(missive->override(*p)) - { - *p = missive; // Replace old missive if this is an override. - return; - } - } - - _missives.push_back(missive); // No override, add new missive. - - notify(); -} - -void -Glacier::RequestQueue::addRequest(const RequestPtr& request) -{ - assert(request); - - IceUtil::Monitor<IceUtil::Mutex>::Lock lock(*this); - - assert(!_destroy); - - _requests.push_back(request); - - notify(); -} - -void -Glacier::RequestQueue::run() -{ - while(true) - { - CommunicatorPtr communicator; - vector<RequestPtr> requests; - vector<RequestPtr> missives; - - { - IceUtil::Monitor<IceUtil::Mutex>::Lock lock(*this); - - // - // Wait indefinitely if there's no requests or missive to - // send. - // - while(!_destroy && _requests.empty() && _missives.empty()) - { - wait(); - } - - if(_destroy) - { - return; - } - - communicator = _communicator; - requests.swap(_requests); - missives.swap(_missives); - } - - // - // Send requests and missives, flush batch requests, and sleep - // outside the thread synchronization, so that new messages - // can be added while this is being done. - // - - try - { - for(vector<RequestPtr>::const_iterator p = requests.begin(); p != requests.end(); ++p) - { - if(_traceLevel >= 2) - { - const ObjectPrx& proxy = (*p)->getProxy(); - const Current& current = (*p)->getCurrent(); - - Trace out(_logger, "Glacier"); - - if(_reverse) - { - out << "reverse "; - } - out << "routing to:" - << "\nproxy = " << communicator->proxyToString(proxy) - << "\noperation = " << current.operation; - } - - (*p)->invoke(); - } - } - catch(const Ice::Exception& ex) - { - IceUtil::Monitor<IceUtil::Mutex>::Lock lock(*this); - - if(_traceLevel >= 1) - { - Trace out(_logger, "Glacier"); - if(_reverse) - { - out << "reverse "; - } - out << "routing exception:\n" << ex; - } - } - - try - { - for(vector<RequestPtr>::const_iterator p = missives.begin(); p != missives.end(); ++p) - { - if(_traceLevel >= 2) - { - const ObjectPrx& proxy = (*p)->getProxy(); - const Current& current = (*p)->getCurrent(); - - Trace out(_logger, "Glacier"); - - if(_reverse) - { - out << "reverse "; - } - - out << "batch routing to:" - << "\nproxy = " << communicator->proxyToString(proxy) - << "\noperation = " << current.operation; - } - - (*p)->invoke(); - } - - // - // This sends all batched missives. - // - communicator->flushBatchRequests(); - } - catch(const Ice::Exception& ex) - { - IceUtil::Monitor<IceUtil::Mutex>::Lock lock(*this); - - if(_traceLevel >= 1) - { - Trace out(_logger, "Glacier"); - if(_reverse) - { - out << "reverse "; - } - out << "batch routing exception:\n" << ex; - } - } - - // - // In order to avoid flooding, we add a delay, if so - // requested. - // - if(_sleepTime > IceUtil::Time()) - { - IceUtil::ThreadControl::sleep(_sleepTime); - } - } -} diff --git a/cpp/src/Glacier/Request.h b/cpp/src/Glacier/Request.h deleted file mode 100644 index 7eecda78f00..00000000000 --- a/cpp/src/Glacier/Request.h +++ /dev/null @@ -1,76 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#ifndef MISSIVE_H -#define MISSIVE_H - -#include <Ice/Ice.h> -#include <IceUtil/Thread.h> -#include <IceUtil/Monitor.h> - -namespace Glacier -{ - -class Request; -typedef IceUtil::Handle<Request> RequestPtr; - -class Request : virtual public IceUtil::Shared -{ -public: - - Request(const Ice::ObjectPrx&, const std::vector<Ice::Byte>&, const Ice::Current&, bool, - const Ice::AMI_Object_ice_invokePtr& = 0); - - void invoke(); - bool override(const RequestPtr&); - const Ice::ObjectPrx& getProxy() const; - const Ice::Current& getCurrent() const; - -private: - - Ice::ObjectPrx _proxy; - std::vector<Ice::Byte> _inParams; - Ice::Current _current; - bool _forwardContext; - Ice::AMI_Object_ice_invokePtr _amiCB; - std::string _override; -}; - -class RequestQueue; -typedef IceUtil::Handle<RequestQueue> RequestQueuePtr; - -class RequestQueue : public IceUtil::Thread, public IceUtil::Monitor<IceUtil::Mutex> -{ -public: - - RequestQueue(const Ice::CommunicatorPtr&, int, bool, const IceUtil::Time&); - virtual ~RequestQueue(); - - void destroy(); - void addMissive(const RequestPtr&); - void addRequest(const RequestPtr&); - - virtual void run(); - -private: - - Ice::CommunicatorPtr _communicator; - const Ice::LoggerPtr _logger; - const int _traceLevel; - const bool _reverse; - const IceUtil::Time _sleepTime; - - std::vector<RequestPtr> _missives; - std::vector<RequestPtr> _requests; - bool _destroy; -}; - -} - -#endif diff --git a/cpp/src/Glacier/RouterI.cpp b/cpp/src/Glacier/RouterI.cpp deleted file mode 100644 index c9bfbca8111..00000000000 --- a/cpp/src/Glacier/RouterI.cpp +++ /dev/null @@ -1,134 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <Ice/RoutingTable.h> -#include <Glacier/RouterI.h> -#include <Glacier/Session.h> -#include <Glacier/SessionManager.h> - -using namespace std; -using namespace Ice; -using namespace Glacier; - -Glacier::RouterI::RouterI(const ObjectAdapterPtr& clientAdapter, - const ObjectAdapterPtr& serverAdapter, - const ::IceInternal::RoutingTablePtr& routingTable, - const SessionManagerPrx& sessionManager, - const string& userId) : - _clientAdapter(clientAdapter), - _serverAdapter(serverAdapter), - _logger(_clientAdapter->getCommunicator()->getLogger()), - _routingTable(routingTable), - _userId(userId), - _sessionManager(sessionManager) - { - PropertiesPtr properties = _clientAdapter->getCommunicator()->getProperties(); - _routingTableTraceLevel = properties->getPropertyAsInt("Glacier.Router.Trace.RoutingTable"); -} - -Glacier::RouterI::~RouterI() -{ - assert(!_clientAdapter); - assert(!_session); -} - -void -Glacier::RouterI::destroy() -{ - // - // No mutex protection necessary, destroy is only called after all - // object adapters have shut down. - // - _clientAdapter = 0; - _serverAdapter = 0; - _logger = 0; - _routingTable = 0; - - { - IceUtil::Mutex::Lock lock(_sessionMutex); - if(_session) - { - try - { - _session->destroy(); - } - catch(...) - { - // Ignore all exceptions. - } - _session = 0; - } - } -} - -ObjectPrx -Glacier::RouterI::getClientProxy(const Current&) const -{ - assert(_clientAdapter); // Destroyed? - - return _clientAdapter->createProxy(stringToIdentity("dummy")); -} - -ObjectPrx -Glacier::RouterI::getServerProxy(const Current&) const -{ - assert(_clientAdapter); // Destroyed? - - if(_serverAdapter) - { - return _serverAdapter->createProxy(stringToIdentity("dummy")); - } - else - { - return 0; - } -} - -void -Glacier::RouterI::addProxy(const ObjectPrx& proxy, const Current&) -{ - assert(_clientAdapter); // Destroyed? - - if(_routingTableTraceLevel) - { - Trace out(_logger, "Glacier"); - out << "adding proxy to routing table:\n" << _clientAdapter->getCommunicator()->proxyToString(proxy); - } - - _routingTable->add(proxy); -} - -void -Glacier::RouterI::shutdown(const Current&) -{ - assert(_clientAdapter); // Destroyed? - - assert(_routingTable); - _clientAdapter->getCommunicator()->shutdown(); -} - -SessionPrx -Glacier::RouterI::createSession(const Current&) -{ - assert(_clientAdapter); // Destroyed? - - IceUtil::Mutex::Lock lock(_sessionMutex); - - if(!_session) - { - if(!_sessionManager) - { - throw NoSessionManagerException(); - } - - _session = _sessionManager->create(_userId); - } - - return _session; -} diff --git a/cpp/src/Glacier/RouterI.h b/cpp/src/Glacier/RouterI.h deleted file mode 100644 index 5f865cce3af..00000000000 --- a/cpp/src/Glacier/RouterI.h +++ /dev/null @@ -1,55 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#ifndef GLACIER_ROUTER_I_H -#define GLACIER_ROUTER_I_H - -#include <Ice/RoutingTableF.h> -#include <Ice/Ice.h> -#include <Glacier/Router.h> -#include <Glacier/SessionManagerF.h> -#include <Glacier/SessionF.h> - -namespace Glacier -{ - -class RouterI : public Router -{ -public: - - RouterI(const Ice::ObjectAdapterPtr&, const Ice::ObjectAdapterPtr&, const IceInternal::RoutingTablePtr&, - const SessionManagerPrx&, const std::string&); - - virtual ~RouterI(); - - void destroy(); - - virtual Ice::ObjectPrx getClientProxy(const Ice::Current&) const; - virtual Ice::ObjectPrx getServerProxy(const Ice::Current&) const; - virtual void addProxy(const Ice::ObjectPrx&, const Ice::Current&); - virtual void shutdown(const Ice::Current&); - virtual SessionPrx createSession(const Ice::Current&); - -private: - - Ice::ObjectAdapterPtr _clientAdapter; - Ice::ObjectAdapterPtr _serverAdapter; - Ice::LoggerPtr _logger; - IceInternal::RoutingTablePtr _routingTable; - int _routingTableTraceLevel; - - std::string _userId; - SessionManagerPrx _sessionManager; - SessionPrx _session; - IceUtil::Mutex _sessionMutex; -}; - -} - -#endif diff --git a/cpp/src/Glacier/ServerBlobject.cpp b/cpp/src/Glacier/ServerBlobject.cpp deleted file mode 100644 index 09cd4044a06..00000000000 --- a/cpp/src/Glacier/ServerBlobject.cpp +++ /dev/null @@ -1,44 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <Ice/RoutingTable.h> -#include <Glacier/ServerBlobject.h> - -using namespace std; -using namespace Ice; -using namespace Glacier; - -Glacier::ServerBlobject::ServerBlobject(const ObjectAdapterPtr& clientAdapter) : - Glacier::Blobject(clientAdapter->getCommunicator(), true), - _clientAdapter(clientAdapter) -{ -} - -void -Glacier::ServerBlobject::destroy() -{ - // - // No mutex protection necessary, destroy is only called after all - // object adapters have shut down. - // - _clientAdapter = 0; - Blobject::destroy(); -} - -void -Glacier::ServerBlobject::ice_invoke_async(const Ice::AMD_Object_ice_invokePtr& amdCB, const vector<Byte>& inParams, - const Current& current) -{ - assert(_clientAdapter); // Destroyed? - - ObjectPrx proxy = _clientAdapter->createReverseProxy(current.id); - assert(proxy); - - invoke(proxy, amdCB, inParams, current); -} diff --git a/cpp/src/Glacier/ServerBlobject.h b/cpp/src/Glacier/ServerBlobject.h deleted file mode 100644 index fbab7ad0d79..00000000000 --- a/cpp/src/Glacier/ServerBlobject.h +++ /dev/null @@ -1,36 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#ifndef SERVER_BLOBJECT_H -#define SERVER_BLOBJECT_H - -#include <Glacier/Blobject.h> - -namespace Glacier -{ - -class ServerBlobject : public Glacier::Blobject -{ -public: - - ServerBlobject(const Ice::ObjectAdapterPtr&); - - virtual void destroy(); - - virtual void ice_invoke_async(const Ice::AMD_Object_ice_invokePtr&, const std::vector<Ice::Byte>&, - const Ice::Current&); - -private: - - Ice::ObjectAdapterPtr _clientAdapter; -}; - -} - -#endif diff --git a/cpp/src/Glacier/StarterI.cpp b/cpp/src/Glacier/StarterI.cpp deleted file mode 100644 index 32ebf9e20d8..00000000000 --- a/cpp/src/Glacier/StarterI.cpp +++ /dev/null @@ -1,787 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <IceUtil/UUID.h> -#include <IceSSL/RSAKeyPair.h> -#include <Glacier/StarterI.h> -#include <Ice/SliceChecksums.h> -#ifndef _WIN32 -# include <fcntl.h> -#endif - -using namespace std; -using namespace Ice; -using namespace Glacier; - -using IceSSL::RSAKeyPairPtr; - -Glacier::StarterI::StarterI(const CommunicatorPtr& communicator, const PermissionsVerifierPrx& verifier) : - _communicator(communicator), - _logger(_communicator->getLogger()), - _properties(_communicator->getProperties()), - _verifier(verifier) -{ - assert(_verifier); - - _traceLevel = _properties->getPropertyAsInt("Glacier.Starter.Trace"); - - // Set up the Certificate Generation context - string country = _properties->getPropertyWithDefault("Glacier.Starter.Certificate.Country", "US"); - string stateProv = _properties->getPropertyWithDefault("Glacier.Starter.Certificate.StateProvince", "DC"); - string locality = _properties->getPropertyWithDefault("Glacier.Starter.Certificate.Locality", "Washington"); - string org = _properties->getPropertyWithDefault("Glacier.Starter.Certificate.Organization", "Some Company Inc."); - string orgUnit = _properties->getPropertyWithDefault("Glacier.Starter.Certificate.OranizationalUnit", "Sales"); - string commonName = _properties->getPropertyWithDefault("Glacier.Starter.Certificate.CommonName", "John Doe"); - - Int bitStrength = _properties->getPropertyAsIntWithDefault( - "Glacier.Starter.Certificate.BitStrength", 1024); - Int secondsValid = _properties->getPropertyAsIntWithDefault( - "Glacier.Starter.Certificate.SecondsValid", - static_cast<Int>(IceSSL::RSACertificateGenContext::daysToSeconds(1))); - Int issuedAdjust = _properties->getPropertyAsIntWithDefault("Glacier.Starter.Certificate.IssuedAdjust", 0); - - _certContext.setCountry(country); - _certContext.setStateProvince(stateProv); - _certContext.setLocality(locality); - _certContext.setOrganization(org); - _certContext.setOrgainizationalUnit(orgUnit); - _certContext.setCommonName(commonName); - _certContext.setBitStrength(bitStrength); - _certContext.setSecondsValid(secondsValid); - _certContext.setSecondsValid(issuedAdjust); -} - -static bool -prefixOK(const string& property) -{ - if(property.find("--Ice.") == 0) - { - return false; - } - if(property.find("--IceSSL.") == 0) - { - return false; - } - if(property.find("--Glacier.Router") == 0) - { - return false; - } - - return true; -} - -void -Glacier::StarterI::destroy() -{ - // - // No mutex protection necessary, destroy is only called after all - // object adapters have shut down. - // - _communicator = 0; - _logger = 0; - _properties = 0; -} - -Glacier::RouterPrx -Glacier::StarterI::startRouter(const string& userId, const string& password, ByteSeq& privateKey, ByteSeq& publicKey, - ByteSeq& routerCert, const Current&) -{ - assert(_communicator); // Destroyed? - - string reason; - if(!_verifier->checkPermissions(userId, password, reason)) - { - PermissionDeniedException ex; - ex.reason = reason; - throw ex; - } - - bool sslConfigured = !_properties->getProperty("IceSSL.Server.Config").empty(); - - // - // routerPrivateKeyBase64 and routerCertificateBase64 are passed to the - // router as the values for the properties - // * IceSSL.Server.Overrides.Server.RSA.PrivateKey - // * IceSSL.Server.Overrides.Server.RSA.Certificate - // respectively. - // - // If the router is to act as a client to the Client as well, then - // these values should also be passed into the router as the properties - // * IceSSL.Client.Overrides.RSA.PrivateKey - // * IceSSL.Client.Overrides.RSA.Certificate - // respectively. - // - // The value of clientCertificateBase64 should be passed in to the router - // in the property - // * Glacier.Router.AcceptCert - // - string routerPrivateKeyBase64; - string routerCertificateBase64; - string clientCertificateBase64; - - if(sslConfigured) - { - // - // Create a certificate for the client and the router. - // - RSAKeyPairPtr clientKeyPair = _certificateGenerator.generate(_certContext); - RSAKeyPairPtr routerKeyPair = _certificateGenerator.generate(_certContext); - - clientKeyPair->keyToByteSeq(privateKey); - clientKeyPair->certToByteSeq(publicKey); - routerKeyPair->certToByteSeq(routerCert); - - routerKeyPair->keyToBase64(routerPrivateKeyBase64); - routerKeyPair->certToBase64(routerCertificateBase64); - clientKeyPair->certToBase64(clientCertificateBase64); - } - - string path = _properties->getPropertyWithDefault("Glacier.Starter.RouterPath", "glacierrouter"); - string uuid = IceUtil::generateUUID(); - -#ifdef _WIN32 - // - // Get the absolute pathname of the executable. - // - char absbuf[_MAX_PATH]; - char* filePart; - if(SearchPath(NULL, path.c_str(), ".exe", _MAX_PATH, absbuf, &filePart) == 0) - { - CannotStartRouterException ex; - ex.reason = "cannot convert `" + path + "' into an absolute path"; - throw ex; - } - path = absbuf; - - // - // Create a named pipe that allows the router to send its proxy to the starter. - // We use the UUID as the pipe name. - // - HANDLE pipe = NULL; - HANDLE event = NULL; - try - { - // - // An event object is necessary for using overlapped I/O, which we need - // in order to have a timeout for router startup. - // - event = CreateEvent(NULL, TRUE, FALSE, NULL); - if(event == NULL) - { - SyscallException ex(__FILE__, __LINE__); - ex.error = getSystemErrno(); - throw ex; - } - - // - // Windows 9x/ME does not allow colons in a pipe name, so we ensure - // our UUID does not have any. - // - string pipeName = "\\\\.\\pipe\\" + uuid; - string::size_type pos; - while((pos = pipeName.find(':')) != string::npos) - { - pipeName[pos] = '-'; - } - - pipe = CreateNamedPipe( - pipeName.c_str(), // Name - PIPE_ACCESS_INBOUND | FILE_FLAG_OVERLAPPED, // Read-only, overlapped - PIPE_WAIT | PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE, // Pipe mode - 1, // Instances allowed - 1024, // Output buffer size - 1024, // Input buffer size - NMPWAIT_USE_DEFAULT_WAIT, // Client time out - NULL); // No security attributes - - if(pipe == INVALID_HANDLE_VALUE) - { - SyscallException ex(__FILE__, __LINE__); - ex.error = getSystemErrno(); - throw ex; - } - } - catch(const LocalException& ex) - { - if(event != NULL) - { - CloseHandle(event); - } - - Error out(_logger); - out << ex; - ex.ice_throw(); - } -#else - // - // Setup the pipe between the router and starter. - // - int fds[2]; - try - { - if(pipe(fds) != 0) - { - SyscallException ex(__FILE__, __LINE__); - ex.error = getSystemErrno(); - throw ex; - } - } - catch(const LocalException& ex) - { - Error out(_logger); - out << ex; - ex.ice_throw(); - } -#endif - - // - // Setup arguments to start the router with. - // - StringSeq args = _properties->getCommandLineOptions(); - - // - // Filter all arguments that don't start with "--Ice.", - // "--IceSSL.", or "--Glacier.Router.". - // - args.erase(remove_if(args.begin(), args.end(), prefixOK), args.end()); - - args.push_back("--Glacier.Router.Identity=" + uuid); - - // - // TODO: Potential security risk, command line parameters can - // be seen with `ps'. Keys and certificate should rather be - // passed through a pipe? (ML will take care of this...) - // - if(sslConfigured) - { - args.push_back("--IceSSL.Server.Overrides.RSA.PrivateKey=" + routerPrivateKeyBase64); - args.push_back("--IceSSL.Server.Overrides.RSA.Certificate=" + routerCertificateBase64); - args.push_back("--IceSSL.Client.Overrides.RSA.PrivateKey=" + routerPrivateKeyBase64); - args.push_back("--IceSSL.Client.Overrides.RSA.Certificate=" + routerCertificateBase64); - args.push_back("--Glacier.Router.AcceptCert=" + clientCertificateBase64); - } - - args.push_back("--Glacier.Router.UserId=" + userId); - - int addUserMode = _properties->getPropertyAsIntWithDefault("Glacier.Starter.AddUserToAllowCategories", 0); - if(addUserMode == 1) - { - // Add user id to allowed categories. - args.push_back("--Glacier.Router.AllowCategories=" + - _properties->getProperty("Glacier.Router.AllowCategories") + " " + userId); - } - else if(addUserMode == 2) - { - // Add user id with prepended underscore to allowed categories. - args.push_back("--Glacier.Router.AllowCategories=" + - _properties->getProperty("Glacier.Router.AllowCategories") + " _" + userId); - } - -#ifdef _WIN32 - // - // On Windows, the PrintProxyOnFd property is just a flag to signal that - // the router should write its proxy to the named pipe. - // - args.push_back("--Glacier.Router.PrintProxyOnFd=1"); -#else - ostringstream s; - s << "--Glacier.Router.PrintProxyOnFd=" << fds[1]; - args.push_back(s.str()); -#endif - string override = _properties->getProperty("Glacier.Starter.PropertiesOverride"); - if(!override.empty()) - { - string::size_type end = 0; - while(end != string::npos) - { - const string delim = " \t\r\n"; - - string::size_type beg = override.find_first_not_of(delim, end); - if(beg == string::npos) - { - break; - } - - end = override.find_first_of(delim, beg); - string arg; - if(end == string::npos) - { - arg = override.substr(beg); - } - else - { - arg = override.substr(beg, end - beg); - } - if(arg.find("--") != 0) - { - arg = "--" + arg; - } - args.push_back(arg); - } - } - -#ifdef _WIN32 - // - // Compose command line. - // - string cmd = path; - StringSeq::const_iterator p; - for(p = args.begin(); p != args.end(); ++p) - { - cmd.push_back(' '); - - // - // Enclose arguments containing spaces in double quotes. - // - if((*p).find_first_of(" \t\n\r") != string::npos) - { - cmd.push_back('"'); - cmd.append(*p); - cmd.push_back('"'); - } - else - { - cmd.append(*p); - } - } - - // - // Make a copy of the command line. - // - char* cmdbuf = strdup(cmd.c_str()); - - STARTUPINFO si; - ZeroMemory(&si, sizeof(si)); - si.cb = sizeof(si); - PROCESS_INFORMATION pi; - ZeroMemory(&pi, sizeof(pi)); - - HANDLE router = NULL; - - try - { - BOOL b; - - OVERLAPPED ol; - ZeroMemory(&ol, sizeof(ol)); - ol.hEvent = event; - - // - // "Connect" to named pipe. This operation won't complete until the - // client connects to the pipe with CreateFile(), so we expect - // ConnectNamedPipe() to return false. - // - b = ConnectNamedPipe(pipe, &ol); - if(b || GetLastError() != ERROR_IO_PENDING) - { - CannotStartRouterException ex; - ex.reason = "unexpected result connecting to named pipe"; - throw ex; - } - - if(_traceLevel >= 2) - { - Trace out(_logger, "Glacier"); - out << "creating new router:\n" << cmdbuf; - } - - // - // Start the router. - // - b = CreateProcess( - NULL, // Executable - cmdbuf, // Command line - NULL, // Process attributes - NULL, // Thread attributes - FALSE, // Inherit handles - CREATE_NEW_PROCESS_GROUP, // Process creation flags - NULL, // Process environment - NULL, // Current directory - &si, // Startup info - &pi // Process info - ); - - free(cmdbuf); - - if(!b) - { - SyscallException ex(__FILE__, __LINE__); - ex.error = getSystemErrno(); - throw ex; - } - - // - // Caller is responsible for closing handles in PROCESS_INFORMATION. We don't need to - // keep the thread handle, so we close it now. The process handle will be closed later. - // - CloseHandle(pi.hThread); - router = pi.hProcess; - - // - // Get the startup timeout. - // - DWORD timeout = _properties->getPropertyAsIntWithDefault("Glacier.Starter.StartupTimeout", 10); - if(timeout < 1) - { - timeout = 1; - } - timeout *= 1000; // milliseconds - - // - // Wait for the router to connect to the pipe. - // - while(true) - { - DWORD result = WaitForSingleObject(event, timeout); - if(result == WAIT_OBJECT_0) - { - break; - } - else if(result == WAIT_TIMEOUT) - { - CannotStartRouterException ex; - ex.reason = "timeout while starting `" + path + "'"; - throw ex; - } - else - { - SyscallException ex(__FILE__, __LINE__); - ex.error = getSystemErrno(); - throw ex; - } - } - - // - // Read the output from the child. - // - string output; - while(true) - { - char buff[1024]; - DWORD count; - b = ReadFile(pipe, buff, 1024, &count, NULL); - if(count == 0 || (!b && GetLastError() == ERROR_BROKEN_PIPE)) - { - break; - } - if(!b) - { - SyscallException ex(__FILE__, __LINE__); - ex.error = getSystemErrno(); - throw ex; - } - output.append(buff, 0, count); - } - - if(output.find(uuid) == 0) - { - // - // We got the stringified router proxy. - // - RouterPrx prx = RouterPrx::uncheckedCast(_communicator->stringToProxy(output)); - - if(_traceLevel >= 2) - { - Trace out(_logger, "Glacier"); - out << "started new router:\n" << _communicator->proxyToString(prx); - } - - CloseHandle(router); - CloseHandle(pipe); - CloseHandle(event); - - return prx; - } - else - { - // - // We got something else. - // - CannotStartRouterException ex; - ex.reason = output; - throw ex; - } - } - catch(const Exception& ex) - { - if(router != NULL) - { - CloseHandle(router); - } - CloseHandle(pipe); - CloseHandle(event); - - Error out(_logger); - out << ex; - ex.ice_throw(); - } -#else - // - // Convert to standard argc/argv. - // - int argc = static_cast<int>(args.size()) + 1; - char** argv = static_cast<char**>(malloc((argc + 1) * sizeof(char*))); - StringSeq::iterator p; - int i; - for(p = args.begin(), i = 1; p != args.end(); ++p, ++i) - { - assert(i < argc); - argv[i] = strdup(p->c_str()); - } - assert(i == argc); - argv[0] = strdup(path.c_str()); - argv[argc] = 0; - - // - // Start a router. - // - pid_t pid = -1; // Initialize to keep the compiler happy. - try - { - pid = fork(); - - if(pid == -1) - { - close(fds[0]); - close(fds[1]); - SyscallException ex(__FILE__, __LINE__); - ex.error = getSystemErrno(); - throw ex; - } - } - catch(const LocalException& ex) - { - Error out(_logger); - out << ex; - ex.ice_throw(); - } - - if(pid == 0) // Child process. - { - // - // Until exec, we can only use async-signal safe functions - // - -#ifdef __linux - // - // Create a process group for this child, to be able to send - // a signal to all the thread-processes with killpg - // - setpgrp(); -#endif - - // - // Close all filedescriptors, except for standard input, - // standard output, standard error output, and the write side - // of the newly created pipe. - // - int maxFd = static_cast<int>(sysconf(_SC_OPEN_MAX)); - for(int fd = 3; fd < maxFd; ++fd) - { - if(fd != fds[1]) - { - close(fd); - } - } - - // - // Try to start the router. - // - if(execvp(argv[0], argv) == -1) - { - // - // Send any errors to the parent process, using the write - // end of the pipe. - // - int err = errno; - char msg[500]; - strcpy(msg, "can't execute `"); - strcat(msg, argv[0]); - strcat(msg, "': "); - strcat(msg, strerror(err)); - - write(fds[1], msg, strlen(msg)); - close(fds[1]); - - // - // _exit instead of exit to avoid interferences with - // the parent process. - // - _exit(EXIT_FAILURE); - } - } - else // Parent process. - { - // - // Close the write side of the newly created pipe. - // - close(fds[1]); - - try - { - // - // Wait until data can be read from the newly started router, - // with timeout. - // - int flags = fcntl(fds[0], F_GETFL); - flags |= O_NONBLOCK; - if(fcntl(fds[0], F_SETFL, flags) == -1) - { - SyscallException ex(__FILE__, __LINE__); - ex.error = getSystemErrno(); - throw ex; - } - - repeatSelect: - fd_set fdSet; - FD_ZERO(&fdSet); - FD_SET(fds[0], &fdSet); - struct timeval tv; - tv.tv_sec = _properties->getPropertyAsIntWithDefault("Glacier.Starter.StartupTimeout", 10); - if(tv.tv_sec < 1) - { - tv.tv_sec = 1; // One second is minimum. - } - tv.tv_usec = 0; - int ret = ::select(fds[0] + 1, &fdSet, 0, 0, &tv); - - if(ret == -1) - { - if(errno == EINTR) - { - goto repeatSelect; - } - - SyscallException ex(__FILE__, __LINE__); - ex.error = getSystemErrno(); - throw ex; - } - - if(ret == 0) // Timeout. - { - CannotStartRouterException ex; - ex.reason = "timeout while starting `" + path + "'"; - throw ex; - } - - assert(FD_ISSET(fds[0], &fdSet)); - - // - // Read the response. - // - char buf[4*1024]; - ssize_t sz = read(fds[0], buf, sizeof(buf)/sizeof(char) - 1); - if(sz == -1) - { - SyscallException ex(__FILE__, __LINE__); - ex.error = getSystemErrno(); - throw ex; - } - - if(sz == 0) // EOF? - { - CannotStartRouterException ex; - ex.reason = "got EOF from `" + path + "'"; - throw ex; - } - - buf[sz] = '\0'; // Terminate the string we got back. - - if(strncmp(buf, uuid.c_str(), uuid.length()) == 0) - { - close(fds[0]); - - // - // We got the stringified router proxy. - // - RouterPrx router = RouterPrx::uncheckedCast(_communicator->stringToProxy(buf)); - - if(_traceLevel >= 2) - { - Trace out(_logger, "Glacier"); - out << "started new router:\n" << _communicator->proxyToString(router); - } - - return router; - } - else - { - // - // We got something else. - // - CannotStartRouterException ex; - ex.reason = buf; - throw ex; - } - } - catch(const CannotStartRouterException& ex) - { - close(fds[0]); - - if(_traceLevel >= 1) - { - Trace out(_logger, "Glacier"); - out << "router starter exception:\n" << ex << ":\n" << ex.reason; - } - - ex.ice_throw(); - } - catch(const Exception& ex) - { - close(fds[0]); - - Error out(_logger); - out << ex; - ex.ice_throw(); - } - } -#endif - - assert(false); // Should never be reached. - return 0; // To keep the compiler from complaining. -} - -SliceChecksumDict -Glacier::StarterI::getSliceChecksums(const Current&) const -{ - return sliceChecksums(); -} - -Glacier::CryptPasswordVerifierI::CryptPasswordVerifierI(const map<string, string>& passwords) : - _passwords(passwords) -{ -} - -bool -Glacier::CryptPasswordVerifierI::checkPermissions( - const string& userId, const string& password, string&, const Current&) const -{ - IceUtil::Mutex::Lock sync(*this); - - map<string, string>::const_iterator p = _passwords.find(userId); - - if(p == _passwords.end()) - { - return false; - } - - if(p->second.size() != 13) // Crypt passwords are 13 characters long. - { - return false; - } - - char buff[14]; - string salt = p->second.substr(0, 2); -#if OPENSSL_VERSION_NUMBER >= 0x0090700fL - DES_fcrypt(password.c_str(), salt.c_str(), buff); -#else - des_fcrypt(password.c_str(), salt.c_str(), buff); -#endif - return p->second == buff; -} diff --git a/cpp/src/Glacier/StarterI.h b/cpp/src/Glacier/StarterI.h deleted file mode 100644 index 9a861bc657f..00000000000 --- a/cpp/src/Glacier/StarterI.h +++ /dev/null @@ -1,68 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#ifndef GLACIER_STARTER_I_H -#define GLACIER_STARTER_I_H - -#include <Ice/Ice.h> -#include <IceSSL/RSACertificateGen.h> -#include <Glacier/Starter.h> - -namespace Glacier -{ - -using IceSSL::RSACertificateGenContext; -using IceSSL::RSACertificateGen; - -class StarterI : public Starter -{ -public: - - StarterI(const Ice::CommunicatorPtr&, const PermissionsVerifierPrx&); - - void destroy(); - - RouterPrx startRouter(const std::string&, - const std::string&, - Ice::ByteSeq&, - Ice::ByteSeq&, - Ice::ByteSeq&, - const Ice::Current&); - - virtual Ice::SliceChecksumDict getSliceChecksums(const Ice::Current&) const; - -private: - - Ice::CommunicatorPtr _communicator; - Ice::LoggerPtr _logger; - Ice::PropertiesPtr _properties; - PermissionsVerifierPrx _verifier; - int _traceLevel; - RSACertificateGenContext _certContext; - RSACertificateGen _certificateGenerator; -}; - -typedef IceUtil::Handle<StarterI> StarterIPtr; - -class CryptPasswordVerifierI : public PermissionsVerifier, public IceUtil::Mutex -{ -public: - - CryptPasswordVerifierI(const std::map<std::string, std::string>&); - - virtual bool checkPermissions(const std::string&, const std::string&, std::string&, const Ice::Current&) const; - -private: - - const std::map<std::string, std::string> _passwords; -}; - -} - -#endif diff --git a/cpp/src/Glacier/glacier.dsp b/cpp/src/Glacier/glacier.dsp deleted file mode 100644 index 41fe365d7c4..00000000000 --- a/cpp/src/Glacier/glacier.dsp +++ /dev/null @@ -1,395 +0,0 @@ -# Microsoft Developer Studio Project File - Name="glacier" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=glacier - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "glacier.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "glacier.mak" CFG="Glacier - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "glacier - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "glacier - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "glacier - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBRARY_EXPORTS" /Yu"stdafx.h" /FD /c
-# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I ".." /I "../../include" /D "NDEBUG" /D "_USRDLL" /D "GLACIER_API_EXPORTS" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /Fr /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 /nologo /dll /machine:I386 /out:"Release/glacier20.dll" /implib:"Release/glacier.lib"
-# SUBTRACT LINK32 /pdb:none /debug /nodefaultlib
-# Begin Special Build Tool
-OutDir=.\Release
-SOURCE="$(InputPath)"
-PostBuild_Cmds=copy $(OutDir)\glacier.lib ..\..\lib copy $(OutDir)\glacier20.dll ..\..\bin
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "glacier - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBRARY_EXPORTS" /Yu"stdafx.h" /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /WX /Gm /GR /GX /Zi /Od /I ".." /I "../../include" /D "_DEBUG" /D "_USRDLL" /D "GLACIER_API_EXPORTS" /D "_CONSOLE" /FD /GZ /c
-# SUBTRACT CPP /Fr /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386
-# ADD LINK32 /nologo /dll /debug /machine:I386 /out:"Debug/glacier20d.dll" /implib:"Debug/glacierd.lib"
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-# Begin Special Build Tool
-OutDir=.\Debug
-SOURCE="$(InputPath)"
-PostBuild_Cmds=copy $(OutDir)\glacierd.lib ..\..\lib copy $(OutDir)\glacier20d.pdb ..\..\bin copy $(OutDir)\glacier20d.dll ..\..\bin
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "glacier - Win32 Release"
-# Name "glacier - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\Router.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Session.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\SessionManager.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Starter.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\include\glacier\Router.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\include\glacier\Session.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\include\glacier\SessionF.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\include\glacier\SessionManager.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\include\glacier\SessionManagerF.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\include\glacier\Starter.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=..\..\slice\glacier\Router.ice
-
-!IF "$(CFG)" == "glacier - Win32 Release"
-
-USERDEP__ROUTE="..\..\bin\slice2cpp.exe" "..\..\lib\slice.lib"
-# Begin Custom Build
-InputPath=..\..\slice\glacier\Router.ice
-
-BuildCmds= \
- ..\..\bin\slice2cpp.exe --checksum --dll-export GLACIER_API --include-dir Glacier -I../../slice ../../slice/Glacier/Router.ice \
- move Router.h ..\..\include\glacier \
-
-
-"..\..\include\glacier\Router.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"Router.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "glacier - Win32 Debug"
-
-USERDEP__ROUTE="..\..\bin\slice2cpp.exe" "..\..\lib\sliced.lib"
-# Begin Custom Build
-InputPath=..\..\slice\glacier\Router.ice
-
-BuildCmds= \
- ..\..\bin\slice2cpp.exe --checksum --dll-export GLACIER_API --include-dir Glacier -I../../slice ../../slice/Glacier/Router.ice \
- move Router.h ..\..\include\glacier \
-
-
-"..\..\include\glacier\Router.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"Router.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\slice\glacier\Session.ice
-
-!IF "$(CFG)" == "glacier - Win32 Release"
-
-USERDEP__SESSI="..\..\bin\slice2cpp.exe" "..\..\lib\slice.lib"
-# Begin Custom Build
-InputPath=..\..\slice\glacier\Session.ice
-
-BuildCmds= \
- ..\..\bin\slice2cpp.exe --checksum --dll-export GLACIER_API --include-dir Glacier -I../../slice ../../slice/Glacier/Session.ice \
- move Session.h ..\..\include\glacier \
-
-
-"..\..\include\glacier\Session.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"Session.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "glacier - Win32 Debug"
-
-USERDEP__SESSI="..\..\bin\slice2cpp.exe" "..\..\lib\sliced.lib"
-# Begin Custom Build
-InputPath=..\..\slice\glacier\Session.ice
-
-BuildCmds= \
- ..\..\bin\slice2cpp.exe --checksum --dll-export GLACIER_API --include-dir Glacier -I../../slice ../../slice/Glacier/Session.ice \
- move Session.h ..\..\include\glacier \
-
-
-"..\..\include\glacier\Session.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"Session.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\slice\glacier\SessionF.ice
-
-!IF "$(CFG)" == "glacier - Win32 Release"
-
-USERDEP__SESSIO="..\..\bin\slice2cpp.exe" "..\..\lib\slice.lib"
-# Begin Custom Build
-InputPath=..\..\slice\glacier\SessionF.ice
-
-"..\..\include\glacier\SessionF.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ..\..\bin\slice2cpp.exe --checksum --dll-export GLACIER_API --include-dir Glacier -I../../slice ../../slice/Glacier/SessionF.ice
- move SessionF.h ..\..\include\glacier
- del SessionF.cpp
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "glacier - Win32 Debug"
-
-USERDEP__SESSIO="..\..\bin\slice2cpp.exe" "..\..\lib\sliced.lib"
-# Begin Custom Build
-InputPath=..\..\slice\glacier\SessionF.ice
-
-"..\..\include\glacier\SessionF.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ..\..\bin\slice2cpp.exe --checksum --dll-export GLACIER_API --include-dir Glacier -I../../slice ../../slice/Glacier/SessionF.ice
- move SessionF.h ..\..\include\glacier
- del SessionF.cpp
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\slice\glacier\SessionManager.ice
-
-!IF "$(CFG)" == "glacier - Win32 Release"
-
-USERDEP__SESSION="..\..\bin\slice2cpp.exe" "..\..\lib\slice.lib"
-# Begin Custom Build
-InputPath=..\..\slice\glacier\SessionManager.ice
-
-BuildCmds= \
- ..\..\bin\slice2cpp.exe --checksum --dll-export GLACIER_API --include-dir Glacier -I../../slice ../../slice/Glacier/SessionManager.ice \
- move SessionManager.h ..\..\include\glacier \
-
-
-"..\..\include\glacier\SessionManager.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"SessionManager.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "glacier - Win32 Debug"
-
-USERDEP__SESSION="..\..\bin\slice2cpp.exe" "..\..\lib\sliced.lib"
-# Begin Custom Build
-InputPath=..\..\slice\glacier\SessionManager.ice
-
-BuildCmds= \
- ..\..\bin\slice2cpp.exe --checksum --dll-export GLACIER_API --include-dir Glacier -I../../slice ../../slice/Glacier/SessionManager.ice \
- move SessionManager.h ..\..\include\glacier \
-
-
-"..\..\include\glacier\SessionManager.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"SessionManager.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\slice\glacier\SessionManagerF.ice
-
-!IF "$(CFG)" == "glacier - Win32 Release"
-
-USERDEP__SESSIONM="..\..\bin\slice2cpp.exe" "..\..\lib\slice.lib"
-# Begin Custom Build
-InputPath=..\..\slice\glacier\SessionManagerF.ice
-
-"..\..\include\glacier\SessionManagerF.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ..\..\bin\slice2cpp.exe --checksum --dll-export GLACIER_API --include-dir Glacier -I../../slice ../../slice/Glacier/SessionManagerF.ice
- move SessionManagerF.h ..\..\include\glacier
- del SessionManagerF.cpp
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "glacier - Win32 Debug"
-
-USERDEP__SESSIONM="..\..\bin\slice2cpp.exe" "..\..\lib\sliced.lib"
-# Begin Custom Build
-InputPath=..\..\slice\glacier\SessionManagerF.ice
-
-"..\..\include\glacier\SessionManagerF.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ..\..\bin\slice2cpp.exe --checksum --dll-export GLACIER_API --include-dir Glacier -I../../slice ../../slice/Glacier/SessionManagerF.ice
- move SessionManagerF.h ..\..\include\glacier
- del SessionManagerF.cpp
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\slice\glacier\Starter.ice
-
-!IF "$(CFG)" == "glacier - Win32 Release"
-
-USERDEP__START="..\..\bin\slice2cpp.exe" "..\..\lib\slice.lib"
-# Begin Custom Build
-InputPath=..\..\slice\glacier\Starter.ice
-
-BuildCmds= \
- ..\..\bin\slice2cpp.exe --checksum --dll-export GLACIER_API --include-dir Glacier -I../../slice ../../slice/Glacier/Starter.ice \
- move Starter.h ..\..\include\glacier \
-
-
-"..\..\include\glacier\Starter.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"Starter.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "glacier - Win32 Debug"
-
-USERDEP__START="..\..\bin\slice2cpp.exe" "..\..\lib\sliced.lib"
-# Begin Custom Build
-InputPath=..\..\slice\glacier\Starter.ice
-
-BuildCmds= \
- ..\..\bin\slice2cpp.exe --checksum --dll-export GLACIER_API --include-dir Glacier -I../../slice ../../slice/Glacier/Starter.ice \
- move Starter.h ..\..\include\glacier \
-
-
-"..\..\include\glacier\Starter.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"Starter.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/cpp/src/Glacier/glacierrouter.dsp b/cpp/src/Glacier/glacierrouter.dsp deleted file mode 100644 index d214b1db540..00000000000 --- a/cpp/src/Glacier/glacierrouter.dsp +++ /dev/null @@ -1,158 +0,0 @@ -# Microsoft Developer Studio Project File - Name="glacierrouter" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=glacierrouter - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "glacierrouter.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "glacierrouter.mak" CFG="GlacierRouter - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "glacierrouter - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "glacierrouter - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "glacierrouter - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I ".." /I "../../include" /D "NDEBUG" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /Fr /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 libeay32.lib ssleay32.lib /nologo /subsystem:console /machine:I386
-# SUBTRACT LINK32 /nodefaultlib
-# Begin Special Build Tool
-OutDir=.\Release
-TargetName=glacierrouter
-SOURCE="$(InputPath)"
-PostBuild_Cmds=copy $(OutDir)\$(TargetName).exe ..\..\bin
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "glacierrouter - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /WX /Gm /GR /GX /Zi /Od /I ".." /I "../../include" /D "_DEBUG" /D "_CONSOLE" /FD /GZ /c
-# SUBTRACT CPP /Fr /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 libeay32.lib ssleay32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# SUBTRACT LINK32 /nodefaultlib
-# Begin Special Build Tool
-OutDir=.\Debug
-TargetName=glacierrouter
-SOURCE="$(InputPath)"
-PostBuild_Cmds=copy $(OutDir)\$(TargetName).exe ..\..\bin
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "glacierrouter - Win32 Release"
-# Name "glacierrouter - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\Blobject.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\ClientBlobject.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\glacierrouter.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Request.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\RouterI.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\ServerBlobject.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\Blobject.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ClientBlobject.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Request.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\RouterI.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ServerBlobject.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/cpp/src/Glacier/glacierstarter.dsp b/cpp/src/Glacier/glacierstarter.dsp deleted file mode 100644 index fa50119a6ee..00000000000 --- a/cpp/src/Glacier/glacierstarter.dsp +++ /dev/null @@ -1,126 +0,0 @@ -# Microsoft Developer Studio Project File - Name="glacierstarter" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=glacierstarter - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "glacierstarter.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "glacierstarter.mak" CFG="GlacierStarter - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "glacierstarter - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "glacierstarter - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "glacierstarter - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I ".." /I "../../include" /D "NDEBUG" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /Fr /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 libeay32.lib ssleay32.lib /nologo /subsystem:console /machine:I386
-# SUBTRACT LINK32 /nodefaultlib
-# Begin Special Build Tool
-OutDir=.\Release
-TargetName=glacierstarter
-SOURCE="$(InputPath)"
-PostBuild_Cmds=copy $(OutDir)\$(TargetName).exe ..\..\bin
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "glacierstarter - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /WX /Gm /GR /GX /Zi /Od /I ".." /I "../../include" /D "_DEBUG" /D "_CONSOLE" /FD /GZ /c
-# SUBTRACT CPP /Fr /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 libeay32.lib ssleay32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# SUBTRACT LINK32 /nodefaultlib
-# Begin Special Build Tool
-OutDir=.\Debug
-TargetName=glacierstarter
-SOURCE="$(InputPath)"
-PostBuild_Cmds=copy $(OutDir)\$(TargetName).exe ..\..\bin
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "glacierstarter - Win32 Release"
-# Name "glacierstarter - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\glacierstarter.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\StarterI.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\StarterI.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/cpp/src/Makefile b/cpp/src/Makefile index 79e0186d109..f2a5d43a0de 100644 --- a/cpp/src/Makefile +++ b/cpp/src/Makefile @@ -30,7 +30,6 @@ SUBDIRS = IceUtil \ IceBox \ IceStorm \ IcePack \ - Glacier \ Glacier2 \ IcePatch2 diff --git a/cpp/test/Glacier/Makefile b/cpp/test/Glacier/Makefile deleted file mode 100644 index dc14bc827f0..00000000000 --- a/cpp/test/Glacier/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# ********************************************************************** -# -# Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -# -# This copy of Ice is licensed to you under the terms described in the -# ICE_LICENSE file included in this distribution. -# -# ********************************************************************** - -top_srcdir = ../.. - -include $(top_srcdir)/config/Make.rules - -SUBDIRS = starter - -$(EVERYTHING):: - @for subdir in $(SUBDIRS); \ - do \ - echo "making $@ in $$subdir"; \ - ( cd $$subdir && $(MAKE) $@ ) || exit 1; \ - done diff --git a/cpp/test/Glacier/starter/Callback.ice b/cpp/test/Glacier/starter/Callback.ice deleted file mode 100644 index 206830d1d39..00000000000 --- a/cpp/test/Glacier/starter/Callback.ice +++ /dev/null @@ -1,42 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#ifndef CALLBACK_ICE -#define CALLBACK_ICE - -module Test -{ - -exception CallbackException -{ - double someValue; - string someString; -}; - -interface CallbackReceiver -{ - void callback(); - - void callbackEx() - throws CallbackException; -}; - -interface Callback -{ - void initiateCallback(CallbackReceiver* proxy); - - void initiateCallbackEx(CallbackReceiver* proxy) - throws CallbackException; - - void shutdown(); -}; - -}; - -#endif diff --git a/cpp/test/Glacier/starter/CallbackI.cpp b/cpp/test/Glacier/starter/CallbackI.cpp deleted file mode 100644 index 2d418c5bdee..00000000000 --- a/cpp/test/Glacier/starter/CallbackI.cpp +++ /dev/null @@ -1,78 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <Ice/Ice.h> -#include <CallbackI.h> - -using namespace std; -using namespace Ice; -using namespace Test; - -CallbackReceiverI::CallbackReceiverI() : - _callback(false) -{ -} - -void -CallbackReceiverI::callback(const Current&) -{ - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - assert(!_callback); - _callback = true; - notify(); -} - -void -CallbackReceiverI::callbackEx(const Current& current) -{ - callback(current); - CallbackException ex; - ex.someValue = 3.14; - ex.someString = "3.14"; - throw ex; -} - -bool -CallbackReceiverI::callbackOK() -{ - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - - while(!_callback) - { - if(!timedWait(IceUtil::Time::milliSeconds(5000))) - { - return false; - } - } - - _callback = false; - return true; -} - -CallbackI::CallbackI() -{ -} - -void -CallbackI::initiateCallback(const CallbackReceiverPrx& proxy, const Current& current) -{ - proxy->callback(current.ctx); -} - -void -CallbackI::initiateCallbackEx(const CallbackReceiverPrx& proxy, const Current& current) -{ - proxy->callbackEx(current.ctx); -} - -void -CallbackI::shutdown(const Ice::Current& current) -{ - current.adapter->getCommunicator()->shutdown(); -} diff --git a/cpp/test/Glacier/starter/CallbackI.h b/cpp/test/Glacier/starter/CallbackI.h deleted file mode 100644 index a452c22b6a5..00000000000 --- a/cpp/test/Glacier/starter/CallbackI.h +++ /dev/null @@ -1,43 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#ifndef CALLBACK_I_H -#define CALLBACK_I_H - -#include <IceUtil/Mutex.h> -#include <IceUtil/Monitor.h> -#include <Callback.h> - -class CallbackReceiverI : public ::Test::CallbackReceiver, IceUtil::Monitor<IceUtil::Mutex> -{ -public: - - CallbackReceiverI(); - - virtual void callback(const Ice::Current&); - virtual void callbackEx(const Ice::Current&); - bool callbackOK(); - -private: - - bool _callback; -}; - -class CallbackI : public ::Test::Callback -{ -public: - - CallbackI(); - - virtual void initiateCallback(const ::Test::CallbackReceiverPrx&, const Ice::Current&); - virtual void initiateCallbackEx(const ::Test::CallbackReceiverPrx&, const Ice::Current&); - virtual void shutdown(const Ice::Current&); -}; - -#endif diff --git a/cpp/test/Glacier/starter/Client.cpp b/cpp/test/Glacier/starter/Client.cpp deleted file mode 100644 index 3dc8dd72744..00000000000 --- a/cpp/test/Glacier/starter/Client.cpp +++ /dev/null @@ -1,212 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <Ice/Application.h> -#include <Glacier/Glacier.h> -#include <TestCommon.h> -#include <CallbackI.h> -#include <IceUtil/Base64.h> -#include <IceSSL/Plugin.h> - -using namespace std; -using namespace Ice; -using namespace Test; - -class CallbackClient : public Application -{ -public: - - virtual int run(int, char*[]); -}; - -int -main(int argc, char* argv[]) -{ - CallbackClient app; - return app.main(argc, argv); -} - -int -CallbackClient::run(int argc, char* argv[]) -{ - string ref; - - communicator()->getProperties()->setProperty("CallbackReceiverAdapter.Endpoints", "default"); - ObjectAdapterPtr adapter = communicator()->createObjectAdapter("CallbackReceiverAdapter"); - adapter->activate(); - // Put the print statement after activate(), so that if - // Ice.PrintAdapterReady is set, the "ready" is the first output - // from the client, and not the print statement below. Otherwise - // the Python test scripts will be confused, as they expect the - // "ready" from the Object Adapter to be the first thing that is - // printed. - cout << "creating and activating callback receiver adapter... " << flush; - cout << "ok" << endl; - - cout << "creating and adding callback receiver object... " << flush; - CallbackReceiverI* callbackReceiverImpl = new CallbackReceiverI; - ObjectPtr callbackReceiver = callbackReceiverImpl; - adapter->add(callbackReceiver, stringToIdentity("callbackReceiver")); - cout << "ok" << endl; - - cout << "testing stringToProxy for glacier starter... " << flush; - ref = "Glacier/starter:default -p 12346 -t 30000"; - ObjectPrx starterBase = communicator()->stringToProxy(ref); - cout << "ok" << endl; - - cout << "testing checked cast for glacier starter... " << flush; - Glacier::StarterPrx starter = Glacier::StarterPrx::checkedCast(starterBase); - test(starter); - cout << "ok" << endl; - - ByteSeq privateKey; - ByteSeq publicKey; - ByteSeq routerCert; - - cout << "starting up glacier router... " << flush; - Glacier::RouterPrx router; - try - { - router = starter->startRouter("dummy", "abc123", privateKey, publicKey, routerCert); - } - catch(const Glacier::CannotStartRouterException& ex) - { - cerr << appName() << ": " << ex << ":\n" << ex.reason << endl; - return EXIT_FAILURE; - } - catch(const Glacier::PermissionDeniedException& ex) - { - cerr << appName() << ": " << ex << endl; - return EXIT_FAILURE; - } - - PropertiesPtr properties = communicator()->getProperties(); - - string clientConfig = properties->getProperty("IceSSL.Client.Config"); - string serverConfig = properties->getProperty("IceSSL.Server.Config"); - - if(!clientConfig.empty() && !serverConfig.empty()) - { - string privateKeyBase64 = IceUtil::Base64::encode(privateKey); - string publicKeyBase64 = IceUtil::Base64::encode(publicKey); - string routerCertString = IceUtil::Base64::encode(routerCert); - - // - // Get the SSL plugin. - // - PluginManagerPtr pluginManager = communicator()->getPluginManager(); - PluginPtr plugin = pluginManager->getPlugin("IceSSL"); - IceSSL::PluginPtr sslPlugin = IceSSL::PluginPtr::dynamicCast(plugin); - assert(sslPlugin); - - // Configure Server, client is already configured. - sslPlugin->configure(IceSSL::Server); - sslPlugin->setCertificateVerifier(IceSSL::ClientServer, sslPlugin->getSingleCertVerifier(routerCert)); - - // Set the keys overrides. - sslPlugin->setRSAKeysBase64(IceSSL::ClientServer, privateKeyBase64, publicKeyBase64); - sslPlugin->addTrustedCertificateBase64(IceSSL::ClientServer, routerCertString); - } - - test(router); - cout << "ok" << endl; - - cout << "pinging glacier router... " << flush; - router->ice_ping(); - cout << "ok" << endl; - - cout << "installing glacier router... " << flush; - communicator()->setDefaultRouter(router); - adapter->addRouter(router); - cout << "ok" << endl; - - cout << "testing stringToProxy... " << flush; - ref = "callback:tcp -p 12345 -t 10000"; - ObjectPrx base = communicator()->stringToProxy(ref); - cout << "ok" << endl; - - cout << "testing checked cast... " << flush; - CallbackPrx twoway = CallbackPrx::checkedCast(base->ice_twoway()->ice_timeout(-1)->ice_secure(false)); - test(twoway); - cout << "ok" << endl; - - CallbackReceiverPrx twowayR = CallbackReceiverPrx::uncheckedCast( - adapter->createProxy(stringToIdentity("callbackReceiver"))); - - { - cout << "testing oneway callback... " << flush; - CallbackPrx oneway = CallbackPrx::uncheckedCast(twoway->ice_oneway()); - CallbackReceiverPrx onewayR = CallbackReceiverPrx::uncheckedCast(twowayR->ice_oneway()); - Context context; - context["_fwd"] = "o"; - oneway->initiateCallback(onewayR, context); - test(callbackReceiverImpl->callbackOK()); - cout << "ok" << endl; - } - - { - cout << "testing twoway callback... " << flush; - Context context; - context["_fwd"] = "t"; - twoway->initiateCallback(twowayR, context); - test(callbackReceiverImpl->callbackOK()); - cout << "ok" << endl; - } - - { - cout << "ditto, but with user exception... " << flush; - Context context; - context["_fwd"] = "t"; - try - { - twoway->initiateCallbackEx(twowayR, context); - test(false); - } - catch(const CallbackException& ex) - { - test(ex.someValue == 3.14); - test(ex.someString == "3.14"); - } - test(callbackReceiverImpl->callbackOK()); - cout << "ok" << endl; - } - - cout << "testing server shutdown... " << flush; - twoway->shutdown(); - // No ping, otherwise the glacier router prints a warning message - // if it's started with --Ice.Warn.Connections. - cout << "ok" << endl; - /* - try - { - twoway->ice_ping(); - test(false); - } - // If we use the glacier router, the exact exception reason gets - // lost. - catch(const UnknownLocalException&) - { - cout << "ok" << endl; - } - */ - - cout << "shutting down glacier router... " << flush; - router->shutdown(); - try - { - router->ice_ping(); - test(false); - } - catch(const LocalException&) - { - cout << "ok" << endl; - } - - return EXIT_SUCCESS; -} diff --git a/cpp/test/Glacier/starter/Makefile b/cpp/test/Glacier/starter/Makefile deleted file mode 100644 index e1b857ab170..00000000000 --- a/cpp/test/Glacier/starter/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# ********************************************************************** -# -# Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -# -# This copy of Ice is licensed to you under the terms described in the -# ICE_LICENSE file included in this distribution. -# -# ********************************************************************** - -top_srcdir = ../../.. - -CLIENT = client -SERVER = server - -TARGETS = $(CLIENT) $(SERVER) - -OBJS = Callback.o \ - CallbackI.o - -COBJS = Client.o - -SOBJS = Server.o - -SRCS = $(OBJS:.o=.cpp) \ - $(COBJS:.o=.cpp) \ - $(SOBJS:.o=.cpp) - -SLICE_SRCS = Callback.ice - -include $(top_srcdir)/config/Make.rules - -CPPFLAGS := -I. -I../../include $(CPPFLAGS) - -$(CLIENT): $(OBJS) $(COBJS) - rm -f $@ - $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) -lGlacier -lIceSSL $(LIBS) $(OPENSSL_LIBS) $(EXPAT_LIBS) - -$(SERVER): $(OBJS) $(SOBJS) - rm -f $@ - $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(LIBS) - -include .depend diff --git a/cpp/test/Glacier/starter/Server.cpp b/cpp/test/Glacier/starter/Server.cpp deleted file mode 100644 index 8864d6c009d..00000000000 --- a/cpp/test/Glacier/starter/Server.cpp +++ /dev/null @@ -1,41 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <Ice/Application.h> -#include <CallbackI.h> - -using namespace std; -using namespace Ice; -using namespace Test; - -class CallbackServer : public Application -{ -public: - - virtual int run(int, char*[]); -}; - -int -main(int argc, char* argv[]) -{ - CallbackServer app; - return app.main(argc, argv); -} - -int -CallbackServer::run(int argc, char* argv[]) -{ - communicator()->getProperties()->setProperty("CallbackAdapter.Endpoints", "tcp -p 12345 -t 10000"); - Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("CallbackAdapter"); - CallbackPrx self = CallbackPrx::uncheckedCast(adapter->createProxy(Ice::stringToIdentity("callback"))); - adapter->add(new CallbackI, Ice::stringToIdentity("callback")); - adapter->activate(); - communicator()->waitForShutdown(); - return EXIT_SUCCESS; -} diff --git a/cpp/test/Glacier/starter/passwords b/cpp/test/Glacier/starter/passwords deleted file mode 100644 index 2b10070db5c..00000000000 --- a/cpp/test/Glacier/starter/passwords +++ /dev/null @@ -1 +0,0 @@ -dummy xxMqsnnDcK8tw
\ No newline at end of file diff --git a/cpp/test/Glacier/starter/run.py b/cpp/test/Glacier/starter/run.py deleted file mode 100755 index f1e8de06996..00000000000 --- a/cpp/test/Glacier/starter/run.py +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env python -# ********************************************************************** -# -# Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -# -# This copy of Ice is licensed to you under the terms described in the -# ICE_LICENSE file included in this distribution. -# -# ********************************************************************** - -import os, sys - -for toplevel in [".", "..", "../..", "../../..", "../../../.."]: - toplevel = os.path.normpath(toplevel) - if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): - break -else: - raise "can't find toplevel directory!" - -sys.path.append(os.path.join(toplevel, "config")) -import TestUtil - -starter = os.path.join(toplevel, "bin", "glacierstarter") -router = os.path.join(toplevel, "bin", "glacierrouter") - -command = starter + TestUtil.clientServerOptions + \ - r' --Glacier.Starter.RouterPath=' + router + \ - r' --Glacier.Starter.PropertiesOverride=Ice.ServerIdleTime=10' \ - r' --Glacier.Starter.CryptPasswords="' + toplevel + r'/test/Glacier/starter/passwords"' + \ - r' --Glacier.Starter.Endpoints="default -p 12346 -t 30000"' + \ - r' --Glacier.Router.Endpoints="default"' + \ - r' --Glacier.Router.Client.Endpoints="default"' + \ - r' --Glacier.Router.Server.Endpoints="tcp"' - -print "starting glacier starter...", -starterPipe = os.popen(command) -TestUtil.getServerPid(starterPipe) -TestUtil.getAdapterReady(starterPipe) -print "ok" - -name = os.path.join("Glacier", "starter") - -TestUtil.mixedClientServerTest(name) - -# We run the test again, to check whether the glacier router starter -# can start up multiple routers. -TestUtil.mixedClientServerTest(name) - -print "shutting down glacier starter...", -TestUtil.killServers() # TODO: Graceful shutdown. -print "ok" - -starterStatus = starterPipe.close() - -if starterStatus: - TestUtil.killServers() - #sys.exit(1) # TODO: Uncomment when when we have graceful shutdown. - -sys.exit(0) diff --git a/cpp/test/Glacier/starter/starterC.dsp b/cpp/test/Glacier/starter/starterC.dsp deleted file mode 100644 index e2a3e597612..00000000000 --- a/cpp/test/Glacier/starter/starterC.dsp +++ /dev/null @@ -1,161 +0,0 @@ -# Microsoft Developer Studio Project File - Name="starterC" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=starterC - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "starterC.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "starterC.mak" CFG="starterC - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "starterC - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "starterC - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "starterC - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I "." /I "../../include" /I "../../../include" /D "NDEBUG" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /Fr /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386 /out:"client.exe"
-# SUBTRACT LINK32 /debug /nodefaultlib
-
-!ELSEIF "$(CFG)" == "starterC - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /WX /Gm /GR /GX /Zi /Od /I "." /I "../../include" /I "../../../include" /D "_DEBUG" /D "_CONSOLE" /FD /GZ /c
-# SUBTRACT CPP /Fr /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /out:"client.exe" /pdbtype:sept
-# SUBTRACT LINK32 /nodefaultlib
-
-!ENDIF
-
-# Begin Target
-
-# Name "starterC - Win32 Release"
-# Name "starterC - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\Client.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\CallbackI.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Callback.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\Callback.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\CallbackI.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=.\Callback.ice
-
-!IF "$(CFG)" == "starterC - Win32 Release"
-
-USERDEP__HELLO="..\..\..\bin\slice2cpp.exe" "..\..\..\lib\slice.lib"
-# Begin Custom Build
-InputPath=.\Callback.ice
-
-BuildCmds= \
- ..\..\..\bin\slice2cpp.exe -I../../../slice Callback.ice
-
-"Callback.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"Callback.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "starterC - Win32 Debug"
-
-USERDEP__HELLO="..\..\..\bin\slice2cpp.exe" "..\..\..\lib\sliced.lib"
-# Begin Custom Build
-InputPath=.\Callback.ice
-
-BuildCmds= \
- ..\..\..\bin\slice2cpp.exe -I../../../slice Callback.ice
-
-"Callback.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"Callback.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/cpp/test/Glacier/starter/starterS.dsp b/cpp/test/Glacier/starter/starterS.dsp deleted file mode 100644 index 02a044feece..00000000000 --- a/cpp/test/Glacier/starter/starterS.dsp +++ /dev/null @@ -1,161 +0,0 @@ -# Microsoft Developer Studio Project File - Name="starterS" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=starterS - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "starterS.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "starterS.mak" CFG="starterS - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "starterS - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "starterS - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "starterS - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I "." /I "../../../include" /D "NDEBUG" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /Fr /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386 /out:"server.exe"
-# SUBTRACT LINK32 /debug /nodefaultlib
-
-!ELSEIF "$(CFG)" == "starterS - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /WX /Gm /GR /GX /Zi /Od /I "." /I "../../../include" /D "_DEBUG" /D "_CONSOLE" /FD /GZ /c
-# SUBTRACT CPP /Fr /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /out:"server.exe" /pdbtype:sept
-# SUBTRACT LINK32 /nodefaultlib
-
-!ENDIF
-
-# Begin Target
-
-# Name "starterS - Win32 Release"
-# Name "starterS - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\Server.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\CallbackI.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Callback.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\Callback.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\CallbackI.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=.\Callback.ice
-
-!IF "$(CFG)" == "starterS - Win32 Release"
-
-USERDEP__HELLO="..\..\..\bin\slice2cpp.exe" "..\..\..\lib\slice.lib"
-# Begin Custom Build
-InputPath=.\Callback.ice
-
-BuildCmds= \
- ..\..\..\bin\slice2cpp.exe -I../../../slice Callback.ice
-
-"Callback.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"Callback.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "starterS - Win32 Debug"
-
-USERDEP__HELLO="..\..\..\bin\slice2cpp.exe" "..\..\..\lib\sliced.lib"
-# Begin Custom Build
-InputPath=.\Callback.ice
-
-BuildCmds= \
- ..\..\..\bin\slice2cpp.exe -I../../../slice Callback.ice
-
-"Callback.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"Callback.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/cpp/test/Makefile b/cpp/test/Makefile index 20c26cf17ba..0ec319faf24 100644 --- a/cpp/test/Makefile +++ b/cpp/test/Makefile @@ -18,7 +18,6 @@ SUBDIRS = IceUtil \ IcePack \ Freeze \ FreezeScript \ - Glacier \ Glacier2 $(EVERYTHING):: |