summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkitty <kitty@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-04-01 23:58:32 +0000
committerkitty <kitty@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-04-01 23:58:32 +0000
commit3added0842c7a9ee02390804f376735581bd6d25 (patch)
tree7de2fe1865c186171fb534807168008c5cc16cb9
parent6db09dc2d2a3939ea3b92ea8c9c678077c34d3e2 (diff)
downloadATCD-3added0842c7a9ee02390804f376735581bd6d25.tar.gz
ChangeLogTag: Sun Apr 1 18:47:32 2001 Krishnakumar B <kitty@cs.wustl.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a20
-rw-r--r--TAO/examples/Load_Balancing/Identity_i.cpp2
-rw-r--r--TAO/examples/Load_Balancing/Load_Balancer_i.cpp2
-rwxr-xr-xTAO/examples/Load_Balancing_persistent/Identity_i.cpp2
-rw-r--r--TAO/examples/Logging/Logging_Service.cpp5
-rw-r--r--TAO/examples/Logging/Logging_Test_i.cpp15
-rw-r--r--TAO/examples/Persistent_Grid/Grid_Client_i.cpp6
-rw-r--r--TAO/examples/Persistent_Grid/Persistent_Client_i.cpp8
-rw-r--r--TAO/examples/Persistent_Grid/Simple_util.cpp4
-rw-r--r--TAO/examples/Simple/bank/Bank_Client_i.cpp23
-rw-r--r--TAO/examples/Simple/chat/Server_i.cpp4
-rw-r--r--TAO/examples/Simple/chat/server.cpp31
-rw-r--r--TAO/examples/Simple/grid/Grid_Client_i.cpp4
-rw-r--r--TAO/examples/Simple/grid/Grid_i.cpp4
-rw-r--r--TAO/examples/Simulator/Event_Supplier/DualEC_Sup.cpp25
-rw-r--r--TAO/examples/Simulator/Event_Supplier/Event_Con.cpp32
16 files changed, 105 insertions, 82 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 0297433bed1..c058ba66a6e 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,23 @@
+Sun Apr 1 18:47:32 2001 Krishnakumar B <kitty@cs.wustl.edu>
+
+ *examples/Logging/Logging_Service.cpp
+ *examples/Logging/Logging_Test_i.cpp
+ *examples/Load_Balancing_persistent/Identity_i.cpp
+ *examples/Load_Balancing/Identity_i.cpp
+ *examples/Load_Balancing/Load_Balancer_i.cpp
+ *examples/Simulator/Event_Supplier/DualEC_Sup.cpp
+ *examples/Simulator/Event_Supplier/Event_Con.cpp
+ *examples/Simple/grid/Grid_Client_i.cpp
+ *examples/Simple/grid/Grid_i.cpp
+ *examples/Simple/chat/server.cpp
+ *examples/Simple/chat/Server_i.cpp
+ *examples/Simple/bank/Bank_Client_i.cpp
+ *examples/Persistent_Grid/Grid_Client_i.cpp
+ *examples/Persistent_Grid/Persistent_Client_i.cpp
+ *examples/Persistent_Grid/Simple_util.cpp
+
+ Fix ACE_TRY_ENV Fuzz script errors.
+
Sun Apr 1 16:06:15 2001 Carlos O'Ryan <coryan@uci.edu>
* tao/Messaging.pidl:
diff --git a/TAO/examples/Load_Balancing/Identity_i.cpp b/TAO/examples/Load_Balancing/Identity_i.cpp
index 8bce7e80235..20e57a25206 100644
--- a/TAO/examples/Load_Balancing/Identity_i.cpp
+++ b/TAO/examples/Load_Balancing/Identity_i.cpp
@@ -25,7 +25,7 @@ Identity_i::~Identity_i (void)
void
Identity_i::get_name (CORBA::String_out name,
- CORBA::Environment & /*ACE_TRY_ENV*/)
+ CORBA::Environment & )
ACE_THROW_SPEC ((CORBA::SystemException))
{
name = this->name_.in ();
diff --git a/TAO/examples/Load_Balancing/Load_Balancer_i.cpp b/TAO/examples/Load_Balancing/Load_Balancer_i.cpp
index 8d3383703fd..bc7d72f5827 100644
--- a/TAO/examples/Load_Balancing/Load_Balancer_i.cpp
+++ b/TAO/examples/Load_Balancing/Load_Balancer_i.cpp
@@ -214,7 +214,7 @@ Object_Group_i::~Object_Group_i (void)
}
char *
-Object_Group_i::id (CORBA::Environment & /*ACE_TRY_ENV*/)
+Object_Group_i::id (CORBA::Environment &)
ACE_THROW_SPEC ((CORBA::SystemException))
{
return CORBA::string_dup (id_.c_str ());
diff --git a/TAO/examples/Load_Balancing_persistent/Identity_i.cpp b/TAO/examples/Load_Balancing_persistent/Identity_i.cpp
index 0202b700b0a..a7b704a354a 100755
--- a/TAO/examples/Load_Balancing_persistent/Identity_i.cpp
+++ b/TAO/examples/Load_Balancing_persistent/Identity_i.cpp
@@ -27,7 +27,7 @@ Identity_i::~Identity_i (void)
void
Identity_i::get_name (CORBA::String_out name,
- CORBA::Environment & /*ACE_TRY_ENV*/)
+ CORBA::Environment &)
ACE_THROW_SPEC ((CORBA::SystemException))
{
name = this->name_.in ();
diff --git a/TAO/examples/Logging/Logging_Service.cpp b/TAO/examples/Logging/Logging_Service.cpp
index 1062798aaba..67b106d5384 100644
--- a/TAO/examples/Logging/Logging_Service.cpp
+++ b/TAO/examples/Logging/Logging_Service.cpp
@@ -17,7 +17,9 @@ main (int argc, char *argv[])
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
- if (log_server.init (argc, argv, ACE_TRY_ENV) == -1)
+ int ret = log_server.init (argc, argv, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ if (ret == -1)
return 1;
else
{
@@ -36,6 +38,7 @@ main (int argc, char *argv[])
return -1;
}
ACE_ENDTRY;
+ ACE_CHECK_RETURN (-1);
return 0;
}
diff --git a/TAO/examples/Logging/Logging_Test_i.cpp b/TAO/examples/Logging/Logging_Test_i.cpp
index ac213bbde10..70ec55cdced 100644
--- a/TAO/examples/Logging/Logging_Test_i.cpp
+++ b/TAO/examples/Logging/Logging_Test_i.cpp
@@ -31,14 +31,14 @@ Logger_Client::init (int argc, char *argv[])
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG,
+ "\nTrying to initialize orb\n"));
// Initialize the ORB
orb_ = CORBA::ORB_init (argc,
argv,
"internet",
ACE_TRY_ENV);
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "\nTrying to initialize orb\n"));
ACE_TRY_CHECK;
if (TAO_debug_level > 0)
@@ -50,13 +50,17 @@ Logger_Client::init (int argc, char *argv[])
return -1;
// Initialize the naming service
- if (this->init_naming_service (ACE_TRY_ENV) != 0)
+ int ret = this->init_naming_service (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ if (ret != 0)
ACE_ERROR_RETURN ((LM_ERROR,
" (%P|%t) Unable to initialize naming"
"services.\n"),
-1);
// Create the logger instances
- if (this->init_loggers (ACE_TRY_ENV) != 0)
+ ret = this->init_loggers (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ if (ret != 0)
ACE_ERROR_RETURN ((LM_ERROR,
" (%P|%t) Unable to initialize logger"
"instances.\n"),
@@ -68,6 +72,7 @@ Logger_Client::init (int argc, char *argv[])
return -1;
}
ACE_ENDTRY;
+ ACE_CHECK_RETURN (-1);
return 0;
diff --git a/TAO/examples/Persistent_Grid/Grid_Client_i.cpp b/TAO/examples/Persistent_Grid/Grid_Client_i.cpp
index 1aa4b1d29e6..c7f5bf8a6e3 100644
--- a/TAO/examples/Persistent_Grid/Grid_Client_i.cpp
+++ b/TAO/examples/Persistent_Grid/Grid_Client_i.cpp
@@ -102,9 +102,11 @@ Grid_Client_i::run (const char *name,
ACE_TRY_CHECK;
- if (client.shutdown () == 1)
+ if (client.shutdown () == 1) {
client->shutdown (ACE_TRY_ENV);
- // ACE_UNUSED_ARG (ret_val);
+ ACE_TRY_CHECK;
+ }
+
}
ACE_CATCH (CORBA::UserException, range_ex)
{
diff --git a/TAO/examples/Persistent_Grid/Persistent_Client_i.cpp b/TAO/examples/Persistent_Grid/Persistent_Client_i.cpp
index 1711dd5ccee..fc3a9fa015c 100644
--- a/TAO/examples/Persistent_Grid/Persistent_Client_i.cpp
+++ b/TAO/examples/Persistent_Grid/Persistent_Client_i.cpp
@@ -86,11 +86,15 @@ Persistent_Client_i::run (const char *name,
}
}
- if (client.shutdown () == 1)
+ if (client.shutdown () == 1) {
client->shutdown (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
- if (this->remove_ == 1)
+ if (this->remove_ == 1) {
client->cleanup (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
}
ACE_CATCH (CORBA::UserException, range_ex)
{
diff --git a/TAO/examples/Persistent_Grid/Simple_util.cpp b/TAO/examples/Persistent_Grid/Simple_util.cpp
index 211c9d3327a..2d43f420425 100644
--- a/TAO/examples/Persistent_Grid/Simple_util.cpp
+++ b/TAO/examples/Persistent_Grid/Simple_util.cpp
@@ -140,7 +140,9 @@ template <class Servant>int
Server<Servant>::run (CORBA::Environment &ACE_TRY_ENV)
{
// Run the main event loop for the ORB.
- if (this->orb_manager_.run (ACE_TRY_ENV) == -1)
+ int ret = this->orb_manager_.run (ACE_TRY_ENV);
+ ACE_CHECK;
+ if (ret == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"Server_i::run"),
-1);
diff --git a/TAO/examples/Simple/bank/Bank_Client_i.cpp b/TAO/examples/Simple/bank/Bank_Client_i.cpp
index 75ebde8c975..a26d169690c 100644
--- a/TAO/examples/Simple/bank/Bank_Client_i.cpp
+++ b/TAO/examples/Simple/bank/Bank_Client_i.cpp
@@ -135,17 +135,18 @@ Bank_Client_i::test_for_overdraft (CORBA::Environment &ACE_TRY_ENV)
CORBA::Float initial_bal = 100.0;
const char *name = "Name";
-
- Bank::Account_var acct_id = client->open (name,
- initial_bal,
- ACE_TRY_ENV);
- acct_id->deposit (100.00,
- ACE_TRY_ENV);
-
- acct_id->withdraw (acct_id->balance (ACE_TRY_ENV) + 20);
-
- client->close (acct_id.in (),
- ACE_TRY_ENV);
+ Bank::Account_var acct_id = client->open (name, initial_bal, ACE_TRY_ENV);
+ ACE_CHECK;
+ acct_id->deposit (100.00, ACE_TRY_ENV);
+ ACE_CHECK;
+
+ CORBA::Float bal = acct_id->balance (ACE_TRY_ENV);
+ ACE_CHECK;
+
+ acct_id->withdraw (bal + 20);
+
+ client->close (acct_id.in (), ACE_TRY_ENV);
+ ACE_CHECK;
}
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
diff --git a/TAO/examples/Simple/chat/Server_i.cpp b/TAO/examples/Simple/chat/Server_i.cpp
index 5194253d1d5..4b263b9257d 100644
--- a/TAO/examples/Simple/chat/Server_i.cpp
+++ b/TAO/examples/Simple/chat/Server_i.cpp
@@ -95,7 +95,9 @@ Server_i::run (CORBA::Environment &ACE_TRY_ENV)
"Running chat server...\n"));
// Run the main event loop for the ORB.
- if (this->orb_manager_.run (ACE_TRY_ENV) == -1)
+ int ret = this->orb_manager_.run (ACE_TRY_ENV);
+ ACE_CHECK_RETURN (-1);
+ if (ret == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"Server_i::run"),
-1);
diff --git a/TAO/examples/Simple/chat/server.cpp b/TAO/examples/Simple/chat/server.cpp
index fe8731c6af8..fa51ab64883 100644
--- a/TAO/examples/Simple/chat/server.cpp
+++ b/TAO/examples/Simple/chat/server.cpp
@@ -22,26 +22,23 @@
int
main (int argc, char *argv[])
{
+
ACE_TRY_NEW_ENV
{
Server_i server_i;
- if (server_i.init (argc, argv, ACE_TRY_ENV) != 0)
- {
- ACE_TRY_CHECK;
-
- ACE_ERROR_RETURN ((LM_ERROR,
- "\n error in init.\n"),
- 1);
- }
- if (server_i.run (ACE_TRY_ENV) != 0)
- {
- ACE_TRY_CHECK;
-
- ACE_ERROR_RETURN ((LM_ERROR,
- "\n error in run.\n"),
- 1);
- }
+ int ret = server_i.init (argc, argv, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ if (ret != 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "\n error in init.\n"),
+ 1);
+ ret = server_i.run (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ if (ret != 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "\n error in run.\n"),
+ 1);
}
ACE_CATCHANY
{
@@ -50,6 +47,6 @@ main (int argc, char *argv[])
return 1;
}
ACE_ENDTRY;
-
+ ACE_CHECK_RETURN (0);
return 0;
}
diff --git a/TAO/examples/Simple/grid/Grid_Client_i.cpp b/TAO/examples/Simple/grid/Grid_Client_i.cpp
index a7ff9586c46..a49bde05e8c 100644
--- a/TAO/examples/Simple/grid/Grid_Client_i.cpp
+++ b/TAO/examples/Simple/grid/Grid_Client_i.cpp
@@ -106,8 +106,10 @@ Grid_Client_i::run (const char *name,
ACE_ASSERT (ret_val == value_);
- if (client.shutdown () == 1)
+ if (client.shutdown () == 1) {
client->shutdown (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
ACE_UNUSED_ARG (ret_val);
}
ACE_CATCH (CORBA::UserException, range_ex)
diff --git a/TAO/examples/Simple/grid/Grid_i.cpp b/TAO/examples/Simple/grid/Grid_i.cpp
index 1a4e4cc157d..69c41677c49 100644
--- a/TAO/examples/Simple/grid/Grid_i.cpp
+++ b/TAO/examples/Simple/grid/Grid_i.cpp
@@ -205,5 +205,7 @@ Grid_Factory_i::make_grid (CORBA::Short width,
ACE_CHECK_RETURN (Grid::_nil ());
// Register the Grid pointer.
- return grid_ptr->_this (ACE_TRY_ENV);
+ Grid_ptr gptr = grid_ptr->_this (ACE_TRY_ENV);
+ ACE_CHECK_RETURN (0);
+ return gptr;
}
diff --git a/TAO/examples/Simulator/Event_Supplier/DualEC_Sup.cpp b/TAO/examples/Simulator/Event_Supplier/DualEC_Sup.cpp
index 2cbc8ef362e..39a215e7104 100644
--- a/TAO/examples/Simulator/Event_Supplier/DualEC_Sup.cpp
+++ b/TAO/examples/Simulator/Event_Supplier/DualEC_Sup.cpp
@@ -299,20 +299,10 @@ DualEC_Supplier::init ()
// Private class that implements a termination servant.
void
-DualEC_Supplier::Terminator::shutdown (CORBA::Environment &ACE_TRY_ENV)
+DualEC_Supplier::Terminator::shutdown (CORBA::Environment &)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- ACE_UNUSED_ARG (ACE_TRY_ENV);
-
- ACE_TRY
- {
- TAO_ORB_Core_instance ()->orb ()->shutdown ();
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
+ TAO_ORB_Core_instance ()->orb ()->shutdown ();
}
@@ -321,16 +311,7 @@ DualEC_Supplier::Terminator::shutdown (CORBA::Environment &ACE_TRY_ENV)
void *
DualEC_Supplier::run_orb (void *)
{
- ACE_TRY_NEW_ENV
- {
- TAO_ORB_Core_instance ()->orb ()->run ();
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
-
+ TAO_ORB_Core_instance ()->orb ()->run ();
return 0;
}
diff --git a/TAO/examples/Simulator/Event_Supplier/Event_Con.cpp b/TAO/examples/Simulator/Event_Supplier/Event_Con.cpp
index 54d7ac3efbe..b3de9ace56b 100644
--- a/TAO/examples/Simulator/Event_Supplier/Event_Con.cpp
+++ b/TAO/examples/Simulator/Event_Supplier/Event_Con.cpp
@@ -59,7 +59,8 @@ int
Demo_Consumer::open_consumer (RtecEventChannelAdmin::EventChannel_ptr ec,
const char *my_name)
{
- ACE_TRY_NEW_ENV
+ ACE_DECLARE_NEW_CORBA_ENV;
+ ACE_TRY
{
// Get a Scheduler.
@@ -67,8 +68,8 @@ Demo_Consumer::open_consumer (RtecEventChannelAdmin::EventChannel_ptr ec,
ACE_Scheduler_Factory::server ();
// Define Real-time information.
-
rt_info_ = server->create (my_name, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
server->set (rt_info_,
RtecScheduler::VERY_LOW_CRITICALITY,
@@ -81,6 +82,7 @@ Demo_Consumer::open_consumer (RtecEventChannelAdmin::EventChannel_ptr ec,
1,
RtecScheduler::OPERATION,
ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Create the event that we're registering for.
@@ -134,7 +136,7 @@ Demo_Consumer::open_consumer (RtecEventChannelAdmin::EventChannel_ptr ec,
-1);
}
ACE_ENDTRY;
-
+ ACE_CHECK_RETURN (0);
return 0;
}
@@ -186,28 +188,28 @@ Demo_Consumer::push (const RtecEventComm::EventSet &events,
ACE_TRY_CHECK;
cout << "TCKind: " << kind << endl;
- if (_tc_Navigation->equal (events[i].data.any_value.type(), ACE_TRY_ENV))
+ int ret = _tc_Navigation->equal (events[i].data.any_value.type(), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ if (ret)
{
- ACE_TRY_CHECK;
Navigation *navigation_ = (Navigation*) events[i].data.any_value.value ();
-
cout << "Found a Navigation struct in the any: pos_lat = " << navigation_->position_latitude << endl;
}
- else if (_tc_Weapons->equal (events[i].data.any_value.type(), ACE_TRY_ENV))
- {
- ACE_TRY_CHECK;
- Weapons *weapons_ = (Weapons*) events[i].data.any_value.value ();
-
- cout << "Found a Navigation struct in the any: pos_lat = " << weapons_->number_of_weapons << endl;
+ else {
+ ret = (_tc_Weapons->equal (events[i].data.any_value.type(), ACE_TRY_ENV));
+ ACE_TRY_CHECK;
+ if (ret) {
+ Weapons *weapons_ = (Weapons*) events[i].data.any_value.value ();
+ cout << "Found a Navigation struct in the any: pos_lat = " << weapons_->number_of_weapons << endl;
}
-
-
- }
+ }
+ }
ACE_CATCHANY
{
ACE_ERROR ((LM_ERROR, "(%t)Error in extracting the Navigation and Weapons data.\n"));
}
ACE_ENDTRY;
+ ACE_CHECK;
}
}
}