summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthrall <thrall@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-05-14 05:56:56 +0000
committerthrall <thrall@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-05-14 05:56:56 +0000
commitfaa55f159cdaba712a4c34b548f748c89eff49ef (patch)
tree349015197d6068ba887fb61ccbf22cf91ebc2d58
parentfd7f531c8f8cf6b61d609ea44bc37f1a0cf73ebd (diff)
downloadATCD-faa55f159cdaba712a4c34b548f748c89eff49ef.tar.gz
Changed error output to stderr instead of ACE logging since we disabled that to clean out ACE_DEBUG messages
-rw-r--r--TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Kokyu_EC.cpp19
-rw-r--r--TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Node1_EC.cpp33
-rw-r--r--TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Node2_EC.cpp33
-rw-r--r--TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Node3_EC.cpp33
-rw-r--r--TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Node4_EC.cpp33
5 files changed, 83 insertions, 68 deletions
diff --git a/TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Kokyu_EC.cpp b/TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Kokyu_EC.cpp
index 8934501c996..5eaf1f71e93 100644
--- a/TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Kokyu_EC.cpp
+++ b/TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Kokyu_EC.cpp
@@ -652,8 +652,8 @@ Kokyu_EC::init_gateway(CORBA::ORB_ptr orb,
if (this->gateways.find(consumer_ec_ior) == 0)
{
//Already a gateway for that EC
- ACE_ERROR((LM_ERROR,"Node1_EC (%P|%t) init_gateway(): Tried to create already-existing gateway for %s\n",
- consumer_ec_ior));
+ ACE_OS::fprintf(stderr,"Node1_EC init_gateway(): Tried to create already-existing gateway for %s\n",
+ consumer_ec_ior);
return;
}
@@ -677,7 +677,7 @@ Kokyu_EC::init_gateway(CORBA::ORB_ptr orb,
if (CORBA::is_nil(obj.in()))
{
- ACE_ERROR((LM_ERROR,"Unable to read IOR file for remote EC; Object_var is nil.\n"));
+ ACE_OS::fprintf(stderr,"Unable to read IOR file for remote EC; Object_var is nil.\n");
return;
}
@@ -797,7 +797,7 @@ Reactor_Task::initialize(void)
int err = reactor->open(ACE_Select_Reactor_Impl::DEFAULT_SIZE);
if (err < 0)
{
- ACE_ERROR((LM_ERROR,"Reactor_Task could not open ACE_Reactor\n"));
+ ACE_OS::fprintf(stderr,"Reactor_Task could not open ACE_Reactor\n");
return -1;
}
ACE_Reactor::instance(reactor);
@@ -834,7 +834,7 @@ Reactor_Task::svc (void)
int err = this->react_->run_reactor_event_loop();
if (err < 0)
{
- ACE_ERROR((LM_ERROR,"Reactor_Task (%t) error running Reactor event loop\n"));
+ ACE_OS::fprintf(stderr,"Reactor_Task error running Reactor event loop\n");
}
ACE_DEBUG((LM_DEBUG,"Reactor_Task (%P|%t) svc(): LEAVE\n"));
@@ -880,6 +880,8 @@ Gateway_Initializer::handle_timeout (const ACE_Time_Value &,
ACE_TRY_CHECK;
}
+ ACE_OS::printf("Gateway_Initializer: initialized all gateways\n");
+
RtecScheduler::Scheduler_var scheduler = this->ec_->scheduler(ACE_ENV_SINGLE_ARG_PARAMETER);
RtecEventChannelAdmin::EventChannel_var event_channel = this->ec_->event_channel(ACE_ENV_SINGLE_ARG_DECL);
RtecEventChannelAdmin::SupplierAdmin_var supplier_admin =
@@ -957,7 +959,6 @@ Gateway_Initializer::handle_timeout (const ACE_Time_Value &,
//NOTE: memory leak; we lose track of dynamically allocated general_impl!
//DONE connecting dummy supplier
- //TODO: How ensure all gateways TO us are connected?
ACE_Time_Value sleeptime(0,500000);
for (size_t remote_gateways_connected = 0;
remote_gateways_connected < this->ec_->remote_ecs()->size();
@@ -968,6 +969,8 @@ Gateway_Initializer::handle_timeout (const ACE_Time_Value &,
ACE_OS::sleep(sleeptime);
}
+ ACE_OS::printf("Gateway_Initializer: all remote gateways connected\n");
+
if (this->ec_->time_master())
{
//set start time for all other ECs
@@ -987,7 +990,7 @@ Gateway_Initializer::handle_timeout (const ACE_Time_Value &,
//now wait for start time
sleeptime.set(0,5); //we'll be within 5usec of start time when we call ec_->start()
ACE_Time_Value now(ACE_OS::gettimeofday());
- ACE_DEBUG((LM_DEBUG,"Gateway_Initializer (%P|%t): waiting for start time to be set or to pass; now is %isec %iusec, start time is %isec %iusec\n",now.sec(),now.usec(),this->ec_->start_time().sec(),this->ec_->start_time().usec()));
+ ACE_OS::printf("Gateway_Initializer: waiting for start time to be set or to pass; now is %isec %iusec, start time is %isec %iusec\n",now.sec(),now.usec(),this->ec_->start_time().sec(),this->ec_->start_time().usec());
while (this->ec_->start_time() == ACE_Time_Value::zero
|| now < this->ec_->start_time())
{
@@ -997,7 +1000,7 @@ Gateway_Initializer::handle_timeout (const ACE_Time_Value &,
now = ACE_OS::gettimeofday();
}
- ACE_DEBUG((LM_DEBUG,"Gateway_Initializer (%P|%t): Reached start time at %isec %iusec\n",now.sec(),now.usec()));
+ ACE_OS::printf("Gateway_Initializer: Reached start time at %isec %iusec\n",now.sec(),now.usec());
//start self once we know that all the gateways are connected
this->ec_->start(ACE_ENV_SINGLE_ARG_PARAMETER);
diff --git a/TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Node1_EC.cpp b/TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Node1_EC.cpp
index ce9a7b41032..00c20952112 100644
--- a/TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Node1_EC.cpp
+++ b/TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Node1_EC.cpp
@@ -165,7 +165,8 @@ main (int argc, char* argv[])
Node1_EC supplier_ec;
if (supplier_ec.init(time_master,sched_type.c_str(), poa.in(),orb->orb_core()->reactor()) == -1)
{
- ACE_ERROR_RETURN((LM_ERROR, "Unable to initialize Kokyu_EC"), 1);
+ ACE_OS::fprintf(stderr, "Unable to initialize Kokyu_EC");
+ return -1;
}
RtEventChannelAdmin::RtSchedEventChannel_var supplier_ec_ior =
@@ -221,7 +222,8 @@ main (int argc, char* argv[])
long timer_id = rt.reactor()->schedule_timer(ginit,0,gateway_delay);
if (timer_id < 0)
{
- ACE_ERROR_RETURN((LM_ERROR,"Node4_EC (%t) could not schedule Gateway_Initializer timer\n"),-1);
+ ACE_OS::fprintf(stderr,"Node4_EC (%t) could not schedule Gateway_Initializer timer\n");
+ return -1;
}
#ifdef ACE_HAS_DSUI
@@ -281,9 +283,10 @@ int parse_args (int argc, char *argv[])
ior_output_file = ACE_OS::fopen (ior_output_filename.c_str(), "w");
if (ior_output_file == 0)
{
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to open %s for writing: %p\n",
- ior_output_filename.c_str()), -1);
+ ACE_OS::fprintf(stderr,
+ "Unable to open %s for writing: %p\n",
+ ior_output_filename.c_str());
+ return -1;
}
break;
case 'i':
@@ -303,16 +306,16 @@ int parse_args (int argc, char *argv[])
case '?':
default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "Usage: %s -s <rms|muf|edf>"
- " [-o iorfile]"
- " [-i consumer_ec_ior]"
- " [-m]"
- "\n"
- "For multiple consumers, specify -i multiple times\n"
- "If '-m' is present, this node will tell the others when to start\n",
- argv [0]),
- -1);
+ ACE_OS::fprintf(stderr,
+ "Usage: %s -s <rms|muf|edf>"
+ " [-o iorfile]"
+ " [-i consumer_ec_ior]"
+ " [-m]"
+ "\n"
+ "For multiple consumers, specify -i multiple times\n"
+ "If '-m' is present, this node will tell the others when to start\n",
+ argv [0]);
+ return -1;
}
if (ior_output_file == 0)
{
diff --git a/TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Node2_EC.cpp b/TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Node2_EC.cpp
index 24deacb24aa..666bde03c7e 100644
--- a/TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Node2_EC.cpp
+++ b/TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Node2_EC.cpp
@@ -201,7 +201,8 @@ main (int argc, char* argv[])
Node2_EC supplier_ec;
if (supplier_ec.init(time_master,sched_type.c_str(), poa.in(),orb->orb_core()->reactor()) == -1)
{
- ACE_ERROR_RETURN((LM_ERROR, "Unable to initialize Kokyu_EC"), 1);
+ ACE_OS::fprintf(stderr,"Unable to initialize Kokyu_EC");
+ return -1;
}
RtEventChannelAdmin::RtSchedEventChannel_var supplier_ec_ior =
@@ -257,7 +258,8 @@ main (int argc, char* argv[])
long timer_id = rt.reactor()->schedule_timer(ginit,0,gateway_delay);
if (timer_id < 0)
{
- ACE_ERROR_RETURN((LM_ERROR,"Node4_EC (%t) could not schedule Gateway_Initializer timer\n"),-1);
+ ACE_OS::fprintf(stderr,"Node4_EC (%t) could not schedule Gateway_Initializer timer\n");
+ return -1;
}
#ifdef ACE_HAS_DSUI
@@ -316,9 +318,10 @@ int parse_args (int argc, char *argv[])
ior_output_file = ACE_OS::fopen (ior_output_filename.c_str(), "w");
if (ior_output_file == 0)
{
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to open %s for writing: %p\n",
- ior_output_filename.c_str()), -1);
+ ACE_OS::fprintf(stderr,
+ "Unable to open %s for writing: %p\n",
+ ior_output_filename.c_str());
+ return -1;
}
break;
case 'i':
@@ -338,16 +341,16 @@ int parse_args (int argc, char *argv[])
case '?':
default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "Usage: %s -s <rms|muf|edf>"
- " [-o iorfile]"
- " [-i consumer_ec_ior]"
- " [-m]"
- "\n"
- "For multiple consumers, specify -i multiple times\n"
- "If '-m' is present, this node will tell the others when to start\n",
- argv [0]),
- -1);
+ ACE_OS::fprintf(stderr,
+ "Usage: %s -s <rms|muf|edf>"
+ " [-o iorfile]"
+ " [-i consumer_ec_ior]"
+ " [-m]"
+ "\n"
+ "For multiple consumers, specify -i multiple times\n"
+ "If '-m' is present, this node will tell the others when to start\n",
+ argv [0]);
+ return -1;
}
if (ior_output_file == 0)
{
diff --git a/TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Node3_EC.cpp b/TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Node3_EC.cpp
index d36f7b03001..937eca801a2 100644
--- a/TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Node3_EC.cpp
+++ b/TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Node3_EC.cpp
@@ -191,7 +191,8 @@ main (int argc, char* argv[])
Node3_EC supplier_ec;
if (supplier_ec.init(time_master,sched_type.c_str(), poa.in(),orb->orb_core()->reactor()) == -1)
{
- ACE_ERROR_RETURN((LM_ERROR, "Unable to initialize Kokyu_EC"), 1);
+ ACE_OS::fprintf(stderr, "Unable to initialize Kokyu_EC");
+ return -1;
}
RtEventChannelAdmin::RtSchedEventChannel_var supplier_ec_ior =
@@ -247,7 +248,8 @@ main (int argc, char* argv[])
long timer_id = rt.reactor()->schedule_timer(ginit,0,gateway_delay);
if (timer_id < 0)
{
- ACE_ERROR_RETURN((LM_ERROR,"Node4_EC (%t) could not schedule Gateway_Initializer timer\n"),-1);
+ ACE_OS::fprintf(stderr,"Node4_EC (%t) could not schedule Gateway_Initializer timer\n");
+ return -1;
}
#ifdef ACE_HAS_DSUI
@@ -306,9 +308,10 @@ int parse_args (int argc, char *argv[])
ior_output_file = ACE_OS::fopen (ior_output_filename.c_str(), "w");
if (ior_output_file == 0)
{
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to open %s for writing: %p\n",
- ior_output_filename.c_str()), -1);
+ ACE_OS::fprintf(stderr,
+ "Unable to open %s for writing: %p\n",
+ ior_output_filename.c_str());
+ return -1;
}
break;
case 'i':
@@ -328,16 +331,16 @@ int parse_args (int argc, char *argv[])
case '?':
default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "Usage: %s -s <rms|muf|edf>"
- " [-o iorfile]"
- " [-i consumer_ec_ior]"
- " [-m]"
- "\n"
- "For multiple consumers, specify -i multiple times\n"
- "If '-m' is present, this node will tell the others when to start\n",
- argv [0]),
- -1);
+ ACE_OS::fprintf(stderr,
+ "Usage: %s -s <rms|muf|edf>"
+ " [-o iorfile]"
+ " [-i consumer_ec_ior]"
+ " [-m]"
+ "\n"
+ "For multiple consumers, specify -i multiple times\n"
+ "If '-m' is present, this node will tell the others when to start\n",
+ argv [0]);
+ return -1;
}
if (ior_output_file == 0)
{
diff --git a/TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Node4_EC.cpp b/TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Node4_EC.cpp
index fb788908b86..00b6e1caa92 100644
--- a/TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Node4_EC.cpp
+++ b/TAO/orbsvcs/examples/RtEC/Federated_Kokyu/rand_work_test/Node4_EC.cpp
@@ -229,7 +229,8 @@ main (int argc, char* argv[])
Node4_EC supplier_ec;
if (supplier_ec.init(time_master,sched_type.c_str(), poa.in(),orb->orb_core()->reactor()) == -1)
{
- ACE_ERROR_RETURN((LM_ERROR, "Unable to initialize Kokyu_EC"), 1);
+ ACE_OS::fprintf(stderr, "Unable to initialize Kokyu_EC");
+ return -1;
}
RtEventChannelAdmin::RtSchedEventChannel_var supplier_ec_ior =
@@ -285,7 +286,8 @@ main (int argc, char* argv[])
long timer_id = rt.reactor()->schedule_timer(ginit,0,gateway_delay);
if (timer_id < 0)
{
- ACE_ERROR_RETURN((LM_ERROR,"Node4_EC (%t) could not schedule Gateway_Initializer timer\n"),-1);
+ ACE_OS::fprintf(stderr,"Node4_EC (%t) could not schedule Gateway_Initializer timer\n");
+ return -1;
}
#ifdef ACE_HAS_DSUI
@@ -344,9 +346,10 @@ int parse_args (int argc, char *argv[])
ior_output_file = ACE_OS::fopen (ior_output_filename.c_str(), "w");
if (ior_output_file == 0)
{
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to open %s for writing: %p\n",
- ior_output_filename.c_str()), -1);
+ ACE_OS::fprintf(stderr,
+ "Unable to open %s for writing: %p\n",
+ ior_output_filename.c_str());
+ return -1;
}
break;
case 'i':
@@ -366,16 +369,16 @@ int parse_args (int argc, char *argv[])
case '?':
default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "Usage: %s -s <rms|muf|edf>"
- " [-o iorfile]"
- " [-i consumer_ec_ior]"
- " [-m]"
- "\n"
- "For multiple consumers, specify -i multiple times\n"
- "If '-m' is present, this node will tell the others when to start\n",
- argv [0]),
- -1);
+ ACE_OS::fprintf(stderr,
+ "Usage: %s -s <rms|muf|edf>"
+ " [-o iorfile]"
+ " [-i consumer_ec_ior]"
+ " [-m]"
+ "\n"
+ "For multiple consumers, specify -i multiple times\n"
+ "If '-m' is present, this node will tell the others when to start\n",
+ argv [0]);
+ return -1;
}
if (ior_output_file == 0)
{