summaryrefslogtreecommitdiffstats
path: root/message_handler.cpp
diff options
context:
space:
mode:
authorVernon Mauery <vernon.mauery@linux.intel.com>2018-10-25 08:52:23 -0700
committerVernon Mauery <vernon.mauery@linux.intel.com>2018-11-21 10:51:29 -0800
commit224f36a4e5b10ac3f84958307a61687cc041d064 (patch)
tree94c9d0a02fd24c46774e218cd92e16a5756d8497 /message_handler.cpp
parentd999ffc12211f5d5c6cd2196dd525e69e2fc0f58 (diff)
downloadphosphor-net-ipmid-224f36a4e5b10ac3f84958307a61687cc041d064.tar.gz
phosphor-net-ipmid-224f36a4e5b10ac3f84958307a61687cc041d064.zip
netipmid: use shared_ptr on session instead of shared_ptr+references
session objects were being created and held by shared_ptr objects and then shared via reference. This is dangerous and sidesteps the whole point of a shared_ptr, which is to share reference-counted ownership. This replaces the usage with a shared_ptr, which shows shared ownership. Change-Id: Ie22d812a6d260d606201eca6a9011e773c89e487 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
Diffstat (limited to 'message_handler.cpp')
-rw-r--r--message_handler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/message_handler.cpp b/message_handler.cpp
index b9cc6ab..68c1b60 100644
--- a/message_handler.cpp
+++ b/message_handler.cpp
@@ -168,7 +168,7 @@ void Handler::send(std::shared_ptr<Message> outMessage)
std::get<session::Manager&>(singletonPool).getSession(sessionID);
// Flatten the packet
- auto packet = parser::flatten(outMessage, sessionHeader, *session);
+ auto packet = parser::flatten(outMessage, sessionHeader, session);
// Write the packet
auto writeStatus = channel->write(packet);
OpenPOWER on IntegriCloud