Change the response buffer size passed to provider library
Change-Id: Ib943cd6487beb7232d5e1ead521febd992c83ce1
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
diff --git a/command_table.cpp b/command_table.cpp
index a49f92c..f0a8f17 100644
--- a/command_table.cpp
+++ b/command_table.cpp
@@ -3,8 +3,8 @@
#include <iomanip>
#include <iostream>
-#include <host-ipmid/ipmid-api.h>
#include "message_handler.hpp"
+#include "message_parsers.hpp"
#include "sessions_manager.hpp"
namespace command
@@ -81,8 +81,7 @@
std::vector<uint8_t>& commandData,
const message::Handler& handler)
{
-
- std::vector<uint8_t> response(MAX_IPMI_BUFFER);
+ std::vector<uint8_t> response(message::parser::MAX_PAYLOAD_SIZE - 1);
size_t respSize {};
ipmi_ret_t ipmiRC = functor(0, 0,
diff --git a/message_parsers.hpp b/message_parsers.hpp
index 7d46a88..118da6e 100644
--- a/message_parsers.hpp
+++ b/message_parsers.hpp
@@ -22,6 +22,9 @@
// RMCP Session Header Size
constexpr size_t RMCP_SESSION_HEADER_SIZE = 4;
+// Maximum payload size
+constexpr size_t MAX_PAYLOAD_SIZE = 255;
+
enum class SessionHeader
{
IPMI15 = 0x00,