diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-05-04 15:05:14 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-05-04 15:05:14 +0000 |
commit | e24bb12e204edadb747eae502360cb35d5ccd8a5 (patch) | |
tree | 5a368850cf2c4ac0db9b2dc3b2b76cf4bc96707f /TAO/orbsvcs/tests/EC_Mcast | |
parent | 04512b4ebce8312b4211884800b4bbb679c97bcb (diff) | |
download | ATCD-e24bb12e204edadb747eae502360cb35d5ccd8a5.tar.gz |
ChangeLogTag:Tue May 4 09:47:04 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO/orbsvcs/tests/EC_Mcast')
-rw-r--r-- | TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp | 13 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Mcast/svc.conf | 2 |
2 files changed, 10 insertions, 5 deletions
diff --git a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp index 5e73e42cb0b..0149c27795f 100644 --- a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp +++ b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp @@ -10,6 +10,7 @@ #include "orbsvcs/Time_Utilities.h" #include "orbsvcs/Event/EC_Event_Channel.h" +#include "orbsvcs/Event/EC_Default_Factory.h" #include "EC_Mcast.h" @@ -787,7 +788,8 @@ ECM_Consumer::connect (ACE_RANDR_TYPE &seed, const ECM_Federation* federation = this->federation_->federation (); for (int i = 0; i < federation->consumer_types (); ++i) { - if (ACE_OS::rand_r (seed) < RAND_MAX / 2) + unsigned int x = ACE_OS::rand_r (seed); + if (x < RAND_MAX / 2) { ACE_DEBUG ((LM_DEBUG, "Federation %s leaves group %s\n", @@ -957,14 +959,15 @@ ECM_Local_Federation::supplier_timeout (RtecEventComm::PushConsumer_ptr consumer ACE_Time_Value delta = ACE_OS::gettimeofday () - this->last_subscription_change_; - double p = double (ACE_OS::rand_r (this->seed_)) / RAND_MAX; + unsigned int x = ACE_OS::rand_r (this->seed_); + double p = double (x) / RAND_MAX; double maxp = double (delta.msec ()) / this->subscription_change_period_; if (4 * p < maxp) { ACE_DEBUG ((LM_DEBUG, - "Reconfiguring federation %s: %f %f\n", - this->name (), p, maxp)); + "Reconfiguring federation %s: %f %f [%d]\n", + this->name (), p, maxp, x)); this->consumer_.disconnect (TAO_IN_ENV); TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); this->consumer_.connect (this->seed_, TAO_IN_ENV); @@ -1118,6 +1121,8 @@ ECM_Local_Federation::subscribed_bit (int i) const int main (int argc, char *argv []) { + TAO_EC_Default_Factory::init_svcs (); + ECM_Driver driver; return driver.run (argc, argv); } diff --git a/TAO/orbsvcs/tests/EC_Mcast/svc.conf b/TAO/orbsvcs/tests/EC_Mcast/svc.conf index 449b02caf51..925d535e41b 100644 --- a/TAO/orbsvcs/tests/EC_Mcast/svc.conf +++ b/TAO/orbsvcs/tests/EC_Mcast/svc.conf @@ -1,2 +1,2 @@ # $Id$ -static EC_Factory "-ECfiltering basic -ECpushsupplierset delayed -ECproxyconsumerlock thread -ECproxysupplierlock recursive" +static EC_Factory "-ECfiltering basic -ECpushsupplierset delayed -ECproxyconsumerlock thread -ECproxysupplierlock thread -ECconsumeradminlock null -ECsupplieradminlock thread -ECsupplierfiltering per-supplier -ECobserver basic" |