mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
fix retry handling for SOL
This commit is contained in:
parent
29dbaf6882
commit
b8d9ada302
@ -1247,19 +1247,26 @@ processSolUserInput(
|
|||||||
if (length)
|
if (length)
|
||||||
{
|
{
|
||||||
struct ipmi_rs * rsp;
|
struct ipmi_rs * rsp;
|
||||||
|
int try = 0;
|
||||||
|
|
||||||
|
while (try < intf->session->retry) {
|
||||||
|
|
||||||
v2_payload.payload.sol_packet.character_count = length;
|
v2_payload.payload.sol_packet.character_count = length;
|
||||||
rsp = intf->send_sol(intf, &v2_payload);
|
rsp = intf->send_sol(intf, &v2_payload);
|
||||||
|
|
||||||
|
if (rsp)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
usleep(5000);
|
||||||
|
try++;
|
||||||
|
}
|
||||||
|
|
||||||
if (! rsp)
|
if (! rsp)
|
||||||
{
|
{
|
||||||
rsp = intf->send_sol(intf, &v2_payload);
|
lprintf(LOG_ERR, "Error sending SOL data: FAIL");
|
||||||
lprintf(LOG_ERR, "Error sending SOL data: RETRY");
|
retval = -1;
|
||||||
if (! rsp)
|
|
||||||
{
|
|
||||||
lprintf(LOG_ERR, "Error sending SOL data: FAIL");
|
|
||||||
retval = -1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the sequence number is set we know we have new data */
|
/* If the sequence number is set we know we have new data */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user