summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Mesnier <mesnier_p@ociweb.com>2006-09-21 15:12:50 +0000
committerPhil Mesnier <mesnier_p@ociweb.com>2006-09-21 15:12:50 +0000
commit4380d704aaa84c968f9216f6cf4d4a0fedf583c3 (patch)
treef328df146e2a41c8d0af7b65dec026b0e3830a9d
parent55a5c60a07f5c0f1c6c998fbaa5dd0905d6cbdcf (diff)
downloadATCD-4380d704aaa84c968f9216f6cf4d4a0fedf583c3.tar.gz
Thu Sep 21 14:59:37 UTC 2006 Phil Mesnier <mesnier_p@ociweb.com>
* tests/Bug_2188_Regression: * tests/Bug_2188_Regression/broken.idl: * tests/Bug_2188_Regression/broken.mpc: * tests/Bug_2188_Regression/broken_i.h: * tests/Bug_2188_Regression/broken_i.cpp: * tests/Bug_2188_Regression/client.cpp: * tests/Bug_2188_Regression/run_test.pl: * tests/Bug_2188_Regression/server.cpp:
-rw-r--r--TAO/ChangeLog15
-rw-r--r--TAO/tests/Bug_2188_Regression/broken.idl125
-rw-r--r--TAO/tests/Bug_2188_Regression/broken.mpc23
-rw-r--r--TAO/tests/Bug_2188_Regression/broken_i.cpp524
-rw-r--r--TAO/tests/Bug_2188_Regression/broken_i.h393
-rw-r--r--TAO/tests/Bug_2188_Regression/client.cpp88
-rwxr-xr-xTAO/tests/Bug_2188_Regression/run_test.pl61
-rw-r--r--TAO/tests/Bug_2188_Regression/server.cpp124
8 files changed, 1353 insertions, 0 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 814749c9ed8..63960a9c828 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,18 @@
+Thu Sep 21 14:59:37 UTC 2006 Phil Mesnier <mesnier_p@ociweb.com>
+
+ * tests/Bug_2188_Regression:
+ * tests/Bug_2188_Regression/broken.idl:
+ * tests/Bug_2188_Regression/broken.mpc:
+ * tests/Bug_2188_Regression/broken_i.h:
+ * tests/Bug_2188_Regression/broken_i.cpp:
+ * tests/Bug_2188_Regression/client.cpp:
+ * tests/Bug_2188_Regression/run_test.pl:
+ * tests/Bug_2188_Regression/server.cpp:
+
+ A new test for an old problem. The actual problem is now
+ resolved, but I never got around to adding this test when I
+ should have.
+
Wed Sep 20 21:37:58 UTC 2006 Phil Mesnier <mesnier_p@ociweb.com>
* tao/IIOP_Acceptor.cpp:
diff --git a/TAO/tests/Bug_2188_Regression/broken.idl b/TAO/tests/Bug_2188_Regression/broken.idl
new file mode 100644
index 00000000000..3337478fa51
--- /dev/null
+++ b/TAO/tests/Bug_2188_Regression/broken.idl
@@ -0,0 +1,125 @@
+//
+// arrayTest.idl -- Test IDL for array type CCA regressions
+//
+// $Revision$ $Date$
+//
+
+enum enum1
+{
+ One,
+ Two,
+ Three
+};
+typedef enum1 MyEnum;
+
+typedef char tmp1CharArray[10];
+typedef tmp1CharArray tmp2CharArray;
+typedef tmp2CharArray CharArray;
+
+typedef octet OctetArray[10];
+typedef short ShortArray[10];
+typedef long LongArray[10];
+typedef long long LongLongArray[10];
+typedef unsigned short UShortArray[10];
+typedef unsigned long ULongArray[10];
+typedef unsigned long long ULongLongArray[10];
+typedef float FloatArray[10];
+typedef double DoubleArray[10];
+typedef string StringArray[10];
+typedef boolean BooleanArray[10];
+typedef MyEnum MyEnumArray[10];
+
+typedef long LongArrayArray[10][10];
+
+module moola
+{
+ typedef float CashAmount;
+ typedef string<100> MyString;
+
+ interface Account
+ {
+ attribute string name;
+ attribute CashAmount balance;
+
+ void deposit (in CashAmount amount);
+ void withdraw (in CashAmount amount);
+ };
+};
+
+struct Bucket
+{
+ long a_long;
+ string a_string;
+ FloatArray a_floatArray;
+ MyEnum a_enum;
+};
+
+typedef Bucket BucketArray[10];
+typedef Bucket BucketArrayArray[10][10];
+typedef moola::Account AccountArray[10];
+
+
+struct SimpleStruct
+{
+ short simpleShort;
+ long simpleLong;
+};
+
+interface ArrayTest
+{
+
+ LongArray longArrayOp(in LongArray p1,
+ inout LongArray p2, out LongArray p3);
+ StringArray stringArrayOp(in StringArray p1,
+ inout StringArray p2, out StringArray p3);
+ ShortArray shortArrayOp(in ShortArray p1,
+ inout ShortArray p2, out ShortArray p3);
+ UShortArray ushortArrayOp(in UShortArray p1,
+ inout UShortArray p2, out UShortArray p3);
+ CharArray charArrayOp(in CharArray p1,
+ inout CharArray p2, out CharArray p3);
+ OctetArray octetArrayOp(in OctetArray p1,
+ inout OctetArray p2, out OctetArray p3);
+ DoubleArray doubleArrayOp(in DoubleArray p1,
+ inout DoubleArray p2, out DoubleArray p3);
+/*
+ FloatArray floatArrayOp(in FloatArray p1,
+ inout FloatArray p2, out FloatArray p3);
+ ULongArray ulongArrayOp(in ULongArray p1,
+ inout ULongArray p2, out ULongArray p3);
+ BucketArray bucketArrayOp(in BucketArray p1,
+ inout BucketArray p2, out BucketArray p3);
+ BucketArrayArray bucketArrayArrayOp(in BucketArrayArray p1,
+ inout BucketArrayArray p2,
+ out BucketArrayArray p3);
+ AccountArray accountArrayOp(in AccountArray p1,
+ inout AccountArray p2, out AccountArray p3);
+ BooleanArray booleanArrayOp(in BooleanArray p1,
+ inout BooleanArray p2, out BooleanArray p3);
+ LongArrayArray longArrayArrayOp(in LongArrayArray p1,
+ inout LongArrayArray p2, out LongArrayArray p3);
+ MyEnumArray myEnumArrayOp(in MyEnumArray p1,
+ inout MyEnumArray p2, out MyEnumArray p3);
+*/
+ attribute LongArray a_longArray;
+ attribute ULongArray a_ulongArray;
+ attribute StringArray a_stringArray;
+ attribute ShortArray a_shortArray;
+ attribute UShortArray a_ushortArray;
+ attribute char a_char;
+ attribute CharArray a_charArray;
+ attribute OctetArray a_octetArray;
+ attribute DoubleArray a_doubleArray;
+ attribute FloatArray a_floatArray;
+ attribute BucketArray a_bucketArray;
+ attribute AccountArray a_accountArray;
+ attribute BooleanArray a_booleanArray;
+ attribute LongArrayArray a_longArrayArray;
+ attribute MyEnumArray a_myEnumArray;
+};
+
+interface ServerAdmin
+{
+ ArrayTest target();
+ oneway void shutdown ();
+};
diff --git a/TAO/tests/Bug_2188_Regression/broken.mpc b/TAO/tests/Bug_2188_Regression/broken.mpc
new file mode 100644
index 00000000000..26ee088bef9
--- /dev/null
+++ b/TAO/tests/Bug_2188_Regression/broken.mpc
@@ -0,0 +1,23 @@
+// -*- MPC -*-
+// $Id$
+
+project(*Server): taoexe, portableserver {
+ IDL_Files {
+ broken.idl
+ }
+
+ Source_Files {
+ broken_i.cpp
+ server.cpp
+ }
+}
+
+project(*Client): taoexe {
+ IDL_Files {
+ broken.idl
+ }
+ Source_Files {
+ brokenC.cpp
+ client.cpp
+ }
+}
diff --git a/TAO/tests/Bug_2188_Regression/broken_i.cpp b/TAO/tests/Bug_2188_Regression/broken_i.cpp
new file mode 100644
index 00000000000..a0efd8b9ed5
--- /dev/null
+++ b/TAO/tests/Bug_2188_Regression/broken_i.cpp
@@ -0,0 +1,524 @@
+// -*- C++ -*-
+//
+// $Id$
+
+// **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
+// TAO and the TAO IDL Compiler have been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// and
+// Distributed Object Computing Laboratory
+// University of California at Irvine
+// Irvine, CA
+// USA
+// http://doc.ece.uci.edu/
+// and
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about TAO is available at:
+// http://www.cs.wustl.edu/~schmidt/TAO.html
+
+// TAO_IDL - Generated from
+// be/be_codegen.cpp:932
+
+#include "broken_i.h"
+
+
+
+ServerAdmin_i::ServerAdmin_i (ArrayTest_ptr target)
+ :target_ (ArrayTest::_duplicate(target))
+{
+}
+
+ServerAdmin_i::~ServerAdmin_i (void)
+{
+}
+
+ArrayTest_ptr
+ServerAdmin_i::target(void)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return ArrayTest::_duplicate(target_.in());
+}
+
+void
+ServerAdmin_i::shutdown (void)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ int argc = 0;
+ char ** argv = 0;
+ CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
+ orb->shutdown();
+}
+
+// Implementation skeleton constructor
+ArrayTest_i::ArrayTest_i (void)
+ :longArray_ (LongArray_alloc()),
+ ulongArray_ (ULongArray_alloc()),
+ stringArray_ (StringArray_alloc()),
+ shortArray_ (ShortArray_alloc()),
+ ushortArray_ (UShortArray_alloc()),
+ charArray_ (CharArray_alloc()),
+ octetArray_ (OctetArray_alloc()),
+ doubleArray_ (DoubleArray_alloc()),
+ floatArray_ (FloatArray_alloc()),
+ bucketArray_ (BucketArray_alloc()),
+ accountArray_ (AccountArray_alloc()),
+ booleanArray_ (BooleanArray_alloc()),
+ longArrayArray_ (LongArrayArray_alloc()),
+ enumArray_ (MyEnumArray_alloc())
+{
+}
+
+// Implementation skeleton destructor
+ArrayTest_i::~ArrayTest_i (void)
+{
+ LongArray_free (longArray_);
+ ULongArray_free (ulongArray_);
+ StringArray_free (stringArray_);
+ ShortArray_free (shortArray_);
+ UShortArray_free (ushortArray_);
+ CharArray_free (charArray_);
+ OctetArray_free (octetArray_);
+ DoubleArray_free (doubleArray_);
+ FloatArray_free (floatArray_);
+ BucketArray_free (bucketArray_);
+ AccountArray_free (accountArray_);
+ BooleanArray_free (booleanArray_);
+ LongArrayArray_free (longArrayArray_);
+ MyEnumArray_free (enumArray_);
+}
+
+::LongArray_slice * ArrayTest_i::longArrayOp (
+ const ::LongArray p1,
+ ::LongArray p2,
+ ::LongArray_out p3
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ p3 = LongArray_dup(p2);
+ return LongArray_dup(p1);
+}
+
+::StringArray_slice * ArrayTest_i::stringArrayOp (
+ const ::StringArray p1,
+ ::StringArray p2,
+ ::StringArray_out p3
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ p3 = StringArray_dup(p2);
+ return StringArray_dup(p1);
+}
+
+::ShortArray_slice * ArrayTest_i::shortArrayOp (
+ const ::ShortArray p1,
+ ::ShortArray p2,
+ ::ShortArray_out p3
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ p3 = ShortArray_dup(p2);
+ return ShortArray_dup(p1);
+ // Add your implementation here
+}
+
+::UShortArray_slice * ArrayTest_i::ushortArrayOp (
+ const ::UShortArray p1,
+ ::UShortArray p2,
+ ::UShortArray_out p3
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ p3 = UShortArray_dup(p2);
+ return UShortArray_dup(p1);
+}
+
+::CharArray_slice * ArrayTest_i::charArrayOp (
+ const ::CharArray p1,
+ ::CharArray p2,
+ ::CharArray_out p3
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ p3 = CharArray_dup(p2);
+ return CharArray_dup(p1);
+
+}
+
+::OctetArray_slice * ArrayTest_i::octetArrayOp (
+ const ::OctetArray p1,
+ ::OctetArray p2,
+ ::OctetArray_out p3
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ p3 = OctetArray_dup(p2);
+ return OctetArray_dup(p1);
+}
+
+::DoubleArray_slice * ArrayTest_i::doubleArrayOp (
+ const ::DoubleArray p1,
+ ::DoubleArray p2,
+ ::DoubleArray_out p3
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ p3 = DoubleArray_dup(p2);
+ return DoubleArray_dup(p1);
+}
+
+::LongArray_slice * ArrayTest_i::a_longArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ return LongArray_dup(longArray_);
+}
+
+void ArrayTest_i::a_longArray (
+ const ::LongArray a_longArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ LongArray_copy(longArray_,a_longArray);
+}
+
+::ULongArray_slice * ArrayTest_i::a_ulongArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ return ULongArray_dup(ulongArray_);
+}
+
+void ArrayTest_i::a_ulongArray (
+ const ::ULongArray a_ulongArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ ULongArray_copy (ulongArray_,a_ulongArray);
+}
+
+::StringArray_slice * ArrayTest_i::a_stringArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ return StringArray_dup (stringArray_);
+}
+
+void ArrayTest_i::a_stringArray (
+ const ::StringArray a_stringArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ StringArray_copy (stringArray_,a_stringArray);
+}
+
+::ShortArray_slice * ArrayTest_i::a_shortArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ return ShortArray_dup (shortArray_);
+}
+
+void ArrayTest_i::a_shortArray (
+ const ::ShortArray a_shortArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ ShortArray_copy (shortArray_,a_shortArray);
+}
+
+::UShortArray_slice * ArrayTest_i::a_ushortArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ return UShortArray_dup (ushortArray_);
+}
+
+void ArrayTest_i::a_ushortArray (
+ const ::UShortArray a_ushortArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ UShortArray_copy (ushortArray_,a_ushortArray);
+}
+
+CORBA::Char ArrayTest_i::a_char (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ return char_;
+}
+
+void ArrayTest_i::a_char (
+ ::CORBA::Char a_char
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ char_ = a_char;
+}
+
+::CharArray_slice * ArrayTest_i::a_charArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ return CharArray_dup (charArray_);
+}
+
+void ArrayTest_i::a_charArray (
+ const ::CharArray a_charArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ CharArray_copy (charArray_,a_charArray);
+}
+
+::OctetArray_slice * ArrayTest_i::a_octetArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ return OctetArray_dup (octetArray_);
+}
+
+void ArrayTest_i::a_octetArray (
+ const ::OctetArray a_octetArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ OctetArray_copy (octetArray_,a_octetArray);
+}
+
+::DoubleArray_slice * ArrayTest_i::a_doubleArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ return DoubleArray_dup (doubleArray_);
+}
+
+void ArrayTest_i::a_doubleArray (
+ const ::DoubleArray a_doubleArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ DoubleArray_copy (doubleArray_,a_doubleArray);
+}
+
+::FloatArray_slice * ArrayTest_i::a_floatArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ return FloatArray_dup (floatArray_);
+}
+
+void ArrayTest_i::a_floatArray (
+ const ::FloatArray a_floatArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ FloatArray_copy (floatArray_,a_floatArray);
+}
+
+::BucketArray_slice * ArrayTest_i::a_bucketArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ return BucketArray_dup (bucketArray_);
+}
+
+void ArrayTest_i::a_bucketArray (
+ const ::BucketArray a_bucketArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ BucketArray_copy (bucketArray_,a_bucketArray);
+}
+
+::AccountArray_slice * ArrayTest_i::a_accountArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ return AccountArray_dup (accountArray_);
+}
+
+void ArrayTest_i::a_accountArray (
+ const ::AccountArray a_accountArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ AccountArray_copy (accountArray_,a_accountArray);
+}
+
+::BooleanArray_slice * ArrayTest_i::a_booleanArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ return BooleanArray_dup (booleanArray_);
+}
+
+void ArrayTest_i::a_booleanArray (
+ const ::BooleanArray a_booleanArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ BooleanArray_copy (booleanArray_,a_booleanArray);
+}
+
+::LongArrayArray_slice * ArrayTest_i::a_longArrayArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ return LongArrayArray_dup (longArrayArray_);
+}
+
+void ArrayTest_i::a_longArrayArray (
+ const ::LongArrayArray a_longArrayArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ LongArrayArray_copy (longArrayArray_,a_longArrayArray);
+}
+
+::MyEnumArray_slice * ArrayTest_i::a_myEnumArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ return MyEnumArray_dup (enumArray_);
+}
+
+void ArrayTest_i::a_myEnumArray (
+ const ::MyEnumArray a_myEnumArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ // Add your implementation here
+ MyEnumArray_copy (enumArray_,a_myEnumArray);
+}
diff --git a/TAO/tests/Bug_2188_Regression/broken_i.h b/TAO/tests/Bug_2188_Regression/broken_i.h
new file mode 100644
index 00000000000..4868bd08e72
--- /dev/null
+++ b/TAO/tests/Bug_2188_Regression/broken_i.h
@@ -0,0 +1,393 @@
+// -*- C++ -*-
+//
+// $Id$
+
+// **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
+// TAO and the TAO IDL Compiler have been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// and
+// Distributed Object Computing Laboratory
+// University of California at Irvine
+// Irvine, CA
+// USA
+// http://doc.ece.uci.edu/
+// and
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about TAO is available at:
+// http://www.cs.wustl.edu/~schmidt/TAO.html
+
+// TAO_IDL - Generated from
+// be/be_codegen.cpp:866
+
+#ifndef BROKEN_I_H_
+#define BROKEN_I_H_
+
+#include "brokenS.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+#pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+class ServerAdmin_i : public virtual POA_ServerAdmin
+{
+public:
+ ServerAdmin_i (ArrayTest_ptr target);
+ virtual ~ServerAdmin_i (void);
+ ArrayTest_ptr target(void)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ void shutdown (void)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+private:
+ ArrayTest_var target_;
+
+};
+
+class ArrayTest_i : public virtual POA_ArrayTest
+{
+private:
+ LongArray_slice * longArray_;
+ ULongArray_slice * ulongArray_;
+ StringArray_slice * stringArray_;
+ ShortArray_slice * shortArray_;
+ UShortArray_slice * ushortArray_;
+ CharArray_slice * charArray_;
+ OctetArray_slice * octetArray_;
+ DoubleArray_slice * doubleArray_;
+ FloatArray_slice * floatArray_;
+ BucketArray_slice * bucketArray_;
+ AccountArray_slice * accountArray_;
+ BooleanArray_slice * booleanArray_;
+ LongArrayArray_slice * longArrayArray_;
+ MyEnumArray_slice * enumArray_;
+
+ CORBA::Char char_;
+public:
+ //Constructor
+ ArrayTest_i (void);
+
+ //Destructor
+ virtual ~ArrayTest_i (void);
+
+ virtual
+ ::LongArray_slice * longArrayOp (
+ const ::LongArray p1,
+ ::LongArray p2,
+ ::LongArray_out p3
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ ::StringArray_slice * stringArrayOp (
+ const ::StringArray p1,
+ ::StringArray p2,
+ ::StringArray_out p3
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ ::ShortArray_slice * shortArrayOp (
+ const ::ShortArray p1,
+ ::ShortArray p2,
+ ::ShortArray_out p3
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ ::UShortArray_slice * ushortArrayOp (
+ const ::UShortArray p1,
+ ::UShortArray p2,
+ ::UShortArray_out p3
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ ::CharArray_slice * charArrayOp (
+ const ::CharArray p1,
+ ::CharArray p2,
+ ::CharArray_out p3
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ ::OctetArray_slice * octetArrayOp (
+ const ::OctetArray p1,
+ ::OctetArray p2,
+ ::OctetArray_out p3
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ ::DoubleArray_slice * doubleArrayOp (
+ const ::DoubleArray p1,
+ ::DoubleArray p2,
+ ::DoubleArray_out p3
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ ::LongArray_slice * a_longArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ void a_longArray (
+ const ::LongArray a_longArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ ::ULongArray_slice * a_ulongArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ void a_ulongArray (
+ const ::ULongArray a_ulongArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ ::StringArray_slice * a_stringArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ void a_stringArray (
+ const ::StringArray a_stringArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ ::ShortArray_slice * a_shortArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ void a_shortArray (
+ const ::ShortArray a_shortArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ ::UShortArray_slice * a_ushortArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ void a_ushortArray (
+ const ::UShortArray a_ushortArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ CORBA::Char a_char (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ void a_char (
+ ::CORBA::Char a_char
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ ::CharArray_slice * a_charArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ void a_charArray (
+ const ::CharArray a_charArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ ::OctetArray_slice * a_octetArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ void a_octetArray (
+ const ::OctetArray a_octetArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ ::DoubleArray_slice * a_doubleArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ void a_doubleArray (
+ const ::DoubleArray a_doubleArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ ::FloatArray_slice * a_floatArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ void a_floatArray (
+ const ::FloatArray a_floatArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ ::BucketArray_slice * a_bucketArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ void a_bucketArray (
+ const ::BucketArray a_bucketArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ ::AccountArray_slice * a_accountArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ void a_accountArray (
+ const ::AccountArray a_accountArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ ::BooleanArray_slice * a_booleanArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ void a_booleanArray (
+ const ::BooleanArray a_booleanArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ ::LongArrayArray_slice * a_longArrayArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ void a_longArrayArray (
+ const ::LongArrayArray a_longArrayArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ ::MyEnumArray_slice * a_myEnumArray (
+
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual
+ void a_myEnumArray (
+ const ::MyEnumArray a_myEnumArray
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+};
+
+
+#endif /* BROKEN_I_H_ */
diff --git a/TAO/tests/Bug_2188_Regression/client.cpp b/TAO/tests/Bug_2188_Regression/client.cpp
new file mode 100644
index 00000000000..154ea153d04
--- /dev/null
+++ b/TAO/tests/Bug_2188_Regression/client.cpp
@@ -0,0 +1,88 @@
+// $Id$
+
+#include "brokenC.h"
+#include "ace/Get_Opt.h"
+
+ACE_RCSID(Hello, client, "$Id$")
+
+const char *ior = "file://broken.ior";
+
+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[])
+{
+ ServerAdmin_var saobj;
+ CORBA::ORB_var orb;
+
+ ACE_TRY_NEW_ENV
+ {
+ orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (parse_args (argc, argv) != 0)
+ return 1;
+
+ CORBA::Object_var tmp =
+ orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ saobj = ServerAdmin::_narrow (tmp.in() ACE_ENV_ARG_PARAMETER);
+
+ if (CORBA::is_nil (saobj.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_DEBUG,
+ "Nil ServerAdmin reference <%s>\n",
+ ior),
+ 1);
+ }
+
+ ArrayTest_var atobj = saobj->target(ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ CharArray_slice * char_array = CharArray_alloc();
+ for (int i = 0; i < 10; i++)
+ char_array[i] = 'a' + i;
+ atobj->a_charArray (char_array ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ ACE_DEBUG ((LM_DEBUG, "a_charArray worked OK.\n"));
+
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "Exception caught:");
+ }
+ ACE_ENDTRY;
+
+ saobj->shutdown();
+
+ orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
+ return 0;
+}
diff --git a/TAO/tests/Bug_2188_Regression/run_test.pl b/TAO/tests/Bug_2188_Regression/run_test.pl
new file mode 100755
index 00000000000..d4110fcaef3
--- /dev/null
+++ b/TAO/tests/Bug_2188_Regression/run_test.pl
@@ -0,0 +1,61 @@
+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;
+$debug_level = '0';
+
+foreach $i (@ARGV) {
+ if ($i eq '-debug') {
+ $debug_level = '10';
+ }
+}
+
+$iorfile = PerlACE::LocalFile ("server.ior");
+unlink $iorfile;
+
+if (PerlACE::is_vxworks_test()) {
+ $SV = new PerlACE::ProcessVX ("server", "-ORBDebuglevel $debug_level -o server.ior");
+}
+else {
+ $SV = new PerlACE::Process ("server", "-ORBdebuglevel $debug_level -o $iorfile");
+}
+$CL = new PerlACE::Process ("client", " -k file://$iorfile");
+
+$server = $SV->Spawn ();
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\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 (); $SV->TimedWait (1);
+ exit 1;
+}
+
+$client = $CL->SpawnWaitKill (300);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
+}
+
+$server = $SV->WaitKill (10);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
+}
+
+unlink $iorfile;
+
+exit $status;
diff --git a/TAO/tests/Bug_2188_Regression/server.cpp b/TAO/tests/Bug_2188_Regression/server.cpp
new file mode 100644
index 00000000000..01ef2b0eece
--- /dev/null
+++ b/TAO/tests/Bug_2188_Regression/server.cpp
@@ -0,0 +1,124 @@
+// $Id$
+
+#include "broken_i.h"
+#include "ace/Get_Opt.h"
+#include "ace/OS_NS_stdio.h"
+
+ACE_RCSID (Hello,
+ server,
+ "$Id$")
+
+const char *ior_output_file = "broken.ior";
+
+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[])
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ CORBA::Object_var poa_object =
+ orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ PortableServer::POA_var root_poa =
+ PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (CORBA::is_nil (root_poa.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ " (%P|%t) Panic: nil RootPOA\n"),
+ 1);
+
+ PortableServer::POAManager_var poa_manager =
+ root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (parse_args (argc, argv) != 0)
+ return 1;
+
+ ArrayTest_i *target_servant;
+ ACE_NEW_RETURN (target_servant,ArrayTest_i,1);
+
+ PortableServer::ServantBase_var owner_transfer(target_servant);
+
+ ArrayTest_var atobj =
+ target_servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ ServerAdmin_i *servant;
+ ACE_NEW_RETURN (servant, ServerAdmin_i(atobj.in()),1);
+
+ // safely releases previous reference and takes ownership of this one.
+ owner_transfer = servant;
+
+ ServerAdmin_var saobj =
+ servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ CORBA::String_var ior =
+ orb->object_to_string (saobj.in () ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ // Output the IOR to the <ior_output_file>
+ 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);
+
+ poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
+
+ root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "Exception caught:");
+ return 1;
+ }
+ ACE_ENDTRY;
+
+ return 0;
+}