summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgokhale <asgokhale@users.noreply.github.com>1998-01-22 01:39:25 +0000
committergokhale <asgokhale@users.noreply.github.com>1998-01-22 01:39:25 +0000
commitfb7a35bd5dea1f6a0ec3aa1004fcf66819d6e66a (patch)
tree9e6d30cc2e296951bd5e9f4d101a8d32ea9b2ef2
parentf1aea1a4d5c43e3e09a3f22dcc2ddfb949b17ddd (diff)
downloadATCD-fb7a35bd5dea1f6a0ec3aa1004fcf66819d6e66a.tar.gz
*** empty log message ***
-rw-r--r--TAO/ChangeLog-98c8
-rw-r--r--TAO/tao/decode.cpp6
-rw-r--r--TAO/tao/encode.cpp7
3 files changed, 18 insertions, 3 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c
index 0c609cea648..e7f25fa1154 100644
--- a/TAO/ChangeLog-98c
+++ b/TAO/ChangeLog-98c
@@ -1,3 +1,9 @@
+Wed Jan 21 19:38:02 1998 Aniruddha Gokhale <gokhale@mambo.cs.wustl.edu>
+
+ * tao/encode.cpp, decode.cpp: Fixed alignment problem. Done only
+ in Marshal_Struct for the time being. Details of this fix will be
+ inserted later.
+
Wed Jan 21 16:27:58 1998 Chris Cleeland <cleeland@tango.cs.wustl.edu>
* Makefile: Updated this to use the new release.pl file below.
@@ -10,7 +16,7 @@ Wed Jan 21 16:27:58 1998 Chris Cleeland <cleeland@tango.cs.wustl.edu>
Wed Jan 21 15:38:52 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
- * orbsvcs/Event_Service/Makefile:
+ * orbsvcs/Event_Service/Makefile:
Removed GPlot_File from the list, it does not compile on
Solaris/g++, but it is not needed.
diff --git a/TAO/tao/decode.cpp b/TAO/tao/decode.cpp
index d54bed410ce..c10b1cd951b 100644
--- a/TAO/tao/decode.cpp
+++ b/TAO/tao/decode.cpp
@@ -680,6 +680,8 @@ TAO_Marshal_Struct::decode (CORBA::TypeCode_ptr tc,
CORBA::TypeCode_ptr param;
CORBA::Long size, alignment;
+ void *start_addr = (void *)data;
+
// number of fields in the struct
int member_count = tc->member_count (env);
@@ -699,7 +701,9 @@ TAO_Marshal_Struct::decode (CORBA::TypeCode_ptr tc,
alignment = param->alignment (env);
if (env.exception () == 0)
{
- data = ptr_align_binary (data, alignment);
+ data = (const void *)((ptr_arith_t) ptr_align_binary (data, alignment) +
+ (ptr_arith_t) ptr_align_binary (start_addr, alignment) -
+ (ptr_arith_t) start_addr);
switch (param->kind_)
{
case CORBA::tk_null:
diff --git a/TAO/tao/encode.cpp b/TAO/tao/encode.cpp
index fe916f09271..6d8e8cc98bc 100644
--- a/TAO/tao/encode.cpp
+++ b/TAO/tao/encode.cpp
@@ -411,6 +411,8 @@ TAO_Marshal_Struct::encode (CORBA::TypeCode_ptr tc,
CORBA::TypeCode_ptr param;
CORBA::Long size, alignment;
+ void *start_addr = (void *)data;
+
if (env.exception () == 0)
{
int member_count = tc->member_count (env);
@@ -429,7 +431,10 @@ TAO_Marshal_Struct::encode (CORBA::TypeCode_ptr tc,
alignment = param->alignment (env);
if (env.exception () == 0)
{
- data = ptr_align_binary (data, alignment);
+ data = (const void *)
+ ((ptr_arith_t) ptr_align_binary (data, alignment) +
+ (ptr_arith_t) ptr_align_binary (start_addr, alignment) -
+ (ptr_arith_t) start_addr);
switch (param->kind_)
{
case CORBA::tk_null: