~ubuntu-branches/ubuntu/quantal/zeroc-ice/quantal

« back to all changes in this revision

Viewing changes to test/IceSSL/configuration/Client.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Francisco Moya
  • Date: 2006-08-06 19:00:57 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060806190057-3q4p9ws4ucyamn10
Tags: 3.1.0-2
* Patches #5 to #6 from ZeroC forums.
* Patch by Michael Pugach for DescriptorHelper.cpp.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// **********************************************************************
 
2
//
 
3
// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
 
4
//
 
5
// This copy of Ice is licensed to you under the terms described in the
 
6
// ICE_LICENSE file included in this distribution.
 
7
//
 
8
// **********************************************************************
 
9
 
 
10
#include <Ice/Ice.h>
 
11
 
 
12
using namespace std;
 
13
 
 
14
int
 
15
run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
 
16
{
 
17
    if(argc < 2)
 
18
    {
 
19
        cerr << "Usage: " << argv[0] << " testdir" << endl;
 
20
        return 1;
 
21
    }
 
22
 
 
23
    void allTests(const Ice::CommunicatorPtr&, const string&);
 
24
 
 
25
    allTests(communicator, argv[1]);
 
26
 
 
27
    return EXIT_SUCCESS;
 
28
}
 
29
 
 
30
int
 
31
main(int argc, char* argv[])
 
32
{
 
33
    int status;
 
34
    Ice::CommunicatorPtr communicator;
 
35
 
 
36
    try
 
37
    {
 
38
        communicator = Ice::initialize(argc, argv);
 
39
        status = run(argc, argv, communicator);
 
40
    }
 
41
    catch(const Ice::Exception& ex)
 
42
    {
 
43
        cerr << ex << endl;
 
44
        status = EXIT_FAILURE;
 
45
    }
 
46
 
 
47
    if(communicator)
 
48
    {
 
49
        try
 
50
        {
 
51
            communicator->destroy();
 
52
        }
 
53
        catch(const Ice::Exception& ex)
 
54
        {
 
55
            cerr << ex << endl;
 
56
            status = EXIT_FAILURE;
 
57
        }
 
58
    }
 
59
 
 
60
    return status;
 
61
}