summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2006-10-26 12:00:43 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2006-10-26 12:00:43 +0000
commitc58d2c33e6ba13cdcf9e0a210770ff7fa236fe85 (patch)
tree4a6d60c11839f3b0b15ec837614e9b346fe09663
parent351146d4983d966f42449913d6b8649dde4b728a (diff)
downloadATCD-c58d2c33e6ba13cdcf9e0a210770ff7fa236fe85.tar.gz
-rw-r--r--TAO/orbsvcs/tests/Event/UDP/Consumer.cpp8
-rw-r--r--TAO/orbsvcs/tests/Event/UDP/Supplier.cpp2
-rw-r--r--TAO/orbsvcs/tests/Event/UDP/receiver.cpp21
-rw-r--r--TAO/orbsvcs/tests/Event/UDP/sender.cpp2
4 files changed, 7 insertions, 26 deletions
diff --git a/TAO/orbsvcs/tests/Event/UDP/Consumer.cpp b/TAO/orbsvcs/tests/Event/UDP/Consumer.cpp
index a4152a7aae8..1ede1681c6c 100644
--- a/TAO/orbsvcs/tests/Event/UDP/Consumer.cpp
+++ b/TAO/orbsvcs/tests/Event/UDP/Consumer.cpp
@@ -105,8 +105,8 @@ Consumer::push (const RtecEventComm::EventSet& events
ValueTypeData * test_data = 0;
if (events[i].data.any_value >>= test_data)
{
- ACE_DEBUG ((LM_DEBUG, "Consumer (%P|%t): Received a message: %s\n",
- test_data->data ()));
+ ACE_DEBUG ((LM_DEBUG, "Consumer (%P|%t): Received message <%d>: %s\n",
+ events[i].header.source, test_data->data ()));
if (ACE_OS::strcmp (test_data->data (), "ACE/TAO/CIAO") != 0)
{
ACE_ERROR ((LM_ERROR, "Consumer (%P|%t): ERROR received not expected message\n"));
@@ -122,8 +122,8 @@ Consumer::push (const RtecEventComm::EventSet& events
char* mystring = 0;
if (events[i].data.any_value >>= mystring)
{
- ACE_DEBUG ((LM_DEBUG, "Consumer (%P|%t): Received a message: %s\n",
- mystring));
+ ACE_DEBUG ((LM_DEBUG, "Consumer (%P|%t): Received message <%d>: %s\n",
+ events[i].header.source, mystring));
if (ACE_OS::strcmp (mystring, "ACE/TAO/CIAO") != 0)
{
ACE_ERROR ((LM_ERROR, "Consumer (%P|%t): ERROR received not expected message\n"));
diff --git a/TAO/orbsvcs/tests/Event/UDP/Supplier.cpp b/TAO/orbsvcs/tests/Event/UDP/Supplier.cpp
index 6fff5e241a8..9a1888df558 100644
--- a/TAO/orbsvcs/tests/Event/UDP/Supplier.cpp
+++ b/TAO/orbsvcs/tests/Event/UDP/Supplier.cpp
@@ -77,7 +77,7 @@ Supplier::perform_push (ACE_ENV_SINGLE_ARG_DECL)
RtecEventComm::EventSet event (1);
event.length (1);
event[0].header.type = ACE_ES_EVENT_UNDEFINED;
- event[0].header.source = 1;
+ event[0].header.source = event_count_;
// Avoid loops throught the event channel federations
event[0].header.ttl = 1;
diff --git a/TAO/orbsvcs/tests/Event/UDP/receiver.cpp b/TAO/orbsvcs/tests/Event/UDP/receiver.cpp
index fa0be235577..e538b520a3f 100644
--- a/TAO/orbsvcs/tests/Event/UDP/receiver.cpp
+++ b/TAO/orbsvcs/tests/Event/UDP/receiver.cpp
@@ -7,7 +7,6 @@
#include "orbsvcs/Event/EC_Event_Channel.h"
#include "orbsvcs/Event/EC_Default_Factory.h"
#include "orbsvcs/Event/ECG_Mcast_EH.h"
-#include "orbsvcs/Event/ECG_UDP_Sender.h"
#include "orbsvcs/Event/ECG_UDP_Receiver.h"
#include "orbsvcs/Event/ECG_UDP_Out_Endpoint.h"
#include "tao/ORB_Core.h"
@@ -133,7 +132,7 @@ main (int argc, char* argv[])
// convert that into the right IDL structure:
ACE_INET_Addr udp_addr (udp_mcast_address);
ACE_DEBUG ((LM_DEBUG,
- "Multicast address is: %s\n",
+ "udp mcast address is: %s\n",
udp_mcast_address));
RtecUDPAdmin::UDP_Addr addr;
addr.ipaddr = udp_addr.get_ip_address ();
@@ -145,22 +144,7 @@ main (int argc, char* argv[])
as_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- // We need a local socket to send the data, open it and check
- // that everything is OK:
TAO_ECG_Refcounted_Endpoint endpoint(new TAO_ECG_UDP_Out_Endpoint);
- if (endpoint->dgram ().open (ACE_Addr::sap_any) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR, "Cannot open send endpoint\n"),
- 1);
- }
-
- // Now we setup the sender:
- TAO_EC_Servant_Var<TAO_ECG_UDP_Sender> sender = TAO_ECG_UDP_Sender::create();
- sender->init (event_channel.in (),
- address_server.in (),
- endpoint
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Now we connect the sender as a consumer of events, it will
// receive any event from any source and send it to the "right"
@@ -174,9 +158,6 @@ main (int argc, char* argv[])
sub.dependencies[0].event.header.source =
ACE_ES_EVENT_SOURCE_ANY; // Any source is OK
- sender->connect (sub ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
// To receive events we need to setup an event handler:
TAO_EC_Servant_Var<TAO_ECG_UDP_Receiver> receiver = TAO_ECG_UDP_Receiver::create();
TAO_ECG_Mcast_EH mcast_eh (&(*receiver));
diff --git a/TAO/orbsvcs/tests/Event/UDP/sender.cpp b/TAO/orbsvcs/tests/Event/UDP/sender.cpp
index 6f3f7e3ddee..e0f5fa6e977 100644
--- a/TAO/orbsvcs/tests/Event/UDP/sender.cpp
+++ b/TAO/orbsvcs/tests/Event/UDP/sender.cpp
@@ -132,7 +132,7 @@ main (int argc, char* argv[])
// convert that into the right IDL structure:
ACE_INET_Addr udp_addr (udp_mcast_address);
ACE_DEBUG ((LM_DEBUG,
- "Multicast address is: %s\n",
+ "udp mcast address is: %s\n",
udp_mcast_address));
RtecUDPAdmin::UDP_Addr addr;
addr.ipaddr = udp_addr.get_ip_address ();