summaryrefslogtreecommitdiffstats
path: root/common/resourceaccess.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-01-19 12:19:02 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-01-19 12:19:02 +0100
commitf98a44f22d30b7406b11956a2f2de8890df84c86 (patch)
tree9fdf9a162da0aa6f182749bf8a7a51b503bd1b6f /common/resourceaccess.cpp
parent657826000d519a2aa1ac4811dac91eff6ce7e982 (diff)
downloadsink-f98a44f22d30b7406b11956a2f2de8890df84c86.tar.gz
sink-f98a44f22d30b7406b11956a2f2de8890df84c86.zip
we have to copy the memory here
Diffstat (limited to 'common/resourceaccess.cpp')
-rw-r--r--common/resourceaccess.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp
index b264619..d2aa969 100644
--- a/common/resourceaccess.cpp
+++ b/common/resourceaccess.cpp
@@ -550,10 +550,12 @@ bool ResourceAccess::processMessageBuffer()
550 Log(d->resourceInstanceIdentifier) << "Received inspection notification."; 550 Log(d->resourceInstanceIdentifier) << "Received inspection notification.";
551 ResourceNotification n; 551 ResourceNotification n;
552 if (buffer->identifier()) { 552 if (buffer->identifier()) {
553 n.id = QByteArray::fromRawData(reinterpret_cast<char const *>(buffer->identifier()->Data()), buffer->identifier()->size()); 553 //Don't use fromRawData, the buffer is gone once we invoke emit notification
554 n.id = QByteArray(reinterpret_cast<char const *>(buffer->identifier()->Data()), buffer->identifier()->size());
554 } 555 }
555 if (buffer->message()) { 556 if (buffer->message()) {
556 n.message = QByteArray::fromRawData(reinterpret_cast<char const *>(buffer->message()->Data()), buffer->message()->size()); 557 //Don't use fromRawData, the buffer is gone once we invoke emit notification
558 n.message = QByteArray(reinterpret_cast<char const *>(buffer->message()->Data()), buffer->message()->size());
557 } 559 }
558 n.type = buffer->type(); 560 n.type = buffer->type();
559 n.code = buffer->code(); 561 n.code = buffer->code();