diff options
Diffstat (limited to 'cs/test/Ice/operations/Server.cs')
-rwxr-xr-x | cs/test/Ice/operations/Server.cs | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/cs/test/Ice/operations/Server.cs b/cs/test/Ice/operations/Server.cs index 81ee60c999b..59057b74b1e 100755 --- a/cs/test/Ice/operations/Server.cs +++ b/cs/test/Ice/operations/Server.cs @@ -13,51 +13,51 @@ public class Server { private static int run(string[] args, Ice.Communicator communicator) { - // - // We don't want connection warnings because of the timeout test. - // - communicator.getProperties().setProperty("Ice.Warn.Connections", "0"); - - communicator.getProperties().setProperty("Ice.OA.TestAdapter.Endpoints", "default -p 12010 -t 5000:udp"); - Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter"); - Ice.Identity id = communicator.stringToIdentity("test"); - adapter.add(new MyDerivedClassI(adapter, id), id); - adapter.add(new TestCheckedCastI(), communicator.stringToIdentity("context")); - adapter.activate(); + // + // We don't want connection warnings because of the timeout test. + // + communicator.getProperties().setProperty("Ice.Warn.Connections", "0"); + + communicator.getProperties().setProperty("Ice.OA.TestAdapter.Endpoints", "default -p 12010 -t 5000:udp"); + Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter"); + Ice.Identity id = communicator.stringToIdentity("test"); + adapter.add(new MyDerivedClassI(adapter, id), id); + adapter.add(new TestCheckedCastI(), communicator.stringToIdentity("context")); + adapter.activate(); - communicator.waitForShutdown(); - return 0; + communicator.waitForShutdown(); + return 0; } public static void Main(string[] args) { - int status = 0; - Ice.Communicator communicator = null; - - try - { - communicator = Ice.Util.initialize(ref args); - status = run(args, communicator); - } - catch(Ice.LocalException ex) - { - Console.Error.WriteLine(ex); - status = 1; - } - - if(communicator != null) - { - try - { - communicator.destroy(); - } - catch(Ice.LocalException ex) - { - Console.Error.WriteLine(ex); - status = 1; - } - } - + int status = 0; + Ice.Communicator communicator = null; + + try + { + communicator = Ice.Util.initialize(ref args); + status = run(args, communicator); + } + catch(Ice.LocalException ex) + { + Console.Error.WriteLine(ex); + status = 1; + } + + if(communicator != null) + { + try + { + communicator.destroy(); + } + catch(Ice.LocalException ex) + { + Console.Error.WriteLine(ex); + status = 1; + } + } + if(status != 0) { System.Environment.Exit(status); |