~ubuntu-branches/ubuntu/breezy/ace/breezy

« back to all changes in this revision

Viewing changes to TAO/tests/Connection_Failure/client.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad, Benjamin Montgomery, Adam Conrad
  • Date: 2005-09-18 22:51:38 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge) (0.1.2 woody)
  • Revision ID: james.westby@ubuntu.com-20050918225138-seav22q6fyylb536
Tags: 5.4.7-3ubuntu1
[ Benjamin Montgomery ]
* Added a patch for amd64 and powerpc that disables the compiler
  option -fvisibility-inlines-hidden

[ Adam Conrad ]
* Added DPATCH_OPTION_CPP=1 to debian/patches/00options to make
  Benjamin's above changes work correctly with dpatch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// client.cpp,v 1.3 2003/12/31 21:47:08 bala Exp
2
 
 
3
 
#include "testC.h"
4
 
 
5
 
#include "ace/Log_Msg.h"
6
 
 
7
 
ACE_RCSID(Connection_Failure, client, "client.cpp,v 1.3 2003/12/31 21:47:08 bala Exp")
8
 
 
9
 
const char *ior =
10
 
  "corbaloc:iiop:192.3.47/10007/RandomObject";
11
 
 
12
 
int
13
 
main (int argc, char *argv[])
14
 
{
15
 
  ACE_TRY_NEW_ENV
16
 
    {
17
 
      CORBA::ORB_var orb =
18
 
        CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
19
 
      ACE_TRY_CHECK;
20
 
 
21
 
      CORBA::Object_var tmp =
22
 
        orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
23
 
      ACE_TRY_CHECK;
24
 
 
25
 
      // First connection happens here..
26
 
      test::_narrow (tmp.in () ACE_ENV_ARG_PARAMETER);
27
 
      ACE_TRY_CHECK;
28
 
    }
29
 
  ACE_CATCH (CORBA::TRANSIENT, transient_exception)
30
 
    {
31
 
      // This exception is correct.
32
 
      ACE_DEBUG ((LM_DEBUG,
33
 
                  "_narrow() to non-existent object failed correctly.  Test succeeded.\n"));
34
 
      return 0;
35
 
    }
36
 
  ACE_ENDTRY;
37
 
 
38
 
  // Should not reach here.
39
 
  ACE_ERROR_RETURN ((LM_ERROR,
40
 
                     "_narrow() succeeded to non-existent object when it should not have...\n"),
41
 
                     -1);
42
 
}