summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authoriliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-01-20 20:04:59 +0000
committeriliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-01-20 20:04:59 +0000
commit63600f7612f8754643cc888fa4acd1e7eb343304 (patch)
tree931dc9608e07a668b862771ddcf3f685b1b95de0 /TAO
parentc3f61e2a0a1e5c739da17cd856f4bfa75b548e03 (diff)
downloadATCD-63600f7612f8754643cc888fa4acd1e7eb343304.tar.gz
Merged revisions 80425,80430-80431,80433,80441,80443-80444,80447,80449,80461,80463 via svnmerge from
https://svn.dre.vanderbilt.edu/DOC/Middleware/trunk/TAO ........ r80425 | vzykov | 2008-01-14 08:10:19 -0600 (Mon, 14 Jan 2008) | 1 line ChangeLogTag: Mon Jan 14 14:02:44 UTC 2008 Vladimir Zykov <vladimir.zykov@prismtech.com> ........ r80430 | johnc | 2008-01-15 12:34:08 -0600 (Tue, 15 Jan 2008) | 1 line ChangeLogTag: Tue Jan 15 18:33:20 UTC 2008 Ciju John <johnc at ociweb dot com> ........ r80431 | johnnyw | 2008-01-15 13:06:41 -0600 (Tue, 15 Jan 2008) | 1 line Tue Jan 15 19:05:12 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl> ........ r80433 | johnc | 2008-01-15 13:48:17 -0600 (Tue, 15 Jan 2008) | 1 line ChangeLogTag: Tue Jan 15 19:49:31 UTC 2008 Ciju John <johnc at ociweb dot com> ........ r80441 | johnnyw | 2008-01-16 12:13:50 -0600 (Wed, 16 Jan 2008) | 1 line Wed Jan 16 18:12:12 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl> ........ r80443 | johnnyw | 2008-01-16 13:23:21 -0600 (Wed, 16 Jan 2008) | 1 line Wed Jan 16 19:22:12 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl> ........ r80444 | parsons | 2008-01-16 13:36:00 -0600 (Wed, 16 Jan 2008) | 1 line ChangeLogTag: Wed Jan 16 19:31:54 UTC 2008 Jeff Parsons <j.parsons@vanderbilt.edu> ........ r80447 | parsons | 2008-01-16 14:03:45 -0600 (Wed, 16 Jan 2008) | 1 line ChangeLogTag: Wed Jan 16 20:02:29 UTC 2008 Jeff Parsons <j.parsons@vanderbilt.edu> ........ r80449 | johnnyw | 2008-01-16 14:17:50 -0600 (Wed, 16 Jan 2008) | 1 line Wed Jan 16 20:16:12 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl> ........ r80461 | vzykov | 2008-01-18 04:02:47 -0600 (Fri, 18 Jan 2008) | 1 line ChangeLogTag: Fri Jan 18 09:57:52 UTC 2008 Vladimir Zykov <vladimir.zykov@prismtech.com> ........ r80463 | parsons | 2008-01-18 13:59:25 -0600 (Fri, 18 Jan 2008) | 1 line ChangeLogTag: Fri Jan 18 19:52:51 UTC 2008 Jeff Parsons <j.parsons@vanderbilt.edu> ........
Diffstat (limited to 'TAO')
-rw-r--r--TAO/ChangeLog130
-rw-r--r--TAO/TAO_IDL/ast/ast_expression.cpp104
-rw-r--r--TAO/TAO_IDL/util/utl_global.cpp203
-rw-r--r--TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp2
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp2
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Credentials.cpp3
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp4
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current_Impl.cpp4
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp8
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Invocation_Interceptor.cpp11
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp13
-rw-r--r--TAO/orbsvcs/tests/Security/Big_Request/TX_Object.idl3
-rw-r--r--TAO/orbsvcs/tests/Security/Big_Request/TX_Object_i.cpp3
-rw-r--r--TAO/orbsvcs/tests/Security/Big_Request/client.cpp83
-rwxr-xr-xTAO/orbsvcs/tests/Security/Big_Request/run_test.pl9
-rw-r--r--TAO/tao/CSD_Framework/CSD_POA.cpp2
-rw-r--r--TAO/tao/CSD_Framework/CSD_Strategy_Base.h21
-rw-r--r--TAO/tao/CSD_Framework/CSD_Strategy_Proxy.h9
-rw-r--r--TAO/tao/CSD_ThreadPool/CSD_TP_Strategy.h25
-rw-r--r--TAO/tao/CSD_ThreadPool/CSD_TP_Task.cpp22
-rw-r--r--TAO/tao/CSD_ThreadPool/CSD_TP_Task.h4
-rw-r--r--TAO/tao/Transport_Cache_Manager.cpp24
-rw-r--r--TAO/tao/default_resource.cpp6
-rw-r--r--TAO/tao/default_resource.h6
-rw-r--r--TAO/tao/orbconf.h2
-rw-r--r--TAO/tests/Bug_2826_Regression/bug_2826_regression.cpp2
-rwxr-xr-xTAO/tests/Bug_3154_Regression/run_test.pl4
-rw-r--r--TAO/tests/Bug_3193_Regression/Bug_3193_Regression.mpc31
-rw-r--r--TAO/tests/Bug_3193_Regression/README6
-rw-r--r--TAO/tests/Bug_3193_Regression/client.cpp223
-rwxr-xr-xTAO/tests/Bug_3193_Regression/run_test.pl56
-rw-r--r--TAO/tests/Bug_3193_Regression/server.cpp98
-rw-r--r--TAO/tests/Bug_3193_Regression/svc.conf2
-rw-r--r--TAO/tests/Bug_3193_Regression/test.idl12
-rw-r--r--TAO/tests/Bug_3193_Regression/test_i.cpp36
-rw-r--r--TAO/tests/Bug_3193_Regression/test_i.h45
-rw-r--r--TAO/tests/Bug_3198_Regression/Bug_3198_Regression.mpc8
-rw-r--r--TAO/tests/Bug_3198_Regression/bug_3198_regression.cpp112
-rwxr-xr-xTAO/tests/Bug_3198_Regression/run_test.pl31
-rw-r--r--TAO/tests/Exposed_Policies/client.cpp4
-rw-r--r--TAO/tests/IDL_Test/constants.idl12
41 files changed, 1185 insertions, 200 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index dd314bea9dc..de8da790407 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,133 @@
+Fri Jan 18 19:52:51 UTC 2008 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * orbsvcs/IFR_Service/ifr_adding_visitor.cpp(visit_interface):
+
+ Added additional check before destroying the IFR contents of
+ an interface entry that has not been previously forward
+ declared. If the interface is from an included IDL file, we
+ leave the contents alone. Thanks to Chris Cleeland
+ <cleeland at ociweb dot com> for reporting the problem that
+ results when another IDL file with the same included file is
+ processed and the contents of the interface (an operation for
+ example) are not found in the IFR.
+
+Fri Jan 18 09:57:52 UTC 2008 Vladimir Zykov <vladimir.zykov@prismtech.com>
+
+ * tests/Bug_3154_Regression/run_test.pl:
+ * TAO_IDL/util/utl_global.cpp:
+ Updated a fix for bug 3154 with respect to the problem
+ that was found lately. I.e. application of custom endings
+ to ORB files when user provides ORB specific include paths
+ either with -I option on in INCLUDE environment variable.
+ The test is updated as well.
+
+Wed Jan 16 20:16:12 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * tests/Bug_3198_Regression/bug_3198_regression.cpp:
+ Check whether we get the transient exception as we should
+
+ * tests/Exposed_Policies/client.cpp:
+ use prefix increment
+
+Wed Jan 16 20:02:29 UTC 2008 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * tests/IDL_Test/constants.idl:
+
+ Added example IDL mentioned in
+
+ Wed Jan 16 19:31:54 UTC 2008 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+Wed Jan 16 19:31:54 UTC 2008 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/ast/ast_expression.cpp:
+
+ Fixed bug in coercion of typedef'd unsigned short IDL constant,
+ having an rhs consisting of a bitwise OR expression made up
+ of previously declared constants of the same type. Thanks to
+ Nayeem Khan <d dot nayeem dot khan at gmail dot com> for
+ reporting the problem and supplying example IDL.
+
+Wed Jan 16 19:22:12 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * tao/CSD_Framework/CSD_POA.cpp:
+ * tao/CSD_Framework/CSD_Strategy_Base.h:
+ * tao/CSD_Framework/CSD_Strategy_Proxy.h:
+ * tao/CSD_ThreadPool/CSD_TP_Strategy.h:
+ * tao/CSD_ThreadPool/CSD_TP_Task.cpp:
+ * tao/CSD_ThreadPool/CSD_TP_Task.h:
+ Layout changes
+
+ * tao/default_resource.{h,cpp}:
+ Changed dynamically_allocated_reactor to a real bool
+
+ * tao/orbconf.h:
+ Fixed typo in comment
+
+ * tao/Transport_Cache_Manager.cpp:
+ Layout and const changes
+
+Wed Jan 16 18:12:12 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * tests/Bug_3198_Regression/*:
+ New test, thanks to Hans Utz <hutz at arc dot nasa dot gov>
+ for reporting this problem
+
+ * orbsvcs/tests/Security/Big_Request/client.cpp:
+ Added -x option to indicate that the client has to shutdown the
+ server
+
+ * orbsvcs/tests/Security/Big_Request/run_test.pl:
+ Added -x
+
+ * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp:
+ Layout changes and corrected an ACE_DEBUG to be an ACE_ERROR
+
+ * tests/Bug_2826_Regression/bug_2826_regression.cpp:
+ No need to pass in an empty orb name
+
+Tue Jan 15 19:49:31 UTC 2008 Ciju John <johnc at ociweb dot com>
+
+ * tests/Bug_3193_Regression/test_i.h:
+ * tests/Bug_3193_Regression/test_i.cpp:
+ Remove Fuzz build errors.
+
+Tue Jan 15 19:05:12 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp:
+ * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current_Impl.cpp:
+ Const changes
+
+ * orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp:
+ Initialise some pointers with 0
+
+ * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp:
+ Const changes and use ACE_ERROR
+
+ * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Invocation_Interceptor.cpp:
+ Layout changes
+
+ * orbsvcs/tests/Security/Big_Request/client.cpp:
+ Extended this client to be able to specify the number of
+ iterations and the size of the data send
+
+ * orbsvcs/tests/Security/Big_Request/TX_Object.idl:
+ Use CORBA::OctetSeq
+
+ * orbsvcs/tests/Security/Big_Request/TX_Object_i.cpp:
+ Layout changes
+
+Tue Jan 15 18:33:20 UTC 2008 Ciju John <johnc at ociweb dot com>
+
+ * tests/Bug_3193_Regression:
+ New regression for Bug 3193.
+
+Mon Jan 14 14:02:44 UTC 2008 Vladimir Zykov <vladimir.zykov@prismtech.com>
+
+ * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Credentials.cpp:
+ Changed a bit a fix for bug 3165. It happens that ASN1_INTEGER_to_BN
+ unconditionally allocates BIGNUM and thus that BIGNUM has to be
+ freed unconditionally too.
+
Mon Jan 14 01:04:17 UTC 2008 William R. Otte <wotte@dre.vanderbilt.edu>
* TAO_IDL/TAO_IDL.mwc:
diff --git a/TAO/TAO_IDL/ast/ast_expression.cpp b/TAO/TAO_IDL/ast/ast_expression.cpp
index 679d345211f..f15a39888dd 100644
--- a/TAO/TAO_IDL/ast/ast_expression.cpp
+++ b/TAO/TAO_IDL/ast/ast_expression.cpp
@@ -2057,8 +2057,10 @@ AST_Expression::eval_bit_op (AST_Expression::EvalKind ek)
AST_ExprValue,
0);
+ switch (ek)
+ {
#if !defined (ACE_LACKS_LONGLONG_T)
- if (ek == EK_ulonglong)
+ case EK_ulonglong:
{
this->pd_v1->set_ev (this->pd_v1->coerce (EV_ulonglong));
this->pd_v2->set_ev (this->pd_v2->coerce (EV_ulonglong));
@@ -2090,7 +2092,9 @@ AST_Expression::eval_bit_op (AST_Expression::EvalKind ek)
return 0;
}
}
- else if (ek == EK_longlong)
+
+ break;
+ case EK_longlong:
{
this->pd_v1->set_ev (this->pd_v1->coerce (EV_longlong));
this->pd_v2->set_ev (this->pd_v2->coerce (EV_longlong));
@@ -2122,9 +2126,10 @@ AST_Expression::eval_bit_op (AST_Expression::EvalKind ek)
return 0;
}
}
- else
-#endif
- if (ek == EK_ulong)
+
+ break;
+#endif /* !defined (ACE_LACKS_LONGLONG_T) */
+ case EK_ulong:
{
this->pd_v1->set_ev (this->pd_v1->coerce (EV_ulong));
this->pd_v2->set_ev (this->pd_v2->coerce (EV_ulong));
@@ -2156,7 +2161,9 @@ AST_Expression::eval_bit_op (AST_Expression::EvalKind ek)
return 0;
}
}
- else if (ek == EK_long)
+
+ break;
+ case EK_long:
{
this->pd_v1->set_ev (this->pd_v1->coerce (EV_long));
this->pd_v2->set_ev (this->pd_v2->coerce (EV_long));
@@ -2188,7 +2195,77 @@ AST_Expression::eval_bit_op (AST_Expression::EvalKind ek)
return 0;
}
}
- else if (ek == EK_bool)
+
+ break;
+ case EK_ushort:
+ {
+ this->pd_v1->set_ev (this->pd_v1->coerce (EV_ushort));
+ this->pd_v2->set_ev (this->pd_v2->coerce (EV_ushort));
+ retval->et = EV_ushort;
+
+ switch (this->pd_ec)
+ {
+ case EC_or:
+ retval->u.usval =
+ this->pd_v1->ev ()->u.usval | this->pd_v2->ev ()->u.usval;
+ break;
+ case EC_xor:
+ retval->u.usval =
+ this->pd_v1->ev ()->u.usval ^ this->pd_v2->ev ()->u.usval;
+ break;
+ case EC_and:
+ retval->u.usval =
+ this->pd_v1->ev ()->u.usval & this->pd_v2->ev ()->u.usval;
+ break;
+ case EC_left:
+ retval->u.usval =
+ this->pd_v1->ev ()->u.usval << this->pd_v2->ev ()->u.usval;
+ break;
+ case EC_right:
+ retval->u.usval =
+ this->pd_v1->ev ()->u.usval >> this->pd_v2->ev ()->u.usval;
+ break;
+ default:
+ return 0;
+ }
+ }
+
+ break;
+ case EK_short:
+ {
+ this->pd_v1->set_ev (this->pd_v1->coerce (EV_short));
+ this->pd_v2->set_ev (this->pd_v2->coerce (EV_short));
+ retval->et = EV_short;
+
+ switch (this->pd_ec)
+ {
+ case EC_or:
+ retval->u.sval =
+ this->pd_v1->ev ()->u.sval | this->pd_v2->ev ()->u.sval;
+ break;
+ case EC_xor:
+ retval->u.sval =
+ this->pd_v1->ev ()->u.sval ^ this->pd_v2->ev ()->u.sval;
+ break;
+ case EC_and:
+ retval->u.sval =
+ this->pd_v1->ev ()->u.sval & this->pd_v2->ev ()->u.sval;
+ break;
+ case EC_left:
+ retval->u.sval =
+ this->pd_v1->ev ()->u.sval << this->pd_v2->ev ()->u.sval;
+ break;
+ case EC_right:
+ retval->u.sval =
+ this->pd_v1->ev ()->u.sval >> this->pd_v2->ev ()->u.sval;
+ break;
+ default:
+ return 0;
+ }
+ }
+
+ break;
+ case EK_bool:
{
this->pd_v1->set_ev (this->pd_v1->coerce (EV_bool));
this->pd_v2->set_ev (this->pd_v2->coerce (EV_bool));
@@ -2220,7 +2297,9 @@ AST_Expression::eval_bit_op (AST_Expression::EvalKind ek)
return 0;
}
}
- else if (ek == EK_octet)
+
+ break;
+ case EK_octet:
{
this->pd_v1->set_ev (this->pd_v1->coerce (EV_octet));
this->pd_v2->set_ev (this->pd_v2->coerce (EV_octet));
@@ -2261,10 +2340,11 @@ AST_Expression::eval_bit_op (AST_Expression::EvalKind ek)
return 0;
}
}
- else
- {
- return 0;
- }
+
+ break;
+ default:
+ return 0;
+ }
return retval;
}
diff --git a/TAO/TAO_IDL/util/utl_global.cpp b/TAO/TAO_IDL/util/utl_global.cpp
index ae4da67cc87..403970affa0 100644
--- a/TAO/TAO_IDL/util/utl_global.cpp
+++ b/TAO/TAO_IDL/util/utl_global.cpp
@@ -1861,18 +1861,71 @@ IDL_GlobalData::open_included_file (char const * filename,
return f;
}
+static bool
+is_include_file_found (ACE_CString & inc_file,
+ UTL_String * idl_file_name,
+ IDL_GlobalData * global)
+{
+ char abspath[MAXPATHLEN] = "";
+ char *full_path = 0;
+
+ // If the include path has literal "s (because of an include
+ // of a Windows path with spaces), we must remove them here.
+ const char *tmp_inc_file = inc_file.c_str ();
+ if (tmp_inc_file && global->hasspace (tmp_inc_file) && tmp_inc_file[0] == '\"')
+ {
+ inc_file =
+ inc_file.substr (1, inc_file.length () - 2);
+ }
+
+ // If there are trailing directory separators in inc_file then
+ // remove them here.
+ size_t pos = inc_file.length () == 0 ? 0 : inc_file.length () - 1;
+ while (inc_file[pos] == ACE_DIRECTORY_SEPARATOR_CHAR)
+ {
+ --pos;
+ }
+ if (static_cast<ssize_t> (inc_file.length () - 1 - pos) > 0)
+ {
+ inc_file =
+ inc_file.substr (0, inc_file.length () - pos);
+ }
+
+ inc_file += ACE_DIRECTORY_SEPARATOR_STR;
+ inc_file += idl_file_name->get_string ();
+ full_path =
+ ACE_OS::realpath (inc_file.c_str (), abspath);
+
+ if (full_path != 0)
+ {
+ FILE *test = ACE_OS::fopen (abspath, "r");
+ if (test == 0)
+ {
+ ACE_OS::fclose (test);
+ return false;
+ }
+ else
+ {
+ ACE_OS::fclose (test);
+ return true;
+ }
+ }
+
+ return false;
+}
+
bool
-IDL_GlobalData::validate_orb_include (UTL_String *idl_file_name)
+IDL_GlobalData::validate_orb_include (UTL_String * idl_file_name)
{
- // It's important to update the check of include_counter
- // at the end of this method once new TAO include dirs are
- // added somewhere in driver/drv_preproc.cpp
+ // It's important to update the check of include_counter when
+ // we decide which group is processed once new TAO include dirs
+ // are added somewhere in driver/drv_preproc.cpp
// Count number of includes in environment variable.
// If the way how INCLUDE environment variable is processed
// will change in fe/fe_init.cpp:FE_store_env_include_paths ()
// then the below do/while loop has to be changed accordingly.
- int env_includes = 1;
+ unsigned int env_includes = 0;
ACE_Env_Value<char*> incl_paths ("INCLUDE",
(char *) 0);
const char *aggr_str = incl_paths;
@@ -1887,22 +1940,79 @@ IDL_GlobalData::validate_orb_include (UTL_String *idl_file_name)
do
{
aggr_str = ACE_OS::strchr (aggr_str, separator);
- env_includes++;
+ ++env_includes;
} while (aggr_str != 0 && aggr_str++);
}
- char abspath[MAXPATHLEN] = "";
- char *full_path = 0;
+ // We try to search for idl_file_name in several folders in the
+ // following order.
+ // 1) Current folder (include_counter == 0). If idl_file_name is
+ // found here then it's definitely not TAO specific. Return false.
+ // 2) Those includes that were extracted from INCLUDE environment
+ // variable if one existed (include_counter >= 1 && include_counter
+ // < env_includes + 1). If idl_file_name is found here then
+ // we have to check if its complete path is not equal to any of
+ // those in group 3 or 5.
+ // 3) $TAO_ROOT, $TAO_ROOT/tao
+ // (include_counter >= env_includes + 1 && include_counter <
+ // env_includes + 3). Return true if nothing was found in group
+ // 2 and idl_file_name is found here OR idl_file_name was found
+ // in group 2 and path is the same as here.
+ // 4) User specific includes i.e. those that were provided with -I
+ // option (include_counter >= env_includes + 3 && include_counter
+ // < include_paths_.size () - 2). If idl_file_name is found here
+ // then check for existence of the same path in group 5.
+ // 5) $TAO_ROOT/orbsvcs, $TAO_ROOT/CIAO, $TAO_ROOT/CIAO/ciao
+ // (include_counter >= include_paths_.size () - 2 && include_counter
+ // < include_paths_.size () + 1). Return true if nothing was found
+ // in groups 2 or 4 and idl_file_name is found here OR idl_file_name
+ // was found in groups 2 or 4 and path is the same as here.
+ // Return false if idl_file_name was found neither in groups 3 nor 5.
+
+ char foundpath[MAXPATHLEN] = "";
unsigned int include_counter = 0;
- for (ACE_Unbounded_Queue_Iterator<char *>iter (
- this->include_paths_
- );
- !iter.done (); )
+ for (ACE_Unbounded_Queue_Iterator<char *>iter (this->include_paths_);
+ !iter.done (); ++include_counter)
{
- ACE_CString partial;
+ unsigned int inc_group = 0;
if (include_counter == 0)
{
+ inc_group = 1;
+ }
+ else if (include_counter >= 1 &&
+ include_counter < env_includes + 1)
+ {
+ inc_group = 2;
+ }
+ else if (include_counter >= env_includes + 1 &&
+ include_counter < env_includes + 3)
+ {
+ inc_group = 3;
+ }
+ else if (include_counter >= env_includes + 3 &&
+ include_counter < this->include_paths_.size () - 2)
+ {
+ inc_group = 4;
+ }
+ else if (include_counter >= this->include_paths_.size () - 2 &&
+ include_counter < this->include_paths_.size () + 1)
+ {
+ inc_group = 5;
+ }
+
+ // We don't need to check anything in groups 2 and 4 if
+ // foundpath was already set and we only have to check
+ // whether it belongs to groups 3 or 5.
+ if (foundpath[0] != 0 && (inc_group == 2 || inc_group == 4))
+ {
+ continue;
+ }
+
+ ACE_CString partial;
+ if (inc_group == 1)
+ {
+ char abspath[MAXPATHLEN] = "";
char *path_tmp = ACE_OS::getcwd (abspath, MAXPATHLEN);
partial = path_tmp;
}
@@ -1914,49 +2024,48 @@ IDL_GlobalData::validate_orb_include (UTL_String *idl_file_name)
partial = *path_tmp;
}
- // If the include path has literal "s (because of an include
- // of a Windows path with spaces), we must remove them here.
- const char *tmp_partial = partial.c_str ();
- if (tmp_partial && this->hasspace (tmp_partial) && tmp_partial[0] == '\"')
- {
- partial =
- partial.substr (1, partial.length () - 2);
- }
-
- partial += ACE_DIRECTORY_SEPARATOR_STR;
- partial += idl_file_name->get_string ();
- full_path =
- ACE_OS::realpath (partial.c_str (), abspath);
-
- if (full_path != 0)
+ if (is_include_file_found (partial, idl_file_name, this))
{
- FILE *test = ACE_OS::fopen (abspath, "r");
-
- if (test == 0)
+ // 1)
+ if (inc_group == 1)
{
- ++include_counter;
+ return false;
+ }
+ // 2)
+ else if (inc_group == 2)
+ {
+ // We can fill in foundpath here since we are sure
+ // that it was not set before. Check above ensures that.
+ ACE_OS::strcpy (foundpath, partial.c_str ());
continue;
}
-
- ACE_OS::fclose (test);
-
- // This file name is an orb file if it is either in first 2
- // dirs (i.e. $TAO_ROOT, $TAO_ROOT/tao) or in
- // last 3 dirs (i.e. $TAO_ROOT/orbsvcs, $TAO_ROOT/CIAO,
- // $TAO_ROOT/CIAO/ciao)
- if (include_counter != 0 &&
- (include_counter - env_includes <= 2 ||
- include_counter - env_includes >= this->include_paths_.size () - 3))
+ // 3)
+ else if (inc_group == 3)
{
- return true;
+ if (foundpath[0] == 0 ||
+ ACE_OS::strcmp (foundpath, partial.c_str ()) == 0)
+ {
+ return true;
+ }
}
- else
+ // 4)
+ else if (inc_group == 4)
{
- return false;
+ // We can fill in foundpath here since we are sure
+ // that it was not set before. Check above ensures that.
+ ACE_OS::strcpy (foundpath, partial.c_str ());
+ continue;
+ }
+ // 5)
+ else if (inc_group == 5)
+ {
+ if (foundpath[0] == 0 ||
+ ACE_OS::strcmp (foundpath, partial.c_str ()) == 0)
+ {
+ return true;
+ }
}
}
-
- ++include_counter;
}
return false;
diff --git a/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp b/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp
index d1cb1f29540..39b5f19cc69 100644
--- a/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp
+++ b/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp
@@ -287,7 +287,7 @@ ifr_adding_visitor::visit_interface (AST_Interface *node)
// On the other hand, if prev_def is NOT the node type, we go
// ahead an attempt to create an interface, which will get an
// exception from the IFR, as the spec requires.
- if (!node->ifr_fwd_added ())
+ if (!node->ifr_fwd_added () && !node->imported ())
{
CORBA::DefinitionKind kind = prev_def->def_kind ();
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp
index 374e03542f0..cf5896260cf 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp
@@ -282,7 +282,7 @@ TAO::SSLIOP::Connection_Handler::handle_timeout (const ACE_Time_Value &,
// We don't use this upcall for I/O. This is only used by the
// Connector to indicate that the connection timedout. Therefore,
// we should call close().
- int ret = this->close ();
+ int const ret = this->close ();
this->reset_state (TAO_LF_Event::LFS_TIMEOUT);
return ret;
}
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Credentials.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Credentials.cpp
index c4763bb1a25..1b6a4d0ede2 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Credentials.cpp
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Credentials.cpp
@@ -37,8 +37,6 @@ TAO::SSLIOP_Credentials::SSLIOP_Credentials (::X509 *cert, ::EVP_PKEY *evp)
{
char * id = BN_bn2hex (bn);
- BN_free(bn);
-
ACE_CString s =
ACE_CString ("X509: ")
+ ACE_CString (const_cast<const char *> (id));
@@ -53,6 +51,7 @@ TAO::SSLIOP_Credentials::SSLIOP_Credentials (::X509 *cert, ::EVP_PKEY *evp)
CRYPTO_free (id);
#endif /* OPENSSL_free */
}
+ BN_free (bn);
// -------------------------------------------
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp
index 8f80d4dfd5f..321c571255d 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp
@@ -135,7 +135,7 @@ TAO::SSLIOP::CredentialsAcquirer::get_credentials (CORBA::Boolean on_list)
{
this->check_validity ();
- ::SSLIOP::AuthData *data;
+ ::SSLIOP::AuthData *data = 0;
if (!(this->acquisition_arguments_ >>= data))
throw CORBA::BAD_PARAM ();
@@ -161,7 +161,7 @@ TAO::SSLIOP::CredentialsAcquirer::get_credentials (CORBA::Boolean on_list)
throw CORBA::BAD_PARAM ();
}
- TAO::SSLIOP::OwnCredentials * creds;
+ TAO::SSLIOP::OwnCredentials * creds = 0;
ACE_NEW_THROW_EX (creds,
TAO::SSLIOP::OwnCredentials (x509.in (), evp.in ()),
CORBA::NO_MEMORY ());
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current_Impl.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current_Impl.cpp
index 6712f7ac78b..e625059d78c 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current_Impl.cpp
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current_Impl.cpp
@@ -88,7 +88,7 @@ TAO::SSLIOP::Current_Impl::get_peer_certificate_chain (
if (certs == 0)
return;
- const int chain_length = sk_X509_num (certs);
+ int const chain_length = sk_X509_num (certs);
cert_chain->length (chain_length);
// Copy the peer certificate chain to the SSLIOP::SSL_Cert
@@ -99,7 +99,7 @@ TAO::SSLIOP::Current_Impl::get_peer_certificate_chain (
::X509 *x = sk_X509_value (certs, i);
// Get the size of the ASN.1 encoding.
- const int cert_length = ::i2d_X509 (x, 0);
+ int const cert_length = ::i2d_X509 (x, 0);
if (cert_length <= 0)
continue; // @@ What do we do if there is an error?
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp
index db6fa0500aa..46c017fdd67 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp
@@ -96,8 +96,7 @@ TAO::SSLIOP::Protocol_Factory::make_acceptor (void)
// Parses a X509 path. Beware: This function modifies
// the buffer pointed to by arg!
int
-TAO::SSLIOP::Protocol_Factory::parse_x509_file (char *arg,
- char **path)
+TAO::SSLIOP::Protocol_Factory::parse_x509_file (char *arg, char **path)
{
ACE_ASSERT (arg != 0);
ACE_ASSERT (path != 0);
@@ -117,8 +116,7 @@ TAO::SSLIOP::Protocol_Factory::parse_x509_file (char *arg,
int
-TAO::SSLIOP::Protocol_Factory::init (int argc,
- char* argv[])
+TAO::SSLIOP::Protocol_Factory::init (int argc, char* argv[])
{
char *certificate_path = 0;
char *private_key_path = 0;
@@ -161,7 +159,7 @@ TAO::SSLIOP::Protocol_Factory::init (int argc,
session_id_len))
{
if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_ERROR,
+ ACE_ERROR ((LM_ERROR,
ACE_TEXT ("TAO (%P|%t) Unable to set the session id ")
ACE_TEXT ("context to \'%s\'\n"), session_id_context_));
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Invocation_Interceptor.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Invocation_Interceptor.cpp
index ddcf5182e5e..558678817af 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Invocation_Interceptor.cpp
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Invocation_Interceptor.cpp
@@ -150,7 +150,6 @@ TAO::SSLIOP::Server_Invocation_Interceptor::receive_request (
CORBA::ORBid_var orb_id = ri->orb_id ();
CORBA::OctetSeq_var adapter_id = ri->adapter_id ();
CORBA::OctetSeq_var object_id = ri->object_id ();
-
CORBA::String_var operation_name = ri->operation ();
CORBA::Boolean it_should_happen = false;
@@ -160,12 +159,14 @@ TAO::SSLIOP::Server_Invocation_Interceptor::receive_request (
cred_list,
operation_name.in());
if (TAO_debug_level >= 3)
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) SL2::access_allowed_ex returned %s\n",
- it_should_happen ? "true" : "false"));
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) SL2::access_allowed_ex returned %s\n",
+ it_should_happen ? "true" : "false"));
+ }
if (! it_should_happen)
- throw CORBA::NO_PERMISSION ();
+ throw CORBA::NO_PERMISSION ();
}
}
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp
index bf1594f9bbd..c6ad8629fb3 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp
@@ -157,9 +157,9 @@ TAO::SSLIOP::Transport::send_message (TAO_OutputCDR &stream,
if (n == -1)
{
if (TAO_debug_level)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO: (%P|%t|%N|%l) closing transport ")
- ACE_TEXT ("%d after fault %p\n"),
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("TAO (%P|%t) - SSLIOP_Transport::send_message, ")
+ ACE_TEXT ("closing transport %d after fault %p\n"),
this->id (),
ACE_TEXT ("send_message ()\n")));
@@ -244,13 +244,11 @@ TAO::SSLIOP::Transport::set_bidir_context_info (
// Check whether it is a IIOP acceptor
if ((*acceptor)->tag () == IOP::TAG_INTERNET_IOP)
{
- if (this->get_listen_point (listen_point_list,
- *acceptor) == -1)
+ if (this->get_listen_point (listen_point_list, *acceptor) == -1)
{
ACE_ERROR ((LM_ERROR,
"TAO (%P|%t) - SSLIOP_Transport::set_bidir_info, ",
"error getting listen_point \n"));
-
return;
}
}
@@ -296,8 +294,7 @@ TAO::SSLIOP::Transport::get_listen_point (
// Get the local address of the connection
ACE_INET_Addr local_addr;
{
- if (this->connection_handler_->peer ().get_local_addr (local_addr)
- == -1)
+ if (this->connection_handler_->peer ().get_local_addr (local_addr) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("(%P|%t) Could not resolve local host")
diff --git a/TAO/orbsvcs/tests/Security/Big_Request/TX_Object.idl b/TAO/orbsvcs/tests/Security/Big_Request/TX_Object.idl
index 5a1b4019323..d9c7441a64a 100644
--- a/TAO/orbsvcs/tests/Security/Big_Request/TX_Object.idl
+++ b/TAO/orbsvcs/tests/Security/Big_Request/TX_Object.idl
@@ -13,8 +13,9 @@
*/
//=============================================================================
+#include <OctetSeq.pidl>
-typedef sequence<octet> DataSeq;
+typedef CORBA::OctetSeq DataSeq;
interface TX_Object
{
diff --git a/TAO/orbsvcs/tests/Security/Big_Request/TX_Object_i.cpp b/TAO/orbsvcs/tests/Security/Big_Request/TX_Object_i.cpp
index d0500b4c774..4cea1fa04b9 100644
--- a/TAO/orbsvcs/tests/Security/Big_Request/TX_Object_i.cpp
+++ b/TAO/orbsvcs/tests/Security/Big_Request/TX_Object_i.cpp
@@ -2,7 +2,6 @@
#include "TX_Object_i.h"
-
ACE_RCSID (Big_Request,
TX_Object_i,
"$Id$")
@@ -38,7 +37,7 @@ TX_Object_i::recv (DataSeq_out data)
(*data) = this->data_;
ACE_DEBUG ((LM_DEBUG,
- "Sending octet sequence of length:\t%u\n",
+ "Sending octet sequence of length:\t%u\n",
data->length ()));
}
diff --git a/TAO/orbsvcs/tests/Security/Big_Request/client.cpp b/TAO/orbsvcs/tests/Security/Big_Request/client.cpp
index 2385f7bf3db..844af0f98cb 100644
--- a/TAO/orbsvcs/tests/Security/Big_Request/client.cpp
+++ b/TAO/orbsvcs/tests/Security/Big_Request/client.cpp
@@ -10,11 +10,14 @@ ACE_RCSID (Big_Request,
const char *ior = "file://test.ior";
const char *cert_file = "cacert.pem";
+long number_iterations = 1;
+long data_size = 3461724;
+bool shutdown_server = false;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Opt get_opts (argc, argv, "k:i:d:x");
int c;
while ((c = get_opts ()) != -1)
@@ -23,11 +26,23 @@ parse_args (int argc, char *argv[])
case 'k':
ior = get_opts.opt_arg ();
break;
+ case 'i':
+ number_iterations = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
+ case 'd':
+ data_size = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
+ case 'x':
+ shutdown_server = true;
+ break;
case '?':
default:
ACE_ERROR_RETURN ((LM_ERROR,
"Usage: %s "
"-k <ior> "
+ "-i <iterations> "
+ "-d <datasize> "
+ "-x shutdown "
"\n",
argv [0]),
-1);
@@ -64,39 +79,49 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
DataSeq data_input;
- const CORBA::ULong len = 3461724;
+ CORBA::ULong const len = data_size;
data_input.length (len);
// Fill in some useless data.
for (CORBA::ULong i = 0; i < len; ++i)
- data_input[i] = i % 9;
-
- ACE_DEBUG ((LM_DEBUG,
- "Sending octet sequence of length:\t%u\n",
- data_input.length ()));
-
- txObject->send (data_input);
-
- DataSeq_var data_output;
-
- txObject->recv (data_output.out ());
-
- ACE_DEBUG ((LM_DEBUG,
- "Received octet sequence of length:\t%u\n",
- data_output->length ()));
-
- txObject->shutdown ();
-
- // Sanity check
- if (data_output->length () != len
- || ACE_OS::memcmp (data_input.get_buffer (),
- data_output->get_buffer (),
- len) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Received octet sequence does not match "
- "the one that was sent.\n"),
- -1);
+ {
+ data_input[i] = i % 9;
+ }
+
+ for (int iteration = 0; iteration < number_iterations; ++iteration)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Sending octet sequence of length:\t%u\n",
+ data_input.length ()));
+
+ txObject->send (data_input);
+
+ DataSeq_var data_output;
+
+ txObject->recv (data_output.out ());
+
+ ACE_DEBUG ((LM_DEBUG,
+ "Received octet sequence of length:\t%u\n",
+ data_output->length ()));
+
+ // Sanity check
+ if (data_output->length () != len
+ || ACE_OS::memcmp (data_input.get_buffer (),
+ data_output->get_buffer (),
+ len) != 0)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "ERROR: Received octet sequence does not match "
+ "the one that was sent.\n"),
+ -1);
+ }
+ }
+
+ if (shutdown_server)
+ {
+ txObject->shutdown ();
+ }
}
catch (const CORBA::Exception& ex)
{
diff --git a/TAO/orbsvcs/tests/Security/Big_Request/run_test.pl b/TAO/orbsvcs/tests/Security/Big_Request/run_test.pl
index c7ef946c795..69f3343f458 100755
--- a/TAO/orbsvcs/tests/Security/Big_Request/run_test.pl
+++ b/TAO/orbsvcs/tests/Security/Big_Request/run_test.pl
@@ -9,7 +9,8 @@ use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::Run_Test;
$status = 0;
-$file = PerlACE::LocalFile ("test.ior");
+$filebase = "test.ior";
+$file = PerlACE::LocalFile ("$filebase");
unlink $file;
@@ -21,9 +22,9 @@ $status = 0;
#$ENV{'SSL_CERT_FILE'} = 'cacert.pem';
$SV = new PerlACE::Process ("server",
- "-o $file -ORBSvcConf server$PerlACE::svcconf_ext");
+ "-o $file -ORBSvcConf server$PerlACE::svcconf_ext");
$CL = new PerlACE::Process ("client",
- "-ORBSvcConf client$PerlACE::svcconf_ext -k file://$file");
+ "-ORBSvcConf client$PerlACE::svcconf_ext -k file://$file -x");
print STDERR "\n\n==== Running SSLIOP Big_Request test\n";
@@ -42,7 +43,7 @@ if ($client != 0) {
$status = 1;
}
-$server = $SV->WaitKill (5);
+$server = $SV->WaitKill (15);
if ($server != 0) {
print STDERR "ERROR: server returned $server\n";
diff --git a/TAO/tao/CSD_Framework/CSD_POA.cpp b/TAO/tao/CSD_Framework/CSD_POA.cpp
index d2f8656b11b..f7f7f454f67 100644
--- a/TAO/tao/CSD_Framework/CSD_POA.cpp
+++ b/TAO/tao/CSD_Framework/CSD_POA.cpp
@@ -103,7 +103,7 @@ void TAO_CSD_POA::poa_deactivated_hook ()
}
void TAO_CSD_POA::servant_activated_hook (PortableServer::Servant servant,
- const PortableServer::ObjectId& oid)
+ const PortableServer::ObjectId& oid)
{
this->sds_proxy_->servant_activated_event (servant, oid);
}
diff --git a/TAO/tao/CSD_Framework/CSD_Strategy_Base.h b/TAO/tao/CSD_Framework/CSD_Strategy_Base.h
index 2be8ab259fa..8e6cc8daa0a 100644
--- a/TAO/tao/CSD_Framework/CSD_Strategy_Base.h
+++ b/TAO/tao/CSD_Framework/CSD_Strategy_Base.h
@@ -89,8 +89,7 @@ namespace TAO
const PortableServer::ObjectId& object_id,
PortableServer::POA_ptr poa,
const char* operation,
- PortableServer::Servant servant
- ) = 0;
+ PortableServer::Servant servant) = 0;
/// Subclass provides implementation to dispatch a collocated request.
virtual DispatchResult dispatch_collocated_request_i
@@ -98,8 +97,7 @@ namespace TAO
const PortableServer::ObjectId& object_id,
PortableServer::POA_ptr poa,
const char* operation,
- PortableServer::Servant servant
- ) = 0;
+ PortableServer::Servant servant) = 0;
/// Event - The POA has been activated.
virtual bool poa_activated_event_i() = 0;
@@ -110,14 +108,12 @@ namespace TAO
/// Event - A servant has been activated.
virtual void servant_activated_event_i
(PortableServer::Servant servant,
- const PortableServer::ObjectId& oid
- );
+ const PortableServer::ObjectId& oid);
/// Event - A servant has been deactivated.
virtual void servant_deactivated_event_i
(PortableServer::Servant servant,
- const PortableServer::ObjectId& oid
- );
+ const PortableServer::ObjectId& oid);
private:
@@ -130,8 +126,7 @@ namespace TAO
/// This CSD Strategy_Base has been asked to dispatch a (collocated or remote)
/// request.
void dispatch_request(TAO_ServerRequest& server_request,
- ::TAO::Portable_Server::Servant_Upcall& upcall
- );
+ ::TAO::Portable_Server::Servant_Upcall& upcall);
/// Event - The POA has been activated. This happens when the POA_Manager
/// is activated.
@@ -143,14 +138,12 @@ namespace TAO
/// Event - A servant has been activated.
void servant_activated_event(PortableServer::Servant servant,
- const PortableServer::ObjectId& oid
- );
+ const PortableServer::ObjectId& oid);
/// Event - A servant has been deactivated. This also occurs when
/// the POA is destroyed.
void servant_deactivated_event(PortableServer::Servant servant,
- const PortableServer::ObjectId& oid
- );
+ const PortableServer::ObjectId& oid);
/// The POA to which this strategy has been applied.
::PortableServer::POA_var poa_;
diff --git a/TAO/tao/CSD_Framework/CSD_Strategy_Proxy.h b/TAO/tao/CSD_Framework/CSD_Strategy_Proxy.h
index dd0ed342610..848b170b94d 100644
--- a/TAO/tao/CSD_Framework/CSD_Strategy_Proxy.h
+++ b/TAO/tao/CSD_Framework/CSD_Strategy_Proxy.h
@@ -72,8 +72,7 @@ namespace TAO
/// invocation + one conditional (an is_nil() call/comparison for truth on
/// the smart pointer to the custom dispatching strategy object).
void dispatch_request(TAO_ServerRequest& server_request,
- TAO::Portable_Server::Servant_Upcall& upcall
- );
+ TAO::Portable_Server::Servant_Upcall& upcall);
/// Event - The POA has been (or is being) activated.
@@ -84,13 +83,11 @@ namespace TAO
/// Event - A servant has been activated.
void servant_activated_event(PortableServer::Servant servant,
- const PortableServer::ObjectId& oid
- );
+ const PortableServer::ObjectId& oid);
/// Event - A servant has been deactivated.
void servant_deactivated_event(PortableServer::Servant servant,
- const PortableServer::ObjectId& oid
- );
+ const PortableServer::ObjectId& oid);
private:
diff --git a/TAO/tao/CSD_ThreadPool/CSD_TP_Strategy.h b/TAO/tao/CSD_ThreadPool/CSD_TP_Strategy.h
index 0b927f9d0cd..108a15f88f2 100644
--- a/TAO/tao/CSD_ThreadPool/CSD_TP_Strategy.h
+++ b/TAO/tao/CSD_ThreadPool/CSD_TP_Strategy.h
@@ -90,21 +90,18 @@ namespace TAO
/// (dispatched or cancelled) or rejected.
/// Will return REQUEST_EXECUTED, REQUEST_CANCELLED, or REQUEST_REJECTED.
CustomRequestOutcome custom_synch_request
- (TP_Custom_Request_Operation* op
- );
+ (TP_Custom_Request_Operation* op);
/// Inject an asynchronous, custom request into the request queue.
/// This will return control to the calling thread once the request
/// has been placed into the queue (or rejected).
/// Will return REQUEST_DISPATCHED or REQUEST_REJECTED.
CustomRequestOutcome custom_asynch_request
- (TP_Custom_Request_Operation* op
- );
+ (TP_Custom_Request_Operation* op);
/// Cancel all requests that are targeted for the provided servant.
/// This is requested on the user application level.
- void cancel_requests(PortableServer::Servant servant
- );
+ void cancel_requests(PortableServer::Servant servant);
protected:
@@ -118,8 +115,7 @@ namespace TAO
const PortableServer::ObjectId& object_id,
PortableServer::POA_ptr poa,
const char* operation,
- PortableServer::Servant servant
- );
+ PortableServer::Servant servant);
/// Handle the dispatching of a collocated request.
///
@@ -131,8 +127,7 @@ namespace TAO
const PortableServer::ObjectId& object_id,
PortableServer::POA_ptr poa,
const char* operation,
- PortableServer::Servant servant
- );
+ PortableServer::Servant servant);
/// Event - The POA has been activated.
/// This will activate the worker thread(s).
@@ -147,15 +142,12 @@ namespace TAO
/// Event - A servant has been activated
virtual void servant_activated_event_i
(PortableServer::Servant servant,
- const PortableServer::ObjectId& oid
- );
+ const PortableServer::ObjectId& oid);
/// Event - A servant has been deactivated
virtual void servant_deactivated_event_i
(PortableServer::Servant servant,
- const PortableServer::ObjectId& oid
- );
-
+ const PortableServer::ObjectId& oid);
private:
@@ -174,8 +166,7 @@ namespace TAO
* state cannot be determined.
*/
TP_Servant_State::HandleType get_servant_state
- (PortableServer::Servant servant
- );
+ (PortableServer::Servant servant);
/// This is the active object used by the worker threads.
diff --git a/TAO/tao/CSD_ThreadPool/CSD_TP_Task.cpp b/TAO/tao/CSD_ThreadPool/CSD_TP_Task.cpp
index eccb707d0a7..7ecbac2c473 100644
--- a/TAO/tao/CSD_ThreadPool/CSD_TP_Task.cpp
+++ b/TAO/tao/CSD_ThreadPool/CSD_TP_Task.cpp
@@ -61,8 +61,8 @@ TAO::CSD::TP_Task::open(void* num_threads_ptr)
{
//FUZZ: disable check_for_lack_ACE_OS
ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) TP_Task failed to open. "
- "Invalid argument type passed to open().\n"),
+ ACE_TEXT ("(%P|%t) TP_Task failed to open. ")
+ ACE_TEXT ("Invalid argument type passed to open().\n")),
-1);
//FUZZ: enable check_for_lack_ACE_OS
}
@@ -74,8 +74,8 @@ TAO::CSD::TP_Task::open(void* num_threads_ptr)
if (num < 1)
{
ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) TP_Task failed to open. "
- "num_threads (%u) is less-than 1.\n",
+ ACE_TEXT ("(%P|%t) TP_Task failed to open. ")
+ ACE_TEXT ("num_threads (%u) is less-than 1.\n"),
num),
-1);
}
@@ -84,8 +84,8 @@ TAO::CSD::TP_Task::open(void* num_threads_ptr)
if (num > MAX_THREADPOOL_TASK_WORKER_THREADS)
{
ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) TP_Task failed to open. "
- "num_threads (%u) is too large. Max is %d.\n",
+ ACE_TEXT ("(%P|%t) TP_Task failed to open. ")
+ ACE_TEXT ("num_threads (%u) is too large. Max is %d.\n"),
num, MAX_THREADPOOL_TASK_WORKER_THREADS),
-1);
}
@@ -99,8 +99,8 @@ TAO::CSD::TP_Task::open(void* num_threads_ptr)
{
//FUZZ: disable check_for_lack_ACE_OS
ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) TP_Task failed to open. "
- "Task has previously been open()'ed.\n"),
+ ACE_TEXT ("(%P|%t) TP_Task failed to open. ")
+ ACE_TEXT ("Task has previously been open()'ed.\n")),
-1);
//FUZZ: enable check_for_lack_ACE_OS
}
@@ -111,8 +111,8 @@ TAO::CSD::TP_Task::open(void* num_threads_ptr)
// Assumes that when activate returns non-zero return code that
// no threads were activated.
ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) TP_Task failed to activate "
- "(%d) worker threads.\n",
+ ACE_TEXT ("(%P|%t) TP_Task failed to activate ")
+ ACE_TEXT ("(%d) worker threads.\n"),
num),
-1);
}
@@ -272,7 +272,7 @@ TAO::CSD::TP_Task::close(u_long flag)
// Check whether the calling thread(calling orb shutdown) is one of the
// threads in the pool. If it is then it should not wait itself.
- size_t size = this->activated_threads_.size ();
+ size_t const size = this->activated_threads_.size ();
for (size_t i = 0; i < size; i ++)
{
diff --git a/TAO/tao/CSD_ThreadPool/CSD_TP_Task.h b/TAO/tao/CSD_ThreadPool/CSD_TP_Task.h
index c3fec3a6479..445ecf968b3 100644
--- a/TAO/tao/CSD_ThreadPool/CSD_TP_Task.h
+++ b/TAO/tao/CSD_ThreadPool/CSD_TP_Task.h
@@ -102,9 +102,7 @@ namespace TAO
virtual int close(u_long flag = 0);
/// Cancel all requests that are targeted for the provided servant.
- void cancel_servant (PortableServer::Servant servant
- );
-
+ void cancel_servant (PortableServer::Servant servant);
private:
diff --git a/TAO/tao/Transport_Cache_Manager.cpp b/TAO/tao/Transport_Cache_Manager.cpp
index f521e10b3d2..2ff69e5c90b 100644
--- a/TAO/tao/Transport_Cache_Manager.cpp
+++ b/TAO/tao/Transport_Cache_Manager.cpp
@@ -105,9 +105,7 @@ namespace TAO
// are holding our lock
this->purging_strategy_->update_item (int_id.transport ());
- int retval = this->cache_map_.bind (ext_id,
- int_id,
- entry);
+ int retval = this->cache_map_.bind (ext_id, int_id, entry);
if (retval == 0)
{
// The entry has been added to cache succesfully
@@ -126,9 +124,7 @@ namespace TAO
// There was an entry like this before, so let us do some
// minor adjustments and rebind
- retval = this->get_last_index_bind (ext_id,
- int_id,
- entry);
+ retval = this->get_last_index_bind (ext_id, int_id, entry);
if (retval == 0)
{
int_id.transport ()->cache_map_entry (entry);
@@ -167,8 +163,7 @@ namespace TAO
Cache_ExtId ext_id (prop);
Cache_IntId int_id;
- int const retval = this->find (ext_id,
- int_id);
+ int const retval = this->find (ext_id, int_id);
if (retval == 0)
{
transport = int_id.relinquish_transport ();
@@ -176,11 +171,8 @@ namespace TAO
if (transport->wait_strategy ()->non_blocking () == 0 &&
transport->orb_core ()->client_factory ()->use_cleanup_options ())
{
- ACE_Event_Handler * const eh =
- transport->event_handler_i ();
-
- ACE_Reactor * const r =
- transport->orb_core ()->reactor ();
+ ACE_Event_Handler * const eh = transport->event_handler_i ();
+ ACE_Reactor * const r = transport->orb_core ()->reactor ();
if (eh &&
r->remove_handler (eh,
@@ -497,7 +489,7 @@ namespace TAO
{
// BEGIN FORMER close_entries
// Calculate the number of entries to purge
- const int amount = (sorted_size * this->percent_) / 100;
+ int const amount = (sorted_size * this->percent_) / 100;
if (TAO_debug_level > 0)
{
@@ -539,7 +531,7 @@ namespace TAO
}
// Count this as a successful purged entry
- count++;
+ ++count;
}
}
@@ -602,7 +594,7 @@ namespace TAO
Transport_Cache_Manager::fill_set_i (DESCRIPTOR_SET& sorted_set)
{
int current_size = 0;
- int cache_maximum = this->purging_strategy_->cache_maximum ();
+ int const cache_maximum = this->purging_strategy_->cache_maximum ();
// set sorted_set to 0. This signifies nothing to purge.
sorted_set = 0;
diff --git a/TAO/tao/default_resource.cpp b/TAO/tao/default_resource.cpp
index a4ff9a37f97..3c6562db8ba 100644
--- a/TAO/tao/default_resource.cpp
+++ b/TAO/tao/default_resource.cpp
@@ -108,7 +108,7 @@ TAO_Default_Resource_Factory::TAO_Default_Resource_Factory (void)
, purge_percentage_ (TAO_PURGE_PERCENT)
, max_muxed_connections_ (0)
, reactor_mask_signals_ (1)
- , dynamically_allocated_reactor_ (0)
+ , dynamically_allocated_reactor_ (false)
, options_processed_ (0)
, factory_disabled_ (0)
#if TAO_USE_OUTPUT_CDR_MMAP_MEMORY_POOL == 1
@@ -820,7 +820,7 @@ TAO_Default_Resource_Factory::get_reactor (void)
reactor = 0;
}
else
- this->dynamically_allocated_reactor_ = 1;
+ this->dynamically_allocated_reactor_ = true;
return reactor;
}
@@ -828,7 +828,7 @@ TAO_Default_Resource_Factory::get_reactor (void)
void
TAO_Default_Resource_Factory::reclaim_reactor (ACE_Reactor *reactor)
{
- if (this->dynamically_allocated_reactor_ == 1)
+ if (this->dynamically_allocated_reactor_)
delete reactor;
}
diff --git a/TAO/tao/default_resource.h b/TAO/tao/default_resource.h
index ea703bf82b3..b09ea01725e 100644
--- a/TAO/tao/default_resource.h
+++ b/TAO/tao/default_resource.h
@@ -240,9 +240,9 @@ protected:
int reactor_mask_signals_;
/**
- * Flag that is set to 1 if the reactor obtained from the
+ * Flag that is set to true if the reactor obtained from the
* get_reactor() method is dynamically allocated. If this flag is
- * set to 1, then the reclaim_reactor() method with call the delete
+ * set to true, then the reclaim_reactor() method with call the delete
* operator on the given reactor. This flag is necessary to make
* sure that a reactor not allocated by the default resource factory
* is not reclaimed by the default resource factory. Such a
@@ -250,7 +250,7 @@ protected:
* default one overrides the get_reactor() method but does not
* override the reclaim_reactor() method.
*/
- int dynamically_allocated_reactor_;
+ bool dynamically_allocated_reactor_;
virtual int load_default_protocols (void);
diff --git a/TAO/tao/orbconf.h b/TAO/tao/orbconf.h
index fb9cace70ac..692f59bdb09 100644
--- a/TAO/tao/orbconf.h
+++ b/TAO/tao/orbconf.h
@@ -158,7 +158,7 @@ const size_t TAO_DEFAULT_VALUE_FACTORY_TABLE_SIZE = 128;
// @@ This assumes we are using one or more protocols that will all
// @@ 1) know what to do with a port number and
// @@ 2) use the same default port number.
-// @@ This shou8ld go away!
+// @@ This should go away!
#if !defined (TAO_DEFAULT_SERVER_PORT)
#define TAO_DEFAULT_SERVER_PORT 0
#endif /* TAO_DEFAULT_SERVER_PORT */
diff --git a/TAO/tests/Bug_2826_Regression/bug_2826_regression.cpp b/TAO/tests/Bug_2826_Regression/bug_2826_regression.cpp
index 71742bbd4eb..5a692f7b198 100644
--- a/TAO/tests/Bug_2826_Regression/bug_2826_regression.cpp
+++ b/TAO/tests/Bug_2826_Regression/bug_2826_regression.cpp
@@ -60,7 +60,7 @@ int main (int argc, char *argv[])
CORBA::ORB_var orb;
try
{
- orb= CORBA::ORB_init (argc, argv, 0);
+ orb = CORBA::ORB_init (argc, argv);
CORBA::Object_var root_poa_o =
orb->resolve_initial_references ("RootPOA");
diff --git a/TAO/tests/Bug_3154_Regression/run_test.pl b/TAO/tests/Bug_3154_Regression/run_test.pl
index f9d5cc3747b..4f6462ae3b6 100755
--- a/TAO/tests/Bug_3154_Regression/run_test.pl
+++ b/TAO/tests/Bug_3154_Regression/run_test.pl
@@ -24,7 +24,9 @@ $idl_file = PerlACE::LocalFile ("test.idl");
# The IDL compiler
$TAO_IDL = new PerlACE::Process ("$tao_idl");
-$TAO_IDL->Arguments ("-Se -hs _skel.h -hc _stub.h test.idl");
+$ENV{'INCLUDE'} = ":$ENV{TAO_ROOT}/orbsvcs/:$ENV{TAO_ROOT}/:";
+
+$TAO_IDL->Arguments ("-Se -hs _skel.h -hc _stub.h -I$ENV{TAO_ROOT} -I$ENV{TAO_ROOT}/orbsvcs/ test.idl");
$TAO_IDL->SpawnWaitKill (20);
$found = 0;
diff --git a/TAO/tests/Bug_3193_Regression/Bug_3193_Regression.mpc b/TAO/tests/Bug_3193_Regression/Bug_3193_Regression.mpc
new file mode 100644
index 00000000000..1c82d874281
--- /dev/null
+++ b/TAO/tests/Bug_3193_Regression/Bug_3193_Regression.mpc
@@ -0,0 +1,31 @@
+// -*- MPC -*-
+// $Id$
+
+project(*idl): taoidldefaults {
+ IDL_Files {
+ test.idl
+ }
+ custom_only = 1
+}
+
+project(*Server): taoserver {
+ after += *idl
+ Source_Files {
+ testC.cpp
+ testS.cpp
+ test_i.cpp
+ server.cpp
+ }
+ IDL_Files {
+ }
+}
+
+project(*Client): taoclient, messaging {
+ after += *Server
+ Source_Files {
+ testC.cpp
+ client.cpp
+ }
+ IDL_Files {
+ }
+}
diff --git a/TAO/tests/Bug_3193_Regression/README b/TAO/tests/Bug_3193_Regression/README
new file mode 100644
index 00000000000..48c86ae5e36
--- /dev/null
+++ b/TAO/tests/Bug_3193_Regression/README
@@ -0,0 +1,6 @@
+# $Id$
+
+Test to reproduce Bug 3193 issue.
+
+The aim is to fill up the TCP buffers then get a one-way invocation with
+ SYNC_WITH_TRANSPORT synch scope and Block flushing to timeout.
diff --git a/TAO/tests/Bug_3193_Regression/client.cpp b/TAO/tests/Bug_3193_Regression/client.cpp
new file mode 100644
index 00000000000..dafe0143ae4
--- /dev/null
+++ b/TAO/tests/Bug_3193_Regression/client.cpp
@@ -0,0 +1,223 @@
+// $Id$
+
+#include "testC.h"
+
+#include "tao/Messaging/Messaging.h"
+#include "tao/AnyTypeCode/Any.h"
+#include "ace/Get_Opt.h"
+#include "ace/Task.h"
+#include "ace/OS_NS_unistd.h"
+
+ACE_RCSID(Timeout, client, "$Id$")
+
+const char *ior = "file://test.ior";
+int min_timeout = 20;
+int inv_count = 100;
+int timeouts_received = 0;
+int sleep_time = 100; // msec
+
+class OPool : public ACE_Task_Base
+{
+private:
+ CORBA::ORB_var orb_;
+
+public:
+ OPool (CORBA::ORB_ptr orb)
+ : orb_ (CORBA::ORB::_duplicate (orb))
+ {
+ if (CORBA::is_nil (orb_.in()) == 1) {
+ ACE_ERROR ((LM_ERROR, "OPool> Ctr> Orb is NULL\n"));
+ }
+ };
+
+ virtual ~OPool ()
+ { };
+
+ virtual int svc ()
+ {
+ if (CORBA::is_nil (orb_.in()) == 0) {
+ orb_->run();
+ }
+
+ return -1;
+ };
+};
+
+int
+parse_args (int argc, char *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, "k:l:i:");
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 'k':
+ ior = get_opts.opt_arg ();
+ break;
+
+ case 'l':
+ min_timeout = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
+
+ case 'i':
+ inv_count = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
+
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s "
+ "-k <ior> "
+ "-l <timeout> "
+ "\n",
+ argv [0]),
+ -1);
+ }
+ // Indicates successful parsing of the command line
+ return 0;
+}
+
+char* aStr;
+
+void
+send_echo (Simple_Server_ptr server,
+ CORBA::Long msec)
+{
+ try
+ {
+ server->echo (0, msec, aStr);
+ }
+ catch (const CORBA::TIMEOUT& )
+ {
+ // Trap this exception and continue...
+ ACE_DEBUG ((LM_DEBUG,
+ "==> Trapped a TIMEOUT exception \n"));
+
+ timeouts_received++;
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Exception caught:");
+ }
+}
+
+
+int main (int argc, char* argv[])
+{
+ aStr = new char [5000];
+ memset(aStr,'A',4999);
+ aStr[4999] = 0;
+
+ try
+ {
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv, "");
+
+ int orb_thr_pool = 1;
+ OPool orbPool (orb.in());
+ if (orb_thr_pool > 0) {
+ orbPool.activate (THR_NEW_LWP | THR_JOINABLE |THR_INHERIT_SCHED, orb_thr_pool);
+ }
+
+ if (parse_args (argc, argv) != 0)
+ return 1;
+
+ CORBA::Object_var object = orb->string_to_object (ior);
+
+ Simple_Server_var server = Simple_Server::_narrow (object.in ());
+ if (CORBA::is_nil (server.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Object reference <%s> is nil\n",
+ ior),
+ 1);
+ }
+
+ // convert from msec to "TimeT" (0.1 usec units)
+ TimeBase::TimeT mid_value = 10000 * min_timeout;
+
+ CORBA::Any any_object;
+ any_object <<= mid_value; // - 20000; // midvalue + 2 msec
+
+ CORBA::PolicyList policy_list (1);
+ policy_list.length (1);
+ policy_list[0] =
+ orb->create_policy (Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE,
+ any_object);
+ object =
+ server->_set_policy_overrides (policy_list,
+ CORBA::SET_OVERRIDE);
+
+ Simple_Server_var timeout_server = Simple_Server::_narrow (object.in ());
+
+ policy_list[0]->destroy ();
+ policy_list.length(0);
+
+ //for(int i = 0; i != 1000000;++i)
+ for(int i = 0; i != inv_count;++i)
+ {
+ if( (i % 10) == 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "client(%P) sent %d messages\n",i));
+ }
+ send_echo (timeout_server.in (), sleep_time);
+ }
+
+ ACE_DEBUG ((LM_DEBUG, "Invocations: %d, Timeouts received: %d\n"
+ , inv_count, timeouts_received));
+
+ // Set the policy value.
+ Messaging::SyncScope sync_with_target = Messaging::SYNC_WITH_TARGET;
+ CORBA::Any sync_with_target_any;
+ sync_with_target_any <<= sync_with_target;
+
+ policy_list.length (1);
+ policy_list[0] =
+ orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE, sync_with_target_any);
+ // Apply the policy at the ORB level.
+ CORBA::Object_var obj = orb->resolve_initial_references ("ORBPolicyManager");
+ CORBA::PolicyManager_var policy_manager =
+ CORBA::PolicyManager::_narrow(obj.in());
+
+ policy_manager->set_policy_overrides (policy_list, CORBA::ADD_OVERRIDE);
+ // Destroy the Policy objects.
+ for (CORBA::ULong i = 0; i < policy_list.length(); ++i) {
+ policy_list[i]->destroy ();
+ }
+ policy_list.length(0);
+
+ ACE_DEBUG ((LM_DEBUG,
+ "\n\n\nclient(%P) Test completed, "
+ "resynch with server\n"));
+
+ send_echo (timeout_server.in (), 0);
+
+ server->shutdown ();
+
+ orb->destroy ();
+
+ orbPool.wait();
+
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: caught CORBA::Exception\n"));
+ ex._tao_print_exception ("Exception caught:");
+ return 1;
+ }
+
+ if (timeouts_received < 1) {
+ // We should have received one timeout for the single SYNCH_WITH_TARGET case.
+ ACE_ERROR ((LM_ERROR, "ERROR: No Timeout received for SYNCH_WITH_TARGET scope.\n"));
+ return -1;
+ }
+ else if (timeouts_received < 2) {
+ // We didn't receive any timeouts for the SYNC_WITH_TRANSPORT case.
+ ACE_ERROR ((LM_ERROR, "ERROR: No Timeout received for SYNC_WITH_TRANSPORT scope.\n"));
+ return -1;
+ }
+
+ return 0;
+}
diff --git a/TAO/tests/Bug_3193_Regression/run_test.pl b/TAO/tests/Bug_3193_Regression/run_test.pl
new file mode 100755
index 00000000000..a750f3d546d
--- /dev/null
+++ b/TAO/tests/Bug_3193_Regression/run_test.pl
@@ -0,0 +1,56 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# $Id$
+# -*- perl -*-
+
+use lib "$ENV{ACE_ROOT}/bin";
+use PerlACE::Run_Test;
+
+$status = 0;
+
+$iorfile = PerlACE::LocalFile ("server.ior");
+unlink $iorfile;
+
+if (PerlACE::is_vxworks_test()) {
+ $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
+}
+else {
+ $SV = new PerlACE::Process ("server", "-o $iorfile");
+}
+$CL = new PerlACE::Process ("client", "-ORBDebugLevel 0 -k file://$iorfile -l 20 ");
+
+print $SV->CommandLine()."\n";
+$server_spawn = $SV->Spawn ();
+
+if ($server_spawn != 0) {
+ print STDERR "ERROR: server returned $server_spawn\n";
+ exit 1;
+}
+
+if (PerlACE::waitforfile_timed ($iorfile,
+ $PerlACE::wait_interval_for_process_creation) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
+}
+
+print $CL->CommandLine()."\n";
+$client = $CL->SpawnWaitKill (120);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
+}
+
+$server = $SV->WaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
+}
+
+unlink $iorfile;
+
+exit $status;
diff --git a/TAO/tests/Bug_3193_Regression/server.cpp b/TAO/tests/Bug_3193_Regression/server.cpp
new file mode 100644
index 00000000000..e37a437a3dc
--- /dev/null
+++ b/TAO/tests/Bug_3193_Regression/server.cpp
@@ -0,0 +1,98 @@
+// $Id$
+
+#include "test_i.h"
+#include "ace/Get_Opt.h"
+#include "ace/OS_NS_stdio.h"
+
+ACE_RCSID(Timeout, server, "$Id$")
+
+const char *ior_output_file = 0;
+
+int
+parse_args (int argc, char *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, "o:");
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 'o':
+ ior_output_file = get_opts.opt_arg ();
+ break;
+
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s "
+ "-o <iorfile>"
+ "\n",
+ argv [0]),
+ -1);
+ }
+
+ // Indicates sucessful parsing of the command line
+ return 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+ try
+ {
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv, "");
+
+ if (parse_args (argc, argv) != 0)
+ return 1;
+
+ CORBA::Object_var poa_object =
+ orb->resolve_initial_references("RootPOA");
+
+ if (CORBA::is_nil (poa_object.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ " (%P|%t) Unable to initialize the POA.\n"),
+ 1);
+
+ PortableServer::POA_var root_poa =
+ PortableServer::POA::_narrow (poa_object.in ());
+
+ PortableServer::POAManager_var poa_manager =
+ root_poa->the_POAManager ();
+
+ Simple_Server_i server_impl (orb.in ());
+
+ Simple_Server_var server =
+ server_impl._this ();
+
+ CORBA::String_var ior =
+ orb->object_to_string (server.in ());
+
+ // ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
+
+ poa_manager->activate ();
+
+ // If the ior_output_file exists, output the ior to it
+ if (ior_output_file != 0)
+ {
+ FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ if (output_file == 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Cannot open output file for writing IOR: %s",
+ ior_output_file),
+ 1);
+ ACE_OS::fprintf (output_file, "%s", ior.in ());
+ ACE_OS::fclose (output_file);
+ }
+
+ orb->run ();
+
+ // ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Caught exception:");
+ return 1;
+ }
+ return 0;
+}
diff --git a/TAO/tests/Bug_3193_Regression/svc.conf b/TAO/tests/Bug_3193_Regression/svc.conf
new file mode 100644
index 00000000000..b63238901e0
--- /dev/null
+++ b/TAO/tests/Bug_3193_Regression/svc.conf
@@ -0,0 +1,2 @@
+static Client_Strategy_Factory "-ORBWaitStrategy rw -ORBTransportMuxStrategy exclusive -ORBConnectStrategy blocked -ORBConnectionHandlerCleanup 1"
+static Resource_Factory "-ORBFlushingStrategy blocking"
diff --git a/TAO/tests/Bug_3193_Regression/test.idl b/TAO/tests/Bug_3193_Regression/test.idl
new file mode 100644
index 00000000000..2bbd204c6de
--- /dev/null
+++ b/TAO/tests/Bug_3193_Regression/test.idl
@@ -0,0 +1,12 @@
+//
+// $Id$
+//
+
+interface Simple_Server {
+
+ /// Returns <x>, but sleep for <msecs> milliseconds before returning
+ oneway void echo (in long x, in long msecs, in string msg);
+
+ /// Shutdown the ORB
+ oneway void shutdown ();
+};
diff --git a/TAO/tests/Bug_3193_Regression/test_i.cpp b/TAO/tests/Bug_3193_Regression/test_i.cpp
new file mode 100644
index 00000000000..e532731a663
--- /dev/null
+++ b/TAO/tests/Bug_3193_Regression/test_i.cpp
@@ -0,0 +1,36 @@
+// $Id$
+
+#include "test_i.h"
+#include "ace/OS_NS_unistd.h"
+#include "ace/High_Res_Timer.h"
+
+ACE_RCSID(Timeout, test_i, "$Id$")
+
+ACE_High_Res_Timer sleep_duration;
+
+
+Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb)
+ : orb_ (CORBA::ORB::_duplicate (orb))
+ , echo_count_ (0)
+{
+ sleep_duration.calibrate();
+}
+
+void
+Simple_Server_i::echo (CORBA::Long ,
+ CORBA::Long msecs, const char* )
+{
+ ACE_Time_Value tv;
+ tv.msec (msecs);
+ echo_count_++;
+ ACE_OS::sleep (tv);
+}
+
+void
+Simple_Server_i::shutdown (void)
+{
+ ACE_DEBUG ((LM_DEBUG,
+ "server (%P) Received shutdown request from client\n"));
+
+ this->orb_->shutdown (0);
+}
diff --git a/TAO/tests/Bug_3193_Regression/test_i.h b/TAO/tests/Bug_3193_Regression/test_i.h
new file mode 100644
index 00000000000..2468e14267e
--- /dev/null
+++ b/TAO/tests/Bug_3193_Regression/test_i.h
@@ -0,0 +1,45 @@
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO/tests/Timeout
+//
+// = FILENAME
+// test_i.h
+//
+// = AUTHOR
+// Carlos O'Ryan
+//
+// ============================================================================
+
+#ifndef TAO_TIMEOUT_TEST_I_H
+#define TAO_TIMEOUT_TEST_I_H
+
+#include "testS.h"
+
+class Simple_Server_i : public POA_Simple_Server
+{
+ // = TITLE
+ // Simpler Server implementation
+ //
+ // = DESCRIPTION
+ // Implements the Simple_Server interface in test.idl
+ //
+public:
+ Simple_Server_i (CORBA::ORB_ptr orb);
+ // ctor
+
+ // = The Simple_Server methods.
+ void echo (CORBA::Long x,
+ CORBA::Long msecs, const char* msg);
+ void shutdown (void);
+
+private:
+ CORBA::ORB_var orb_;
+ // The ORB
+
+ int echo_count_;
+};
+
+#endif /* TAO_TIMEOUT_TEST_I_H */
diff --git a/TAO/tests/Bug_3198_Regression/Bug_3198_Regression.mpc b/TAO/tests/Bug_3198_Regression/Bug_3198_Regression.mpc
new file mode 100644
index 00000000000..8f8341be456
--- /dev/null
+++ b/TAO/tests/Bug_3198_Regression/Bug_3198_Regression.mpc
@@ -0,0 +1,8 @@
+// -*- MPC -*-
+// $Id$
+
+project(*) : taoclient, avoids_minimum_corba, avoids_corba_e_compact, avoids_corba_e_micro {
+ Source_Files {
+ bug_3198_regression.cpp
+ }
+}
diff --git a/TAO/tests/Bug_3198_Regression/bug_3198_regression.cpp b/TAO/tests/Bug_3198_Regression/bug_3198_regression.cpp
new file mode 100644
index 00000000000..b5e9fc07ae0
--- /dev/null
+++ b/TAO/tests/Bug_3198_Regression/bug_3198_regression.cpp
@@ -0,0 +1,112 @@
+// $Id$
+
+#include "tao/ORB_Core.h"
+#include "tao/SystemException.h"
+#include "tao/PolicyC.h"
+#include "ace/Get_Opt.h"
+
+ACE_RCSID (Bug_3198_Regression,
+ bug_3198_regression,
+ "$Id$")
+
+const char *ior = "corbaloc:iiop:localhost:12345/MyObjectKey";
+
+int
+parse_args (int argc, char *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, "k:");
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 'k':
+ ior = get_opts.opt_arg ();
+ break;
+
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s "
+ "-k <ior> "
+ "\n",
+ argv [0]),
+ -1);
+ }
+ // Indicates sucessful parsing of the command line
+ return 0;
+}
+
+
+int main (int argc, char *argv[])
+{
+ try
+ {
+ CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
+
+ if (parse_args (argc, argv) != 0)
+ return 1;
+
+ CORBA::Object_var obj = orb->string_to_object (ior);
+ CORBA::PolicyList_var policies;
+ CORBA::Boolean result = obj->_validate_connection (policies.out());
+ if (result)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ " (%P|%t) got true from _validate_connection\n"),
+ 1);
+ }
+ }
+ catch (const CORBA::TRANSIENT&)
+ {
+ ACE_DEBUG ((LM_DEBUG, "Caught transient as expected\n"));
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Exception caught:");
+ return 1;
+ }
+ return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TAO/tests/Bug_3198_Regression/run_test.pl b/TAO/tests/Bug_3198_Regression/run_test.pl
new file mode 100755
index 00000000000..d0d50bbe02c
--- /dev/null
+++ b/TAO/tests/Bug_3198_Regression/run_test.pl
@@ -0,0 +1,31 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# $Id$
+# -*- perl -*-
+
+use lib "$ENV{ACE_ROOT}/bin";
+use PerlACE::Run_Test;
+
+$status = 0;
+
+if (PerlACE::is_vxworks_test()) {
+ $SV = new PerlACE::ProcessVX ("client", "corbaloc:iiop:localhost:1234/MyObjectKey");
+}
+else {
+ $SV = new PerlACE::Process ("client", "corbaloc:iiop:localhost:1234/MyObjectKey");
+}
+
+$SV->Spawn ();
+
+$server = $SV->WaitKill (60);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
+}
+
+unlink $iorfile;
+
+exit $status;
diff --git a/TAO/tests/Exposed_Policies/client.cpp b/TAO/tests/Exposed_Policies/client.cpp
index 2483135b567..92ef57a48c3 100644
--- a/TAO/tests/Exposed_Policies/client.cpp
+++ b/TAO/tests/Exposed_Policies/client.cpp
@@ -28,13 +28,13 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
}
else
{
- status++;
+ ++status;
}
}
catch (const CORBA::Exception& ex)
{
ex._tao_print_exception ("CORBA Exception Raised");
- status++;
+ ++status;
}
diff --git a/TAO/tests/IDL_Test/constants.idl b/TAO/tests/IDL_Test/constants.idl
index e4193cc5d3a..f37039c1618 100644
--- a/TAO/tests/IDL_Test/constants.idl
+++ b/TAO/tests/IDL_Test/constants.idl
@@ -121,6 +121,18 @@ module ClassConstants
};
};
+// The bitwise OR rhs was causing bogus coercion failure.
+module CoercionBug
+{
+ typedef unsigned short UInt16;
+ typedef UInt16 CellFlags;
+
+ const CellFlags EXPLICIT_VALUE_LOCK = 0x0400;
+ const CellFlags EDIT_VALUE_LOCK = 0x1000;
+
+ const CellFlags VALUE_LOCK = (EXPLICIT_VALUE_LOCK | EDIT_VALUE_LOCK);
+};
+