Code changes to support IPMI provider libraries

Change-Id: I4c349d88d4e98a6ca148a040b4ed12c628c6b95f
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
diff --git a/main.cpp b/main.cpp
index 108cf92..27b27c9 100644
--- a/main.cpp
+++ b/main.cpp
@@ -26,6 +26,9 @@
 std::tuple<session::Manager&, command::Table&> singletonPool(manager, table);
 
 sd_bus* bus = nullptr;
+FILE* ipmidbus = nullptr;
+unsigned short g_sel_reserve = 0xFFFF;
+sd_bus_slot* ipmid_slot = nullptr;
 
 /*
  * @brief Required by apphandler IPMI Provider Library
@@ -36,6 +39,14 @@
 }
 
 /*
+ * @brief Required by apphandler IPMI Provider Library
+ */
+unsigned short get_sel_reserve_id()
+{
+    return g_sel_reserve;
+}
+
+/*
  * TODO : The plan is to refactor the event loop to support adding multiple
  * file descriptors and event handlers for implementing the Serial Over LAN.
  *
@@ -72,7 +83,7 @@
     }
 
     // Execute the Command
-    auto outMessage = msgHandler.executeCommand(*inMessage.get());
+    auto outMessage = msgHandler.executeCommand(*(inMessage.get()));
     if (outMessage == nullptr)
     {
         std::cerr << "Execution of IPMI command failed\n";
@@ -80,7 +91,7 @@
     }
 
     // Send the response IPMI Message
-    msgHandler.send(*outMessage.get());
+    msgHandler.send(*(outMessage.get()));
 
     return 0;
 }
@@ -173,6 +184,12 @@
 
 int main(int i_argc, char* i_argv[])
 {
+
+    /*
+     * Required by apphandler IPMI Provider Library for logging.
+     */
+    ipmidbus =  fopen("/dev/null", "w");
+
     // Connect to system bus
     auto rc = sd_bus_open_system(&bus);
     if (rc < 0)