summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Cleeland <chris.cleeland@gmail.com>1998-02-26 21:04:17 +0000
committerChris Cleeland <chris.cleeland@gmail.com>1998-02-26 21:04:17 +0000
commitfd52c14f878a20c817be6ebf3a2db24ec5076bf0 (patch)
treee0be35e5872dc8fb410bd09d799138f97ed93b0e
parentaf136865e66d105a348f130f2a0290ea43681bbf (diff)
downloadATCD-fd52c14f878a20c817be6ebf3a2db24ec5076bf0.tar.gz
* tests/NestedUpcall/client.cpp: Added calls to invoke the new
decrement operation. * tests/NestedUpcall/Reactor.idl: Added a new operation, decrement, to test multi-nested upcalls. * tao/connect.cpp (send_request): Fixed to return appropriate return values, especially in case of errors.
-rw-r--r--TAO/ChangeLog-98c16
-rw-r--r--TAO/tests/NestedUpcall/Reactor.idl10
-rw-r--r--TAO/tests/NestedUpcall/client.cpp4
-rw-r--r--TAO/tests/NestedUpcall/eh_i.cpp18
-rw-r--r--TAO/tests/NestedUpcall/eh_i.h6
-rw-r--r--TAO/tests/NestedUpcall/reactor_i.cpp17
-rw-r--r--TAO/tests/NestedUpcall/reactor_i.h6
7 files changed, 75 insertions, 2 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c
index 099452e52f1..aeeeacd8b97 100644
--- a/TAO/ChangeLog-98c
+++ b/TAO/ChangeLog-98c
@@ -1,3 +1,17 @@
+Thu Feb 26 14:52:20 1998 Chris Cleeland <cleeland@cs.wustl.edu>
+
+ * tests/NestedUpcall/{eh_i,reactor_i}.{h,cpp}: Added
+ implementation for the new decrement operation.
+
+ * tests/NestedUpcall/client.cpp: Added calls to invoke the new
+ decrement operation.
+
+ * tests/NestedUpcall/Reactor.idl: Added a new operation,
+ decrement, to test multi-nested upcalls.
+
+ * tao/connect.cpp (send_request): Fixed to return appropriate
+ return values, especially in case of errors.
+
Thu Feb 26 14:02:36 1998 Nanbor Wang <nanbor@cs.wustl.edu>
* tao/tao_util.cpp (activate_under_child_poa): Instead of
@@ -7,7 +21,7 @@ Thu Feb 26 14:02:36 1998 Nanbor Wang <nanbor@cs.wustl.edu>
Thu Feb 26 13:31:06 1998 David L. Levine <levine@cs.wustl.edu>
- * TAO_IDL/Makefile: added "all" target for CROSS-COMPILE platforms.
+ * TAO_IDL/Makefile: added "all" target for CROSS-COMPILE platforms.
Thu Feb 26 05:39:43 1998 Nanbor Wang <nanbor@cs.wustl.edu>
diff --git a/TAO/tests/NestedUpcall/Reactor.idl b/TAO/tests/NestedUpcall/Reactor.idl
index 015ed72bec1..50dc56a61de 100644
--- a/TAO/tests/NestedUpcall/Reactor.idl
+++ b/TAO/tests/NestedUpcall/Reactor.idl
@@ -21,11 +21,17 @@
//
// ============================================================================
+interface Reactor;
+
interface EventHandler
{
Long peer ();
// Returns an integer corresponding to the event handler's file
// descriptor.
+
+ UShort decrement (in Reactor r, in UShort num);
+ // Decrements <num> by invoking the <decrement> operation on <r>
+ // and returning that value, finally stopping when it gets to zero.
};
interface Reactor
@@ -35,4 +41,8 @@ interface Reactor
oneway void set_value ();
// do-nothing oneway to check for proper operation.
+
+ UShort decrement (in EventHandler eh, in UShort num);
+ // Decrements <num> by invoking the <decrement> operation on <eh>
+ // and returning that value, finally stopping when it gets to zero.
};
diff --git a/TAO/tests/NestedUpcall/client.cpp b/TAO/tests/NestedUpcall/client.cpp
index 03dfb40b76f..9a0aae552ec 100644
--- a/TAO/tests/NestedUpcall/client.cpp
+++ b/TAO/tests/NestedUpcall/client.cpp
@@ -155,7 +155,9 @@ main (int argc, char *argv[])
remote_reactor->set_value (TAO_TRY_ENV);
TAO_CHECK_ENV;
-
+
+ remote_reactor->decrement (eh, 5, TAO_TRY_ENV);
+ TAO_CHECK_ENV;
}
TAO_CATCHANY
{
diff --git a/TAO/tests/NestedUpcall/eh_i.cpp b/TAO/tests/NestedUpcall/eh_i.cpp
index 493f0622882..8066d840ce8 100644
--- a/TAO/tests/NestedUpcall/eh_i.cpp
+++ b/TAO/tests/NestedUpcall/eh_i.cpp
@@ -26,3 +26,21 @@ EventHandler_i::peer (CORBA::Environment &env)
return val;
}
+
+CORBA::UShort
+EventHandler_i::decrement (Reactor_ptr eh,
+ CORBA::UShort num,
+ CORBA::Environment &env)
+{
+ CORBA::UShort ret;
+ if (--num <= 0)
+ ret = 0;
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) EventHandler::decrement() invoking Reactor::decrement(%d)\n", num));
+ ret = eh->decrement (_this (env), num, env);
+ }
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) EventHandler::decrement() returning %d\n", ret));
+ return ret;
+}
+
diff --git a/TAO/tests/NestedUpcall/eh_i.h b/TAO/tests/NestedUpcall/eh_i.h
index 79464871ed2..3be2aa8f3ca 100644
--- a/TAO/tests/NestedUpcall/eh_i.h
+++ b/TAO/tests/NestedUpcall/eh_i.h
@@ -19,6 +19,12 @@ public:
virtual CORBA::Long peer (CORBA::Environment &env);
// Return some value...doesn't matter what.
+
+ virtual CORBA::UShort decrement (Reactor_ptr eh,
+ CORBA::UShort num,
+ CORBA::Environment &env);
+ // deccrement <num> by calling decrement thru <eh> until zero is
+ // reached, then return.
};
#endif /* EVENTHANDLER_I_H */
diff --git a/TAO/tests/NestedUpcall/reactor_i.cpp b/TAO/tests/NestedUpcall/reactor_i.cpp
index 5e3ec28bf37..7b0f16a97f0 100644
--- a/TAO/tests/NestedUpcall/reactor_i.cpp
+++ b/TAO/tests/NestedUpcall/reactor_i.cpp
@@ -50,3 +50,20 @@ Reactor_i::set_value (CORBA::Environment &env)
"(%P|%t) doing Reactor_i::set_value()\n"));
}
+CORBA::UShort
+Reactor_i::decrement (EventHandler_ptr eh,
+ CORBA::UShort num,
+ CORBA::Environment &env)
+{
+ CORBA::UShort ret;
+ if (--num <= 0)
+ ret = 0;
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) Reactor::decrement() invoking EventHandler::decrement(%d)\n", num));
+ ret = eh->decrement (_this (env), num, env);
+ }
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) Reactor_i::decrement() returning %d\n", ret));
+ return ret;
+}
+
diff --git a/TAO/tests/NestedUpcall/reactor_i.h b/TAO/tests/NestedUpcall/reactor_i.h
index e6a8e130a0f..ac4ca1e6b06 100644
--- a/TAO/tests/NestedUpcall/reactor_i.h
+++ b/TAO/tests/NestedUpcall/reactor_i.h
@@ -22,6 +22,12 @@ public:
// Register (with nothing...it's an example!)
virtual void set_value (CORBA::Environment &env);
+
+ virtual CORBA::UShort decrement (EventHandler_ptr eh,
+ CORBA::UShort num,
+ CORBA::Environment &env);
+ // deccrement <num> by calling decrement thru <eh> until zero is
+ // reached, then return.
};
#endif /* REACTOR_I_H */