Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / orbsvcs / tests / Notify / Bug_3646a_Regression / Consumer.cpp
blobf79dfe149f73ae7cbef012c252d3d78efc8ac567
1 // ******************************************************************
2 // Include Section
3 // ******************************************************************
5 #include "Notify_Test_Client.h"
7 #include "ace/Get_Opt.h"
8 #include "ace/Argv_Type_Converter.h"
10 int
11 ACE_TMAIN (int argc, ACE_TCHAR* argv[])
13 int status = 0;
14 try
16 Notify_Test_Client client;
17 ACE_Argv_Type_Converter argcon (argc, argv);
18 status = client.init (argcon.get_argc (), argcon.get_TCHAR_argv ());
20 if (status == 0)
22 CosNaming::NamingContext_ptr naming = client.naming_context ();
23 if (CORBA::is_nil (naming))
25 ACE_ERROR_RETURN ((LM_ERROR,
26 "Can't find naming service\n"),
27 1);
30 CosNaming::Name name (1);
31 name.length (1);
32 name[0].id = CORBA::string_dup ("Channel1");
33 CORBA::Object_var obj1 = naming->resolve (name);
35 name[0].id = CORBA::string_dup ("Channel2");
36 CORBA::Object_var obj2 = naming->resolve (name);
39 catch (const CORBA::Exception& e)
41 e._tao_print_exception ("Error: ");
42 status = 1;
45 return status;