Skip to content

Commit de40179

Browse files
committed
Refs #9475: Added buffer to process decoded submessages
Signed-off-by: RaulSanchez <[email protected]>
1 parent 67c04ee commit de40179

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

include/fastdds/rtps/messages/MessageReceiver.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ class MessageReceiver
9090

9191
#if HAVE_SECURITY
9292
CDRMessage_t crypto_msg_;
93+
CDRMessage_t crypto_submsg_;
9394
#endif
9495

9596
//!Reset the MessageReceiver to process a new message.

src/cpp/rtps/messages/MessageReceiver.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ MessageReceiver::MessageReceiver(
5353
, timestamp_(c_TimeInvalid)
5454
#if HAVE_SECURITY
5555
, crypto_msg_(participant->is_secure() ? rec_buffer_size : 0)
56+
, crypto_submsg_(participant->is_secure() ? rec_buffer_size : 0)
5657
#endif // if HAVE_SECURITY
5758
{
5859
(void)rec_buffer_size;
@@ -199,7 +200,8 @@ void MessageReceiver::processCDRMsg(
199200
{
200201
// The original CDRMessage buffer (msg) now points to the proprietary temporary CDRMessage buffer (crypto_msg_).
201202
// This way the already decoded proprietary buffer is processed while it is being modified.
202-
*msg = CDRMessage_t(crypto_msg_);
203+
msg = auxiliary_buffer;
204+
auxiliary_buffer = &crypto_submsg_;
203205
}
204206
#endif // if HAVE_SECURITY
205207

0 commit comments

Comments
 (0)