mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-11 19:17:22 +00:00
* Fix req_seq issue with RMCP+
This commit is contained in:
parent
738cf02694
commit
cd7e75a9d5
@ -287,7 +287,7 @@ static const struct valstr plus_payload_types_vals[] = {
|
|||||||
|
|
||||||
|
|
||||||
static struct ipmi_rq_entry *
|
static struct ipmi_rq_entry *
|
||||||
ipmi_req_add_entry(struct ipmi_intf * intf, struct ipmi_rq * req)
|
ipmi_req_add_entry(struct ipmi_intf * intf, struct ipmi_rq * req, uint8_t req_seq)
|
||||||
{
|
{
|
||||||
struct ipmi_rq_entry * e;
|
struct ipmi_rq_entry * e;
|
||||||
|
|
||||||
@ -301,6 +301,7 @@ ipmi_req_add_entry(struct ipmi_intf * intf, struct ipmi_rq * req)
|
|||||||
memcpy(&e->req, req, sizeof(struct ipmi_rq));
|
memcpy(&e->req, req, sizeof(struct ipmi_rq));
|
||||||
|
|
||||||
e->intf = intf;
|
e->intf = intf;
|
||||||
|
e->rq_seq = req_seq;
|
||||||
|
|
||||||
if (ipmi_req_entries == NULL)
|
if (ipmi_req_entries == NULL)
|
||||||
ipmi_req_entries = e;
|
ipmi_req_entries = e;
|
||||||
@ -1698,10 +1699,13 @@ ipmi_lanplus_build_v2x_ipmi_cmd(
|
|||||||
* representation far below.
|
* representation far below.
|
||||||
*/
|
*/
|
||||||
static uint8_t curr_seq = 0;
|
static uint8_t curr_seq = 0;
|
||||||
|
|
||||||
|
curr_seq += 1;
|
||||||
|
|
||||||
if (curr_seq >= 64)
|
if (curr_seq >= 64)
|
||||||
curr_seq = 0;
|
curr_seq = 0;
|
||||||
|
|
||||||
entry = ipmi_req_add_entry(intf, req);
|
entry = ipmi_req_add_entry(intf, req, curr_seq);
|
||||||
if (entry == NULL)
|
if (entry == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
@ -1766,7 +1770,7 @@ ipmi_lanplus_build_v15_ipmi_cmd(
|
|||||||
struct ipmi_session * session = intf->session;
|
struct ipmi_session * session = intf->session;
|
||||||
struct ipmi_rq_entry * entry;
|
struct ipmi_rq_entry * entry;
|
||||||
|
|
||||||
entry = ipmi_req_add_entry(intf, req);
|
entry = ipmi_req_add_entry(intf, req, 0);
|
||||||
if (entry == NULL)
|
if (entry == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user