summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2001-10-04 21:30:11 +0000
committerSteve Huston <shuston@riverace.com>2001-10-04 21:30:11 +0000
commit01f58e13d78aa60ecfd46e37d16ce5fd178cad75 (patch)
treee5c151f866b372cf5b1144d159a1d1c9f6c62f54
parent3cbc132c779bdb93f53611f4c94d1cc5c0c38343 (diff)
downloadATCD-01f58e13d78aa60ecfd46e37d16ce5fd178cad75.tar.gz
ChangeLogTag:Thu Oct 4 17:27:39 2001 Steve Huston <shuston@riverace.com>
-rw-r--r--ChangeLog7
-rw-r--r--ChangeLogs/ChangeLog-02a7
-rw-r--r--ChangeLogs/ChangeLog-03a7
-rw-r--r--examples/C++NPv1/Logging_Handler.cpp8
4 files changed, 28 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c611d9ba040..5c232bbe27d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Thu Oct 4 17:27:39 2001 Steve Huston <shuston@riverace.com>
+
+ * examples/C++NPv1/Logging_Handler.cpp (recv_log_record): Insure that
+ the payload message block is properly aligned for any CDR
+ extraction. Many thanks to Bala for noticing this problem and
+ sending code for the fix.
+
Thu Oct 4 17:08:39 2001 Steve Huston <shuston@riverace.com>
* examples/C++NPv1/Process_Per_Connection_Logging_Server.cpp:
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index c611d9ba040..5c232bbe27d 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,10 @@
+Thu Oct 4 17:27:39 2001 Steve Huston <shuston@riverace.com>
+
+ * examples/C++NPv1/Logging_Handler.cpp (recv_log_record): Insure that
+ the payload message block is properly aligned for any CDR
+ extraction. Many thanks to Bala for noticing this problem and
+ sending code for the fix.
+
Thu Oct 4 17:08:39 2001 Steve Huston <shuston@riverace.com>
* examples/C++NPv1/Process_Per_Connection_Logging_Server.cpp:
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index c611d9ba040..5c232bbe27d 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,10 @@
+Thu Oct 4 17:27:39 2001 Steve Huston <shuston@riverace.com>
+
+ * examples/C++NPv1/Logging_Handler.cpp (recv_log_record): Insure that
+ the payload message block is properly aligned for any CDR
+ extraction. Many thanks to Bala for noticing this problem and
+ sending code for the fix.
+
Thu Oct 4 17:08:39 2001 Steve Huston <shuston@riverace.com>
* examples/C++NPv1/Process_Per_Connection_Logging_Server.cpp:
diff --git a/examples/C++NPv1/Logging_Handler.cpp b/examples/C++NPv1/Logging_Handler.cpp
index cd4c8c4bdd8..3245762ec16 100644
--- a/examples/C++NPv1/Logging_Handler.cpp
+++ b/examples/C++NPv1/Logging_Handler.cpp
@@ -44,7 +44,13 @@ int Logging_Handler::recv_log_record (ACE_Message_Block *&mblk)
peer_addr.get_host_name (mblk->wr_ptr (), MAXHOSTNAMELEN);
mblk->wr_ptr (strlen (mblk->wr_ptr ()) + 1); // Go past name
- ACE_Message_Block *payload = new ACE_Message_Block (8);
+ // Allocate a message block for the payload; initially at least
+ // large enough to hold the header, but needs some room for
+ // alignment.
+ ACE_Message_Block *payload =
+ new ACE_Message_Block (ACE_DEFAULT_CDR_BUFSIZE);
+ // Align the Message Block for a CDR stream
+ ACE_CDR::mb_align (payload);
if (logging_peer_.recv_n (payload->wr_ptr (), 8) == 8) {
payload->wr_ptr (8); // Reflect addition of 8 bytes