make internal command functor match external

The internal command functor was getting passed a
const message::Handler& instead of a std::shared_ptr<message::Handler>
which will not work with an upcoming patch that needs the functor to be
able to modify the Handler object. Also, it is convenient to have the
same signature for both types of handlers.

Tested: run ipmitool to see that behavior does not change.

Change-Id: Ie8660e4d16bd66eccc282aef2594b88c25b847db
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
diff --git a/command/session_cmds.cpp b/command/session_cmds.cpp
index 84c6e85..1b51612 100644
--- a/command/session_cmds.cpp
+++ b/command/session_cmds.cpp
@@ -18,7 +18,7 @@
 
 std::vector<uint8_t>
     setSessionPrivilegeLevel(const std::vector<uint8_t>& inPayload,
-                             const message::Handler& handler)
+                             std::shared_ptr<message::Handler>& handler)
 {
     auto request =
         reinterpret_cast<const SetSessionPrivLevelReq*>(inPayload.data());
@@ -34,7 +34,7 @@
     response->completionCode = IPMI_CC_OK;
     uint8_t reqPrivilegeLevel = request->reqPrivLevel;
 
-    auto session = session::Manager::get().getSession(handler.sessionID);
+    auto session = session::Manager::get().getSession(handler->sessionID);
 
     if (reqPrivilegeLevel == 0) // Just return present privilege level
     {
@@ -209,7 +209,7 @@
 }
 
 std::vector<uint8_t> closeSession(const std::vector<uint8_t>& inPayload,
-                                  const message::Handler& handler)
+                                  std::shared_ptr<message::Handler>& handler)
 {
     // minimum inPayload size is reqSessionId (uint32_t)
     // maximum inPayload size is struct CloseSessionRequest
@@ -260,7 +260,7 @@
     {
         ipmiNetworkInstance = session::Manager::get().getNetworkInstance();
         auto currentSession =
-            session::Manager::get().getSession(handler.sessionID);
+            session::Manager::get().getSession(handler->sessionID);
         currentSessionPriv = currentSession->currentPrivilege();
     }
     catch (sdbusplus::exception::SdBusError& e)