diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-03-26 13:47:56 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-03-26 13:47:56 +0000 |
commit | d4e8931c000cebbbf47175c4c89a8577e185b4e6 (patch) | |
tree | a51810c6b643ab4c55a7c88990e1c38f63058d30 /TAO/examples/PluggableUDP | |
parent | bcb65bf6cc454d6fa6e21071bae0ad63a1c7f72f (diff) | |
download | ATCD-d4e8931c000cebbbf47175c4c89a8577e185b4e6.tar.gz |
Mon Mar 26 14:47:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/examples/PluggableUDP')
-rw-r--r-- | TAO/examples/PluggableUDP/tests/Basic/UDP_Client_i.cpp | 2 | ||||
-rw-r--r-- | TAO/examples/PluggableUDP/tests/Basic/UDP_i.cpp | 20 | ||||
-rw-r--r-- | TAO/examples/PluggableUDP/tests/Basic/UDP_i.h | 6 | ||||
-rw-r--r-- | TAO/examples/PluggableUDP/tests/Basic/client.cpp | 5 | ||||
-rw-r--r-- | TAO/examples/PluggableUDP/tests/Basic/server.cpp | 28 |
5 files changed, 9 insertions, 52 deletions
diff --git a/TAO/examples/PluggableUDP/tests/Basic/UDP_Client_i.cpp b/TAO/examples/PluggableUDP/tests/Basic/UDP_Client_i.cpp index 854e25be0dd..aacb329187d 100644 --- a/TAO/examples/PluggableUDP/tests/Basic/UDP_Client_i.cpp +++ b/TAO/examples/PluggableUDP/tests/Basic/UDP_Client_i.cpp @@ -57,7 +57,7 @@ UDP_Client_i::svc (void) "invoked %s %d, going to wait %d ms\n", corba_client_name.in (), i, - delay_)); + delay_)); ACE_Time_Value tv (0, delay_ * 1000); ACE_OS::sleep (tv); // wait to not flood the server } diff --git a/TAO/examples/PluggableUDP/tests/Basic/UDP_i.cpp b/TAO/examples/PluggableUDP/tests/Basic/UDP_i.cpp index 3a493216ddf..a77d62f3ae7 100644 --- a/TAO/examples/PluggableUDP/tests/Basic/UDP_i.cpp +++ b/TAO/examples/PluggableUDP/tests/Basic/UDP_i.cpp @@ -5,7 +5,8 @@ ACE_RCSID(UDP, UDP_i, "") // Constructor -UDP_i::UDP_i (void) +UDP_i::UDP_i (CORBA::ORB_ptr o) : + orb_(CORBA::ORB::_duplicate (o)) { // no-op } @@ -17,15 +18,6 @@ UDP_i::~UDP_i (void) // no-op } -// Set the ORB pointer. - -void -UDP_i::orb (CORBA::ORB_ptr o) -{ - this->orb_ = CORBA::ORB::_duplicate (o); -} - - void UDP_i::invoke (const char * client_name, UDP_ptr udpHandler, @@ -34,18 +26,16 @@ UDP_i::invoke (const char * client_name, try { ACE_DEBUG ((LM_DEBUG, - "UDP_i::invoke: name = %s request id = %d\n", + "UDP_i::invoke: name = %s request id = %d.\n", client_name, request_id)); - ACE_DEBUG ((LM_DEBUG, - ".")); CORBA::Long last_request_id = 0; if (request_id_table_.find (client_name, last_request_id) != -1) { if (last_request_id + 1 != request_id) - ACE_DEBUG ((LM_DEBUG, + ACE_ERROR ((LM_ERROR, "UDP_i::invoke: failure on %s expected id = %d, got %d\n", client_name, last_request_id+1, @@ -65,7 +55,7 @@ UDP_i::invoke (const char * client_name, } catch (const CORBA::Exception&) { - ACE_DEBUG ((LM_DEBUG, + ACE_ERROR ((LM_ERROR, "UDP_i::svc: Received exception\n")); } } diff --git a/TAO/examples/PluggableUDP/tests/Basic/UDP_i.h b/TAO/examples/PluggableUDP/tests/Basic/UDP_i.h index 993e1228162..fc58a7bea4e 100644 --- a/TAO/examples/PluggableUDP/tests/Basic/UDP_i.h +++ b/TAO/examples/PluggableUDP/tests/Basic/UDP_i.h @@ -38,7 +38,7 @@ class UDP_i: public POA_UDP // arrived in order. public: // = Initialization and termination methods. - UDP_i (void); + UDP_i (CORBA::ORB_ptr o); // Constructor ~UDP_i (void); @@ -49,12 +49,8 @@ public: CORBA::Long request_id); virtual void shutdown (void); - // Shutdown the server. - void orb (CORBA::ORB_ptr o); - // Set the ORB pointer. - private: CORBA::ORB_var orb_; // ORB pointer. diff --git a/TAO/examples/PluggableUDP/tests/Basic/client.cpp b/TAO/examples/PluggableUDP/tests/Basic/client.cpp index 4e4b487c01a..4070f2b99ee 100644 --- a/TAO/examples/PluggableUDP/tests/Basic/client.cpp +++ b/TAO/examples/PluggableUDP/tests/Basic/client.cpp @@ -115,10 +115,7 @@ main (int argc, char *argv[]) poa_manager->activate (); // Instantiate reply handler - UDP_i udp_i; - - // let it remember our ORB - udp_i.orb (orb.in ()); + UDP_i udp_i (orb.in ()); PortableServer::ObjectId_var id = root_poa->activate_object (&udp_i); diff --git a/TAO/examples/PluggableUDP/tests/Basic/server.cpp b/TAO/examples/PluggableUDP/tests/Basic/server.cpp index b3809af34e0..b0f9c9e5b4f 100644 --- a/TAO/examples/PluggableUDP/tests/Basic/server.cpp +++ b/TAO/examples/PluggableUDP/tests/Basic/server.cpp @@ -103,9 +103,7 @@ main (int argc, char *argv[]) if (parse_args (argc, argv) != 0) return 1; - UDP_i udp_i; - - udp_i.orb (orb.in ()); + UDP_i udp_i (orb.in ()); PortableServer::ObjectId_var id = PortableServer::string_to_ObjectId ("UDP_Object"); @@ -144,28 +142,6 @@ main (int argc, char *argv[]) poa_manager->activate (); - /* - // Instantiate reply handler - UDP_i udpHandler_i; - - udpHandler_i.orb (orb.in ()); - - PortableServer::ObjectId_var id_act = - persistent_poa->activate_object (&udpHandler_i); - - CORBA::Object_var object_act = persistent_poa->id_to_reference (id_act.in ()); - - UDP_var udpHandler_var = - UDP::_narrow (object_act.in ()); - - // Instantiate client - UDP_Client_i* client = new UDP_Client_i (orb, - udp_var.in (), - udpHandler_var.in ()); - - client->activate (); - */ - orb->run (); ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); @@ -175,8 +151,6 @@ main (int argc, char *argv[]) ); orb->destroy (); - - //delete client; } catch (const CORBA::Exception& ex) { |