Session Commands Implementation

Implements Set Session Privilege Command and Close Session
command.

Change-Id: I18aeee7bcae48db3eb8a61292c9333ca2304dcf1
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
diff --git a/sessions_manager.cpp b/sessions_manager.cpp
index ff17727..a2d2d8d 100644
--- a/sessions_manager.cpp
+++ b/sessions_manager.cpp
@@ -97,16 +97,17 @@
     return getSession(sessionID);
 }
 
-void Manager::stopSession(SessionID bmcSessionID)
+bool Manager::stopSession(SessionID bmcSessionID)
 {
-    // If the session is valid and not session zero
-    if(bmcSessionID != SESSION_ZERO)
+    auto iter = sessionsMap.find(bmcSessionID);
+    if (iter != sessionsMap.end())
     {
-        auto iter = sessionsMap.find(bmcSessionID);
-        if (iter != sessionsMap.end())
-        {
-            iter->second->state = State::TEAR_DOWN_IN_PROGRESS;
-        }
+        iter->second->state = State::TEAR_DOWN_IN_PROGRESS;
+        return true;
+    }
+    else
+    {
+        return false;
     }
 }