summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgokhale <asgokhale@users.noreply.github.com>1998-01-09 04:04:56 +0000
committergokhale <asgokhale@users.noreply.github.com>1998-01-09 04:04:56 +0000
commit8daef783161f9278ef884c76fcc522914313f39b (patch)
tree7d39303763d6ccdedc3252a46fbc6511c0e47dbb
parent83392fcb0e3994dd68829878b6f43ca8d578a052 (diff)
downloadATCD-8daef783161f9278ef884c76fcc522914313f39b.tar.gz
*** empty log message ***
-rw-r--r--TAO/ChangeLog-98c85
-rw-r--r--TAO/TAO_IDL/be/be_interface.cpp9
-rw-r--r--TAO/tao/deep_free.cpp6
-rw-r--r--TAO/tao/marshal.i2
-rw-r--r--TAO/tests/Param_Test/param_test.idl3
-rw-r--r--TAO/tests/Param_Test/tests.cpp92
6 files changed, 142 insertions, 55 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c
index 46f9211389b..73fb2039ea1 100644
--- a/TAO/ChangeLog-98c
+++ b/TAO/ChangeLog-98c
@@ -1,28 +1,42 @@
+Thu Jan 8 21:58:18 1998 Aniruddha Gokhale <gokhale@mambo.cs.wustl.edu>
+
+ * TAO_IDL/be/be_interface.cpp: be_interface::relative_skel_name ()
+ was producing incorrect results because we were overwriting an
+ internal string with '\0'
+
+ * TAO/tao/deep_free.cpp: Marshal_Struct::deep_free. Commented out
+ the call to String::deep_free if a member is a string because that
+ free should happen automatically as the member is a String_var
+ type. In addition, String::deep_free was setting the pointer to 0.
+
+ * TAO/tests/Param_Test: Added a string member field to the
+ var_struct. Also some modifications. Needs more improvement.
+
Thu Jan 08 17:48:49 1998 <coryan@CHA-CHA>
- * Naming_Service/NS_CosNaming.cpp:
- * orbsvcs/Naming_Service/CosNaming_i.cpp:
+ * Naming_Service/NS_CosNaming.cpp:
+ * orbsvcs/Naming_Service/CosNaming_i.cpp:
ACE_NESTED is only needed in the generated code.
- * Scheduling_Service/Scheduling_Service.cpp:
+ * Scheduling_Service/Scheduling_Service.cpp:
MSVC++ 5.0 seems to have a bug: if the implementation for the
scheduling service is stored into a RtecScheduler::Scheduler_ptr
then the server crashes; this is OK in other platforms and looks
OK since the pointers are in fact compatible.
- * tests/Event_Latency/Event_Latency.cpp:
+ * tests/Event_Latency/Event_Latency.cpp:
Removed some warnings by using "CORBA::ULong" instead of "int"
in comparisons against sequence<>::length.
- * Dump_Schedule/Dump_Schedule.dsp:
- * orbsvcs/orbsvcs_lib.dsp:
+ * Dump_Schedule/Dump_Schedule.dsp:
+ * orbsvcs/orbsvcs_lib.dsp:
Fixed some names and missing options.
Thu Jan 08 15:55:21 1998 Nanbor Wang <nw1@cs.wustl.edu>
- * tao/objtable.cpp:
- * tao/optable.cpp:
- * tao/orbobj.cpp:
+ * tao/objtable.cpp:
+ * tao/optable.cpp:
+ * tao/orbobj.cpp:
* orbsvcs/Naming_Service/CosNaming_i.cpp: Added missing template
instantiation codes.
@@ -33,39 +47,52 @@ Thu Jan 8 12:53:28 1998 Chris Cleeland <cleeland@cs.wustl.edu>
these functions in the 2.0 or 2.1 spec, but what good are wstrings
if you can't make copies? Plus, Irfan really wanted it.
+Thu Jan 8 11:36:38 1998 Aniruddha Gokhale <gokhale@mambo.cs.wustl.edu>
+
+ * TAO_IDL/be_include/be_interface.h, TAO_IDL/be/be_interface.cpp:
+ Added a method called "relative_skel_name" to be used for
+ generating names of inherited interfaces in the keleton class
+ name.
+
+ * TAO_IDL/be/be_state_argument.cpp: Generation of space was
+ missing after the "native" type in a parameter list declaration.
+
+ * TAO_IDL/fe/{y.tab.*, lex.yy.cpp}: Due to changes in the idl.ll
+ and idl.yy files, these had to be regenerated.
+
Thu Jan 08 00:14:56 1998 <coryan@MILONGA>
- * orbsvcs/orbsvcs.dsw:
- * orbsvcs/Dump_Schedule/Dump_Schedule.dsp:
- * orbsvcs/Dump_Schedule/Dump_Schedule.dsw:
- * orbsvcs/Event_Service/Event_Service.dsp:
- * orbsvcs/Event_Service/Event_Service.dsw:
- * orbsvcs/Naming_Service/Naming_Service.dsp:
- * orbsvcs/Naming_Service/Naming_Service.dsw:
- * orbsvcs/Scheduling_Service/Scheduling_Service.dsp:
- * orbsvcs/Scheduling_Service/Scheduling_Service.dsw:
- * orbsvcs/tests/Event_Latency/Event_Latency.dsp:
- * orbsvcs/tests/Event_Latency/Event_Latency.dsw:
+ * orbsvcs/orbsvcs.dsw:
+ * orbsvcs/Dump_Schedule/Dump_Schedule.dsp:
+ * orbsvcs/Dump_Schedule/Dump_Schedule.dsw:
+ * orbsvcs/Event_Service/Event_Service.dsp:
+ * orbsvcs/Event_Service/Event_Service.dsw:
+ * orbsvcs/Naming_Service/Naming_Service.dsp:
+ * orbsvcs/Naming_Service/Naming_Service.dsw:
+ * orbsvcs/Scheduling_Service/Scheduling_Service.dsp:
+ * orbsvcs/Scheduling_Service/Scheduling_Service.dsw:
+ * orbsvcs/tests/Event_Latency/Event_Latency.dsp:
+ * orbsvcs/tests/Event_Latency/Event_Latency.dsw:
Added preliminar (untested) versions of the project files for
MSVC++ 5.0.
Wed Jan 7 22:41:41 1998 Carlos O'Ryan <coryan@swarm.cs.wustl.edu>
- * tao/corba.h:
+ * tao/corba.h:
Removed varout.h from the list of included files; it is no used
and would abort compilation on IRIX.
- * tests/Cubit/TAO/IDL_Cubit/clnt.cpp:
- * tao/orbobj.cpp:
+ * tests/Cubit/TAO/IDL_Cubit/clnt.cpp:
+ * tao/orbobj.cpp:
Added missing template instantiations.
- * tao/varout.h:
+ * tao/varout.h:
Some fixes, but actually the changes were aborted, Andy informed
me that the file wasn't really used.
Wed Jan 07 21:52:20 1998 <coryan@MILONGA>
- * TAO_IDL/tao_idl.dsp:
+ * TAO_IDL/tao_idl.dsp:
Added the new native_* functions to the project file.
Also use the new tao_idl.cpp file in the top level directory.
@@ -78,10 +105,10 @@ Wed Jan 7 20:20:56 1998 Sergio Flores <sergio@polka.cs.wustl.edu>
Wed Jan 7 18:00:08 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
- * TAO_IDL/Makefile:
- * TAO_IDL/tao_idl.cpp:
- * TAO_IDL/driver/Makefile:
- * TAO_IDL/driver/drv_main.cpp:
+ * TAO_IDL/Makefile:
+ * TAO_IDL/tao_idl.cpp:
+ * TAO_IDL/driver/Makefile:
+ * TAO_IDL/driver/drv_main.cpp:
Moved the main() routine to the topmost directory, this is
needed for platforms like SGI that will not link a group of
shared libraries without any object files. It also seems more
diff --git a/TAO/TAO_IDL/be/be_interface.cpp b/TAO/TAO_IDL/be/be_interface.cpp
index e063dbffe7e..b55b41f03cd 100644
--- a/TAO/TAO_IDL/be/be_interface.cpp
+++ b/TAO/TAO_IDL/be/be_interface.cpp
@@ -1811,6 +1811,15 @@ be_interface::relative_skel_name (const char *skelname)
}
else
{
+ // we had overwritten a ':' by a '\0' for string comparison. We
+ // revert back because we want the rest of the relative name to be
+ // used
+ if (def_next)
+ *def_next = ':';
+
+ if (use_next)
+ *use_next = ':';
+
// no match. This is the end of the first argument. Get out
// of the loop as no more comparisons are necessary
break;
diff --git a/TAO/tao/deep_free.cpp b/TAO/tao/deep_free.cpp
index 004b09bb0e4..b6380a69bba 100644
--- a/TAO/tao/deep_free.cpp
+++ b/TAO/tao/deep_free.cpp
@@ -32,10 +32,6 @@
extern CORBA::TypeCode TC_opaque;
-// Deep copy from "source" to "dest" ... this code "knows" a bit about
-// representations, verify it when porting to oddball platforms with
-// non-IEEE floating point values or atypical byte and word sizes.
-
CORBA::TypeCode::traverse_status
DEEP_FREE (CORBA::TypeCode_ptr param,
const void *source,
@@ -226,7 +222,7 @@ TAO_Marshal_Struct::deep_free (CORBA::TypeCode_ptr tc,
retval = TAO_Marshal_Union::deep_free (param, source, dest, env);
break;
case CORBA::tk_string:
- retval = TAO_Marshal_String::deep_free (param, &source, dest, env);
+ //retval = TAO_Marshal_String::deep_free (param, &source, dest, env);
break;
case CORBA::tk_sequence:
retval = TAO_Marshal_Sequence::deep_free (param, source, dest, env);
diff --git a/TAO/tao/marshal.i b/TAO/tao/marshal.i
index c2286105df0..fc44da1b79c 100644
--- a/TAO/tao/marshal.i
+++ b/TAO/tao/marshal.i
@@ -271,7 +271,7 @@ TAO_Marshal_String::deep_free (CORBA::TypeCode_ptr,
CORBA::Environment &)
{
CORBA::string_free (*(CORBA::String *) source);
- *(CORBA::String *)source = 0;
+ // *(CORBA::String *)source = 0;
return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
diff --git a/TAO/tests/Param_Test/param_test.idl b/TAO/tests/Param_Test/param_test.idl
index f94eca36b1d..284fcb0645c 100644
--- a/TAO/tests/Param_Test/param_test.idl
+++ b/TAO/tests/Param_Test/param_test.idl
@@ -70,7 +70,8 @@ interface Param_Test
// variable structures
struct Var_Struct
{
- StrSeq seq; // this field makes the structure variable
+ string dummy;
+ StrSeq seq;
};
Var_Struct test_var_struct (in Var_Struct s1,
diff --git a/TAO/tests/Param_Test/tests.cpp b/TAO/tests/Param_Test/tests.cpp
index f8fd02a48db..53aa7c7b329 100644
--- a/TAO/tests/Param_Test/tests.cpp
+++ b/TAO/tests/Param_Test/tests.cpp
@@ -498,8 +498,17 @@ Test_String_Sequence::init_parameters (Param_Test_ptr objref,
ACE_UNUSED_ARG (objref);
ACE_UNUSED_ARG (env);
+ const char *choiceList[] =
+ {
+ "one",
+ "two",
+ "three"
+ };
+
+ CORBA::ULong len = sizeof(choiceList)/sizeof(char *);
+
// get some sequence length (not more than 10)
- CORBA::ULong len = (CORBA::ULong) (gen->gen_long () % 10) + 1;
+ // CORBA::ULong len = (CORBA::ULong) (gen->gen_long () % 10) + 1;
// set the length of the sequence
this->in_->length (len);
@@ -508,8 +517,10 @@ Test_String_Sequence::init_parameters (Param_Test_ptr objref,
{
// generate some arbitrary string to be filled into the ith location in
// the sequence
- char *str = gen->gen_string ();
- this->in_[i] = str;
+ // char *str = gen->gen_string ();
+ //this->in_[i] = str;
+ this->in_[i] = choiceList[i];
+
}
return 0;
}
@@ -595,24 +606,52 @@ Test_String_Sequence::check_validity (CORBA::Request_ptr req)
void
Test_String_Sequence::print_values (void)
{
- for (CORBA::ULong i=0; i < this->in_->length (); i++)
+ CORBA::ULong i;
+ ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
+ for (i=0; this->in_.ptr () && (i < this->in_->length ()); i++)
{
ACE_DEBUG ((LM_DEBUG,
- "\n*=*=*=*=*=*=*=*=*=*=\n"
- "Element # %d\n"
- "in (len = %d): %s\n"
- "inout (len = %d): %s\n"
- "out (len = %d): %s\n"
- "ret (len = %d): %s\n",
- this->in_->length (),
- (this->in_->length ()? (char *)this->in_[i]:"<nul>"),
- this->inout_->length (),
- (this->inout_->length ()? (char *)this->inout_[i]:"<nul>"),
- this->out_->length (),
- (this->out_->length ()? (char *)this->out_[i]:"<nul>"),
- this->ret_->length (),
- (this->ret_->length ()? (char *)this->ret_[i]:"<nul>")));
+ "Element #%d\n"
+ "in : %s\n",
+ i,
+ (this->in_[i].in ()? (char *)this->in_[i].in ():"<nul>")));
}
+ if (!this->in_.ptr ())
+ ACE_DEBUG ((LM_DEBUG, "\nin sequence is NUL\n"));
+ ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
+ for (i=0; this->inout_.ptr () && (i < this->inout_->length ()); i++)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Element #%d\n"
+ "in : %s\n",
+ i,
+ (this->inout_[i].in ()? (char *)this->inout_[i].in ():"<nul>")));
+ }
+ if (!this->inout_.ptr ())
+ ACE_DEBUG ((LM_DEBUG, "\ninout sequence is NUL\n"));
+ ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
+ for (i=0; this->out_.ptr () && (i < this->out_->length ()); i++)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Element #%d\n"
+ "in : %s\n",
+ i,
+ (this->out_[i].in ()? (char *)this->out_[i].in ():"<nul>")));
+ }
+ if (!this->out_.ptr ())
+ ACE_DEBUG ((LM_DEBUG, "\nout sequence is NUL\n"));
+ ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
+ for (i=0; this->ret_.ptr () && (i < this->ret_->length ()); i++)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Element #%d\n"
+ "in : %s\n",
+ i,
+ (this->ret_[i].in ()? (char *)this->ret_[i].in ():"<nul>")));
+ }
+ if (!this->ret_.ptr ())
+ ACE_DEBUG ((LM_DEBUG, "\nin sequence is NUL\n"));
+ ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
}
// ************************************************************************
@@ -653,6 +692,7 @@ Test_Var_Struct::init_parameters (Param_Test_ptr objref,
CORBA::ULong len = (CORBA::ULong) (gen->gen_long () % 10) + 1;
// set the length of the sequence
+ this->in_.dummy = gen->gen_string ();
this->in_.seq.length (len);
// now set each individual element
for (CORBA::ULong i=0; i < this->in_.seq.length (); i++)
@@ -712,7 +752,10 @@ CORBA::Boolean
Test_Var_Struct::check_validity (void)
{
CORBA::Boolean flag = 0;
- if ((this->in_.seq.length () == this->inout_->seq.length ()) &&
+ if ((!ACE_OS::strcmp (this->in_.dummy, this->inout_->dummy)) &&
+ (!ACE_OS::strcmp (this->in_.dummy, this->out_->dummy)) &&
+ (!ACE_OS::strcmp (this->in_.dummy, this->ret_->dummy)) &&
+ (this->in_.seq.length () == this->inout_->seq.length ()) &&
(this->in_.seq.length () == this->out_->seq.length ()) &&
(this->in_.seq.length () == this->ret_->seq.length ()))
{
@@ -746,6 +789,17 @@ Test_Var_Struct::check_validity (CORBA::Request_ptr req)
void
Test_Var_Struct::print_values (void)
{
+ ACE_DEBUG ((LM_DEBUG,
+ "\n*=*=*=*=*=*=*=*=*=*=\n"
+ "in_.dummy = %s\n"
+ "inout_.dummy = %s\n"
+ "out_.dummy = %s\n"
+ "ret_.dummy = %s\n",
+ this->in_.dummy.in (),
+ this->inout_->dummy.in (),
+ this->out_->dummy.in (),
+ this->ret_->dummy.in ()));
+
for (CORBA::ULong i=0; i < this->in_.seq.length (); i++)
{
ACE_DEBUG ((LM_DEBUG,