summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjohnc <johnc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-08-22 19:54:48 +0000
committerjohnc <johnc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-08-22 19:54:48 +0000
commit7f72573113a36418e3bc1bce54ea85d74d8a1972 (patch)
treedbf3217aa3db9e481d675be90d73fef9c4ddea2f
parent675777432ff9a92cab218ee7704c10a030978301 (diff)
downloadATCD-7f72573113a36418e3bc1bce54ea85d74d8a1972.tar.gz
Tue Aug 22 19:39:07 UTC 2006 Ciju John <john@ociweb.com>
-rw-r--r--TAO/ChangeLog14
-rw-r--r--TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumerMain.cpp19
-rw-r--r--TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplierMain.cpp28
-rw-r--r--TAO/tao/Wait_On_Read.cpp6
-rw-r--r--TAO/tests/Oneway_Timeouts/client.cpp2
5 files changed, 50 insertions, 19 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 26383e56f1d..edeb5e99b42 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,17 @@
+Tue Aug 22 19:39:07 UTC 2006 Ciju John <john@ociweb.com>
+
+ * orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumerMain.cpp:
+ * orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplierMain.cpp:
+ For increased portability replaced iostream API with ACE IO
+ macros.
+
+ * tao/Wait_On_Read.cpp:
+ If reactor registration fails, the 'is_registered_' flag
+ shouldn't be set.
+
+ * tests/Oneway_Timeouts/client.cpp:
+ Std header <cmath> is contains the signature for std::abs ().
+
Tue Aug 22 14:57:18 UTC 2006 Phil Mesnier <mesnier_p@ociweb.com>
* tests/Oneway_Timeouts/client.cpp:
diff --git a/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumerMain.cpp b/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumerMain.cpp
index 077d4505c1a..511f9ba1594 100644
--- a/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumerMain.cpp
+++ b/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumerMain.cpp
@@ -11,7 +11,6 @@
#include <orbsvcs/Event_Utilities.h>
#include <orbsvcs/CosNamingC.h>
-#include <iostream>
const RtecEventComm::EventSourceID MY_SOURCE_ID = ACE_ES_EVENT_SOURCE_ANY + 1;
const RtecEventComm::EventType MY_EVENT_TYPE = ACE_ES_EVENT_UNDEFINED + 1;
@@ -30,7 +29,8 @@ int main (int argc, char* argv[])
if (argv[i+1] != 0) {
ecname = argv[i+1];
} else {
- std::cerr << "Missing Event channel name" << std::endl;
+ ACE_ERROR ((LM_ERROR,
+ "Missing Event channel name\n"));
}
}
}
@@ -46,10 +46,12 @@ int main (int argc, char* argv[])
RtecEventChannelAdmin::EventChannel_var ec =
RtecEventChannelAdmin::EventChannel::_narrow(obj.in());
if (CORBA::is_nil(ec.in())) {
- std::cerr << "Could not narrow EchoEventChannel." << std::endl;
- return 1;
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Could not narrow EchoEventChannel.\n"),
+ 1);
}
- std::cout << "EchoEventConsumerMain.cpp: Found the EchoEventChannel." << std::endl;
+ ACE_DEBUG ((LM_DEBUG,
+ "EchoEventConsumerMain.cpp: Found the EchoEventChannel.\n"));
// Obtain a reference to the consumer administration object.
RtecEventChannelAdmin::ConsumerAdmin_var admin = ec->for_consumers();
@@ -84,7 +86,8 @@ int main (int argc, char* argv[])
PortableServer::POAManager_var poa_manager = poa->the_POAManager();
poa_manager->activate();
- std::cout << "EchoEventConsumerMain.cpp: Ready to receive events..." << std::endl;
+ ACE_DEBUG ((LM_DEBUG,
+ "EchoEventConsumerMain.cpp: Ready to receive events...\n"));
// Enter the ORB event loop.
orb->run();
@@ -102,7 +105,9 @@ int main (int argc, char* argv[])
}
catch (CORBA::Exception& exc)
{
- std::cerr << "Caught CORBA::Exception" << std::endl << exc << std::endl;
+ ACE_ERROR ((LM_ERROR,
+ "Caught CORBA::Exception\n%s (%s)\n",
+ exc._name (), exc._rep_id ()));
}
return 1;
diff --git a/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplierMain.cpp b/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplierMain.cpp
index 316493b3f4c..a8aeeaa652a 100644
--- a/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplierMain.cpp
+++ b/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplierMain.cpp
@@ -22,7 +22,6 @@
#include "tao/ORB_Core.h"
#include "ace/Auto_Ptr.h"
-#include <iostream>
#include <fstream>
const RtecEventComm::EventSourceID MY_SOURCE_ID = ACE_ES_EVENT_SOURCE_ANY + 1;
@@ -53,28 +52,32 @@ int main (int argc, char* argv[])
i++;
ecname = argv[i];
} else {
- std::cerr << "Missing Event channel name" << std::endl;
+ ACE_ERROR ((LM_ERROR,
+ "Missing Event channel name\n"));
}
} else if (strcmp(argv[i], "-address") == 0) {
if (argv[i+1] != 0) {
i++;
address = argv[i];
} else {
- std::cerr << "Missing address" << std::endl;
+ ACE_ERROR ((LM_ERROR,
+ "Missing address\n"));
}
} else if (strcmp(argv[i], "-port") == 0) {
if (argv[i+1] != 0) {
i++;
port = ACE_OS::atoi(argv[i]);
} else {
- std::cerr << "Missing port" << std::endl;
+ ACE_ERROR ((LM_ERROR,
+ "Missing port\n"));
}
} else if (strcmp(argv[i], "-listenport") == 0) {
if (argv[i+1] != 0) {
i++;
listenport = ACE_OS::atoi(argv[i]);
} else {
- std::cerr << "Missing port" << std::endl;
+ ACE_ERROR ((LM_ERROR,
+ "Missing port\n"));
}
} else if (strcmp(argv[i], "-iorfile") == 0) {
if (argv[i+1] != 0) {
@@ -145,8 +148,9 @@ int main (int argc, char* argv[])
TAO_ECG_UDP_Sender::create();
TAO_ECG_UDP_Out_Endpoint endpoint;
if (endpoint.dgram ().open (ACE_Addr::sap_any) == -1) {
- std::cerr << "Cannot open send endpoint" << std::endl;
- return 1;
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Cannot open send endpoint\n"),
+ 1);
}
// TAO_ECG_UDP_Sender::init() takes a TAO_ECG_Refcounted_Endpoint.
@@ -196,7 +200,8 @@ int main (int argc, char* argv[])
udp_eh->reactor (orb->orb_core ()->reactor ());
ACE_INET_Addr local_addr (listenport);
if (udp_eh->open (local_addr) == -1) {
- std::cerr << "Cannot open EH" << std::endl;
+ ACE_ERROR ((LM_ERROR,
+ "Cannot open EH\n"));
}
ACE_AUTO_PTR_RESET(eh,udp_eh.release(),ACE_Event_Handler);
//eh.reset(udp_eh.release());
@@ -223,7 +228,8 @@ int main (int argc, char* argv[])
iorFile << str.in() << std::endl;
iorFile.close();
}
- std::cout << "Starting main loop" << std::endl;
+ ACE_DEBUG ((LM_DEBUG,
+ "Starting main loop\n"));
const int EVENT_DELAY_MS = 10;
@@ -239,7 +245,9 @@ int main (int argc, char* argv[])
}
catch (CORBA::Exception& exc)
{
- std::cerr << "Caught CORBA::Exception" << std::endl << exc << std::endl;
+ ACE_ERROR ((LM_ERROR,
+ "Caught CORBA::Exception\n%s (%s)\n",
+ exc._name (), exc._rep_id ()));
}
return 1;
}
diff --git a/TAO/tao/Wait_On_Read.cpp b/TAO/tao/Wait_On_Read.cpp
index a3c641d9579..59148d35766 100644
--- a/TAO/tao/Wait_On_Read.cpp
+++ b/TAO/tao/Wait_On_Read.cpp
@@ -103,8 +103,10 @@ TAO_Wait_On_Read::wait (ACE_Time_Value * max_wait_time,
ACE_TEXT ("registration with reactor returned an error \n"),
this->transport_->id ()));
}
-
- this->is_registered_ = true;
+ else {
+ // Only set this flag when registration succeeds
+ this->is_registered_ = true;
+ }
return 0;
}
diff --git a/TAO/tests/Oneway_Timeouts/client.cpp b/TAO/tests/Oneway_Timeouts/client.cpp
index 86aac9d4dd4..0d2c2d24ad0 100644
--- a/TAO/tests/Oneway_Timeouts/client.cpp
+++ b/TAO/tests/Oneway_Timeouts/client.cpp
@@ -9,6 +9,8 @@
#include "ace/High_Res_Timer.h"
#include "ace/Arg_Shifter.h"
+#include <cmath>
+
using namespace CORBA;
using namespace PortableServer;