ID: 254 - Fix retry of authentication capabilities retrieval

When lan or lanplus session is being opened, ipmi_get_auth_capabilities_cmd() is
called twice. Now that we have -R and -N options it's not necessary to have such
weird code, especially with comment ``I'm not sure why we accept a failure for
the first call''.

Commit for Jan Safranek
This commit is contained in:
Zdenek Styblik 2013-07-07 15:22:10 +00:00
parent e8125c2405
commit a472c382f4
2 changed files with 4 additions and 13 deletions

View File

@ -1959,10 +1959,7 @@ ipmi_lan_activate_session(struct ipmi_intf * intf)
rc = ipmi_get_auth_capabilities_cmd(intf);
if (rc < 0) {
sleep(1);
rc = ipmi_get_auth_capabilities_cmd(intf);
if (rc < 0)
goto fail;
goto fail;
}
rc = ipmi_get_session_challenge_cmd(intf);

View File

@ -3414,18 +3414,12 @@ ipmi_lanplus_open(struct ipmi_intf * intf)
/*
*
* Make sure the BMC supports IPMI v2 / RMCP+
*
* I'm not sure why we accept a failure for the first call
*/
if (!ipmi_oem_active(intf, "i82571spt") &&
ipmi_get_auth_capabilities_cmd(intf, &auth_cap)) {
sleep(1);
if (ipmi_get_auth_capabilities_cmd(intf, &auth_cap));
{
lprintf(LOG_INFO, "Error issuing Get Channel "
"Authentication Capabilies request");
goto fail;
}
lprintf(LOG_INFO, "Error issuing Get Channel "
"Authentication Capabilies request");
goto fail;
}
if (!ipmi_oem_active(intf, "i82571spt") && ! auth_cap.v20_data_available)