diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-11 20:15:22 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-11 20:15:22 +0000 |
commit | d755f7ce9724b58a1ab0eac2dcf670199a6f5427 (patch) | |
tree | 5c839259117ff84d4cc2acfb676395f7c8c2e19d | |
parent | 7ddae06aa79ae5373b669dd30fd6755405bf6f0d (diff) | |
download | ATCD-d755f7ce9724b58a1ab0eac2dcf670199a6f5427.tar.gz |
ChangeLogTag:Sun Jan 11 14:09:48 1998 <coryan@MILONGA>
-rw-r--r-- | TAO/ChangeLog-98c | 10 | ||||
-rw-r--r-- | TAO/orbsvcs/Dump_Schedule/Dump_Schedule.dsp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/Event_Service/CORBA_Utils_T.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/Event_Service/Dispatching_Modules.cpp | 4 | ||||
-rw-r--r-- | TAO/orbsvcs/Event_Service/Event_Channel.cpp | 65 | ||||
-rw-r--r-- | TAO/orbsvcs/Event_Service/Event_Service.cpp | 16 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp | 8 |
7 files changed, 39 insertions, 68 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c index 254657a3b5d..7ce0a7cc62a 100644 --- a/TAO/ChangeLog-98c +++ b/TAO/ChangeLog-98c @@ -1,3 +1,13 @@ +Sun Jan 11 14:09:48 1998 <coryan@MILONGA> + + * orbsvcs/Dump_Schedule/Dump_Schedule.dsp: + * orbsvcs/Event_Service/CORBA_Utils_T.cpp: + * orbsvcs/Event_Service/Dispatching_Modules.cpp: + * orbsvcs/Event_Service/Event_Channel.cpp: + * orbsvcs/Event_Service/Event_Service.cpp: + * orbsvcs/tests/Event_Latency/Event_Latency.cpp: + Adapted so they compile with the new POA mapping. + Sun Jan 11 11:33:36 1998 <coryan@MILONGA> * tao/connect.cpp: diff --git a/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.dsp b/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.dsp index 943d6f62b66..1b18702b6ed 100644 --- a/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.dsp +++ b/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.dsp @@ -65,7 +65,7 @@ LINK32=link.exe # PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I ".." /I "..\.." /I "..\..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
diff --git a/TAO/orbsvcs/Event_Service/CORBA_Utils_T.cpp b/TAO/orbsvcs/Event_Service/CORBA_Utils_T.cpp index f603421eaaa..cb685721d3b 100644 --- a/TAO/orbsvcs/Event_Service/CORBA_Utils_T.cpp +++ b/TAO/orbsvcs/Event_Service/CORBA_Utils_T.cpp @@ -120,7 +120,7 @@ ACE_CORBA_Sequence<TYPE>::length (CORBA::ULong len) // Allocate the space that we need. TYPE* tmp = this->new_array (len); // Copy over the old sequence. - for (int i = 0; i < maximum_; ++i) + for (CORBA::ULong i = 0; i < maximum_; ++i) { tmp[i] = buffer_[i]; } diff --git a/TAO/orbsvcs/Event_Service/Dispatching_Modules.cpp b/TAO/orbsvcs/Event_Service/Dispatching_Modules.cpp index d0359fbb287..e9a0041044d 100644 --- a/TAO/orbsvcs/Event_Service/Dispatching_Modules.cpp +++ b/TAO/orbsvcs/Event_Service/Dispatching_Modules.cpp @@ -10,10 +10,6 @@ #include "Dispatching_Modules.i" #endif /* __ACE_INLINE__ */ -typedef ACE_EventChannel::DISPATCH_ERROR DISPATCH_ERROR; -typedef ACE_EventChannel::SYNCHRONIZATION_ERROR SYNC_ERROR; -typedef ACE_EventChannel::QOS_ERROR QOS_ERROR; - // ************************************************************ void diff --git a/TAO/orbsvcs/Event_Service/Event_Channel.cpp b/TAO/orbsvcs/Event_Service/Event_Channel.cpp index fa3fd4bc33f..3d76ec9d805 100644 --- a/TAO/orbsvcs/Event_Service/Event_Channel.cpp +++ b/TAO/orbsvcs/Event_Service/Event_Channel.cpp @@ -1,6 +1,7 @@ // $Id$ + #include "ace/Service_Config.h" #include "orbsvcs/Scheduler_Factory.h" @@ -605,15 +606,11 @@ ACE_EventChannel::destroy (CORBA::Environment &_env) Shutdown_Channel *sc = new Shutdown_Channel (this); if (sc == 0) TAO_THROW (CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); - // @@ TODO: Orbix parameters - // (0, CORBA::COMPLETED_NO, "ACE_EventChannel::destroy")); // Create a wrapper around the dispatch request. Flush_Queue_ACT *act = new Flush_Queue_ACT (sc, dispatching_module_); if (act == 0) TAO_THROW (CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); - // @@ TODO Orbix parameters - // (0, CORBA::COMPLETED_NO, "ACE_EventChannel::destroy")); // Set a 100ns timer. if (this->timer ()->schedule_timer (0, // no rt-info @@ -868,13 +865,6 @@ ACE_ES_Subscription_Info::insert_or_fail (Subscriber_Map &type_map, // ************************************************************ -typedef ACE_EventChannel::SYNCHRONIZATION_ERROR SYNC_ERROR; -typedef ACE_EventChannel::QOS_ERROR QOS_ERROR; -typedef ACE_EventChannel::SUBSCRIPTION_ERROR SUBSCRIPTION_ERROR; -typedef ACE_EventChannel::CORRELATION_ERROR CORRELATION_ERROR; - -// ************************************************************ - ACE_ES_Consumer_Module::ACE_ES_Consumer_Module (ACE_EventChannel* channel) : lock_ (), all_consumers_ (), @@ -956,8 +946,8 @@ ACE_ES_Consumer_Module::shutdown (void) iter.advance ()) { (*proxy)->shutdown (); - CORBA::release (*proxy); - // Shouldn't this be _release () + // @@ Cannnot use CORBA::release (*proxy), since it is a servant. + delete *proxy; // Remove the consumer from our list. { @@ -982,9 +972,7 @@ ACE_ES_Consumer_Module::disconnecting (ACE_Push_Consumer_Proxy *consumer, { ACE_ES_GUARD ace_mon (lock_); if (ace_mon.locked () == 0) - TAO_THROW (SYNC_ERROR); - // @@ TODO Orbix parameters - // (0, CORBA::COMPLETED_NO, "ACE_ES_Consumer_Module::disconnected")); + TAO_THROW (RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR); if (all_consumers_.remove (consumer) == -1) return; @@ -1008,15 +996,11 @@ ACE_ES_Consumer_Module::disconnecting (ACE_Push_Consumer_Proxy *consumer, Shutdown_Consumer *sc = new Shutdown_Consumer (this, consumer); if (sc == 0) TAO_THROW (CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); - // @@ TODO Orbix parameters: - // (0, CORBA::COMPLETED_NO, "ACE_ES_Consumer_Module::disconnected")); // Create a wrapper around the dispatch request. Flush_Queue_ACT *act = new Flush_Queue_ACT (sc, channel_->dispatching_module_); if (act == 0) TAO_THROW (CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); - // @@ TODO Orbix parameters: - // (0, CORBA::COMPLETED_NO, "ACE_ES_Consumer_Module::disconnecting")); ACE_DEBUG ((LM_DEBUG, "(%t) initiating consumer disconnect.\n")); @@ -1071,8 +1055,6 @@ ACE_ES_Consumer_Module::obtain_push_supplier (CORBA::Environment &_env) ACE_ERROR ((LM_ERROR, "ACE_EventChannel" "::obtain_push_supplier failed.\n")); TAO_THROW_RETURN (CORBA::NO_MEMORY (CORBA::COMPLETED_NO), 0); - // @@ TODO Orbix parameters: - // (0, CORBA::COMPLETED_NO, "ACE_ES_Consumer_Module::obtain_push_supplier")); } { @@ -1080,10 +1062,7 @@ ACE_ES_Consumer_Module::obtain_push_supplier (CORBA::Environment &_env) if (ace_mon.locked () == 0) { delete new_consumer; - TAO_THROW_RETURN (SYNC_ERROR, 0); - // @@ TODO Orbix parameters: - // (0, CORBA::COMPLETED_NO, - // "ACE_ES_Consumer_Module::obtain_push_supplier"), 0); + TAO_THROW_RETURN (RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR, 0); } if (all_consumers_.insert (new_consumer) == -1) @@ -1117,9 +1096,7 @@ ACE_ES_Correlation_Module::connected (ACE_Push_Consumer_Proxy *consumer, { // Initialize the consumer correlation filter. if (consumer->correlation ().connected (consumer, this) == -1) - TAO_THROW (CORRELATION_ERROR); - // @@ TODO Orbix parameters: - // (0, CORBA::COMPLETED_NO, "ACE_ES_Correlation_Module::connected")); + TAO_THROW (RtecEventChannelAdmin::EventChannel::CORRELATION_ERROR); } void @@ -1830,9 +1807,7 @@ ACE_ES_Subscription_Module::connected (ACE_Push_Supplier_Proxy *supplier, { ACE_ES_WGUARD ace_mon (lock_); if (ace_mon.locked () == 0) - TAO_THROW (SYNC_ERROR); - // @@ TODO: Orbix parameters - // (0, CORBA::COMPLETED_NO, "ACE_ES_Subscription_Module::connected")); + TAO_THROW (RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR); if (all_suppliers_.insert (supplier) == -1) ACE_ERROR ((LM_ERROR, "ACE_ES_Subscription_Module insert failed.\n")); @@ -1968,14 +1943,10 @@ ACE_ES_Subscription_Module::disconnecting (ACE_Push_Supplier_Proxy *supplier, { ACE_ES_WGUARD ace_mon (lock_); if (ace_mon.locked () == 0) - TAO_THROW (SYNC_ERROR); - // @@ TODO: Orbix parameters - // (0, CORBA::COMPLETED_NO, "ACE_ES_Subscription_Module::disconnected")); + TAO_THROW (RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR); if (all_suppliers_.remove (supplier) == -1) - TAO_THROW (SUBSCRIPTION_ERROR); - // @@ TODO: Orbix parameters. - // (0, CORBA::COMPLETED_NO, "ACE_ES_Subscription_Module remove failed")); + TAO_THROW (RtecEventChannelAdmin::EventChannel::SUBSCRIPTION_ERROR); // Remove all consumers from the supplier's source-based subscription lists. ACE_ES_Subscription_Info::Subscriber_Set_Iterator source_iterator @@ -2523,14 +2494,10 @@ ACE_ES_Supplier_Module::disconnecting (ACE_Push_Supplier_Proxy *supplier, { ACE_ES_GUARD ace_mon (lock_); if (ace_mon.locked () == 0) - TAO_THROW (SYNC_ERROR); - // @@ TODO Orbix parameters: - // (0, CORBA::COMPLETED_NO, "ACE_ES_Supplier_Module::disconnected")); + TAO_THROW (RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR); if (all_suppliers_.remove (supplier) == -1) - TAO_THROW (SUBSCRIPTION_ERROR); - // @@ TODO Orbix parameters: - // (0, CORBA::COMPLETED_NO, "ACE_ES_Supplier_Module remove failed")); + TAO_THROW (RtecEventChannelAdmin::EventChannel::SUBSCRIPTION_ERROR); up_->disconnecting (supplier, _env); @@ -2584,18 +2551,13 @@ ACE_ES_Supplier_Module::obtain_push_consumer (CORBA::Environment &_env) if (new_supplier == 0) TAO_THROW_RETURN (CORBA::NO_MEMORY (CORBA::COMPLETED_NO), 0); - // @@ TODO Orbix parameters: - // (0, CORBA::COMPLETED_NO, "ACE_ES_Supplier_Module::obtain_push_consumer")); { ACE_ES_GUARD ace_mon (lock_); if (ace_mon.locked () == 0) { delete new_supplier; - TAO_THROW_RETURN (SYNC_ERROR, 0); - // @@ TODO Orbix parameters: - // (0, CORBA::COMPLETED_NO, - // "ACE_ES_Supplier_Module::obtain_push_consumer"), 0); + TAO_THROW_RETURN (RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR, 0); } if (all_suppliers_.insert (new_supplier) == -1) @@ -2620,9 +2582,6 @@ ACE_ES_Supplier_Module::push (ACE_Push_Supplier_Proxy *proxy, if (temp == 0) TAO_THROW (CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); - // @@ TODO Orbix parameters: - // (0, CORBA::COMPLETED_NO, - // "ACE_ES_Supplier_Module::obtain_push_consumer")); // This will guarantee that release gets called when we exit // the scope. diff --git a/TAO/orbsvcs/Event_Service/Event_Service.cpp b/TAO/orbsvcs/Event_Service/Event_Service.cpp index 44177359cca..2534d85c254 100644 --- a/TAO/orbsvcs/Event_Service/Event_Service.cpp +++ b/TAO/orbsvcs/Event_Service/Event_Service.cpp @@ -45,23 +45,31 @@ int main (int argc, char *argv[]) // Register Event_Service with Naming Service. ACE_EventChannel* ec; ACE_NEW_RETURN (ec, ACE_EventChannel, -1); - CORBA::Object::_duplicate(ec); + TAO_CHECK_ENV; + + RtecEventChannelAdmin::EventChannel_ptr impl = + ec->_this (TAO_TRY_ENV); TAO_CHECK_ENV; CORBA::String str = - orb->object_to_string (ec, TAO_TRY_ENV); + orb->object_to_string (impl, TAO_TRY_ENV); ACE_OS::puts ((char *) str); CosNaming::Name channel_name (1); channel_name[0].id = CORBA::string_dup ("EventService"); channel_name.length (1); - naming_context->bind (channel_name, ec, TAO_TRY_ENV); + naming_context->bind (channel_name, impl, TAO_TRY_ENV); TAO_CHECK_ENV; orb->run (); - CORBA::release (ec); + naming_context->unbind (channel_name, TAO_TRY_ENV); TAO_CHECK_ENV; + + CORBA::release (impl); + TAO_CHECK_ENV; + + delete ec; } TAO_CATCHANY { diff --git a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp index 02961f65817..beb2cc27f3a 100644 --- a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp +++ b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp @@ -330,14 +330,12 @@ Latency_Supplier::Latency_Supplier (const u_int total_messages, supplier_ (new Supplier (this)), consumer_ (new Consumer (this)) { - CORBA::Object::_duplicate (this->supplier_); - CORBA::Object::_duplicate (this->consumer_); } Latency_Supplier::~Latency_Supplier (void) { - CORBA::release (this->supplier_); - CORBA::release (this->consumer_); + delete this->consumer_; + delete this->supplier_; } int @@ -873,7 +871,7 @@ main (int argc, char *argv []) for (i = 0; i < consumers; ++i) { consumer [i]->print_stats (); - CORBA::release (consumer [i]); + delete consumer [i]; TAO_CHECK_ENV; } delete [] consumer; |