diff options
author | Brian Silver <bsilver@us.ibm.com> | 2014-10-06 13:45:16 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-11-12 08:26:50 -0600 |
commit | e92561c3352a4af3b1b8506fae61652cde4ee3d5 (patch) | |
tree | 0c4fe19f433cb22180ea42b0e84fb584b7b85bec /src/usr/ipmi/ipmimsg.C | |
parent | 17aadfc41822980c53ca70340dabcf84ac611601 (diff) | |
download | talos-hostboot-e92561c3352a4af3b1b8506fae61652cde4ee3d5.tar.gz talos-hostboot-e92561c3352a4af3b1b8506fae61652cde4ee3d5.zip |
Add response timeouts and event requests
Change-Id: I2a763e5e3ea59e6afb7b7ab7d088fb236ee3428e
Depends-On: I8f6a590b29d9171389d10abc5b6e68f91ac94d16
RTC: 116300
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/13856
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/ipmi/ipmimsg.C')
-rw-r--r-- | src/usr/ipmi/ipmimsg.C | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/usr/ipmi/ipmimsg.C b/src/usr/ipmi/ipmimsg.C index 09aa61b77..6b3b5fd4a 100644 --- a/src/usr/ipmi/ipmimsg.C +++ b/src/usr/ipmi/ipmimsg.C @@ -46,39 +46,38 @@ namespace IPMI { /// /// @brief msg ctor - /// @param[in] i_netfun, the network function - /// @param[in] i_cmd, the network command - /// @param[in] i_data, the data for the command + /// @param[in] i_cmd, the network function & command /// @param[in] i_len, the length of the data /// @param[in] i_data, the data (new'd space) /// - Message::Message(const network_function i_netfun, - const uint8_t i_cmd, const uint8_t i_len, + Message::Message(const command_t& i_cmd, + const uint8_t i_len, uint8_t* i_data): iv_msg(msg_allocate()), iv_key(0), iv_len(i_len), - iv_netfun(i_netfun), + iv_netfun(i_cmd.first), iv_seq(iv_key), - iv_cmd(i_cmd), + iv_cmd(i_cmd.second), iv_cc(0), iv_state(0), iv_errl(NULL), iv_data(i_data) { + iv_timeout.tv_sec = 0; + iv_timeout.tv_nsec = 0; } /// /// @brief static factory - /// @param[in] i_netfun, the network function - /// @param[in] i_cmd, the network command - /// @param[in] i_data, the data for the command + /// @param[in] i_cmd, the network function & command /// @param[in] i_len, the length of the data /// @param[in] i_data, the data (allocated space) /// @param[in] i_type, synchronous or async /// - Message* Message::factory(const network_function i_netfun, - const uint8_t i_cmd, const uint8_t i_len, + /// @return a pointer to a new'd Message object + /// + Message* Message::factory(const command_t& i_cmd, const uint8_t i_len, uint8_t* i_data, const message_type i_type) { Message* new_message = NULL; @@ -87,10 +86,10 @@ namespace IPMI switch(i_type) { case TYPE_SYNC: - new_message = new BTSyncMessage(i_netfun, i_cmd, i_len, i_data); + new_message = new BTSyncMessage(i_cmd, i_len, i_data); break; case TYPE_ASYNC: - new_message = new BTAsyncMessage(i_netfun, i_cmd, i_len, i_data); + new_message = new BTAsyncMessage(i_cmd, i_len, i_data); break; default: // We have ourselves a bug |