mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
REVERT - ID: 3522731 - 'lib/ipmi_sol.c' - ipmi_get_sol_info() returns always 0
I'm reverting to previous revision, because I've realized these ``if (rsp != NULL)'' became redundant. I'm sorry about that.
This commit is contained in:
parent
f8f6d51fd2
commit
a974ab2c69
@ -208,6 +208,7 @@ ipmi_get_sol_info(
|
||||
req.msg.data_len = 4;
|
||||
req.msg.data = data;
|
||||
|
||||
|
||||
/*
|
||||
* set in progress
|
||||
*/
|
||||
@ -218,11 +219,6 @@ ipmi_get_sol_info(
|
||||
data[3] = 0x00; /* block selector */
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Error: No response requesting SOL parameter '%s'",
|
||||
val2str(data[1], sol_parameter_vals));
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (NULL != rsp) {
|
||||
switch (rsp->ccode) {
|
||||
@ -246,6 +242,9 @@ ipmi_get_sol_info(
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
lprintf(LOG_ERR, "Error: No response requesting SOL parameter '%s'",
|
||||
val2str(data[1], sol_parameter_vals));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -258,11 +257,6 @@ ipmi_get_sol_info(
|
||||
data[3] = 0x00; /* block selector */
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Error: No response requesting SOL parameter '%s'",
|
||||
val2str(data[1], sol_parameter_vals));
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (NULL != rsp) {
|
||||
switch (rsp->ccode) {
|
||||
@ -286,6 +280,9 @@ ipmi_get_sol_info(
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
lprintf(LOG_ERR, "Error: No response requesting SOL parameter '%s'",
|
||||
val2str(data[1], sol_parameter_vals));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -298,12 +295,6 @@ ipmi_get_sol_info(
|
||||
data[3] = 0x00; /* block selector */
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Error: No response requesting SOL parameter '%s'",
|
||||
val2str(data[1], sol_parameter_vals));
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (NULL != rsp) {
|
||||
switch (rsp->ccode) {
|
||||
case 0x00:
|
||||
@ -328,6 +319,9 @@ ipmi_get_sol_info(
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
lprintf(LOG_ERR, "Error: No response requesting SOL parameter '%s'",
|
||||
val2str(data[1], sol_parameter_vals));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -340,12 +334,6 @@ ipmi_get_sol_info(
|
||||
data[3] = 0x00; /* block selector */
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Error: No response requesting SOL parameter '%s'",
|
||||
val2str(data[1], sol_parameter_vals));
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (NULL != rsp) {
|
||||
switch (rsp->ccode) {
|
||||
case 0x00:
|
||||
@ -369,6 +357,9 @@ ipmi_get_sol_info(
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
lprintf(LOG_ERR, "Error: No response requesting SOL parameter '%s'",
|
||||
val2str(data[1], sol_parameter_vals));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -381,12 +372,6 @@ ipmi_get_sol_info(
|
||||
data[3] = 0x00; /* block selector */
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Error: No response requesting SOL parameter '%s'",
|
||||
val2str(data[1], sol_parameter_vals));
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (NULL != rsp) {
|
||||
switch (rsp->ccode) {
|
||||
case 0x00:
|
||||
@ -410,6 +395,9 @@ ipmi_get_sol_info(
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
lprintf(LOG_ERR, "Error: No response requesting SOL parameter '%s'",
|
||||
val2str(data[1], sol_parameter_vals));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -422,12 +410,6 @@ ipmi_get_sol_info(
|
||||
data[3] = 0x00; /* block selector */
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Error: No response requesting SOL parameter '%s'",
|
||||
val2str(data[1], sol_parameter_vals));
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (NULL != rsp) {
|
||||
switch (rsp->ccode) {
|
||||
case 0x00:
|
||||
@ -450,6 +432,9 @@ ipmi_get_sol_info(
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
lprintf(LOG_ERR, "Error: No response requesting SOL parameter '%s'",
|
||||
val2str(data[1], sol_parameter_vals));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -462,12 +447,6 @@ ipmi_get_sol_info(
|
||||
data[3] = 0x00; /* block selector */
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Error: No response requesting SOL parameter '%s'",
|
||||
val2str(data[1], sol_parameter_vals));
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (NULL != rsp) {
|
||||
switch (rsp->ccode) {
|
||||
case 0x00:
|
||||
@ -490,6 +469,9 @@ ipmi_get_sol_info(
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
lprintf(LOG_ERR, "Error: No response requesting SOL parameter '%s'",
|
||||
val2str(data[1], sol_parameter_vals));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -502,12 +484,6 @@ ipmi_get_sol_info(
|
||||
data[3] = 0x00; /* block selector */
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Error: No response requesting SOL parameter '%s'",
|
||||
val2str(data[1], sol_parameter_vals));
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (NULL != rsp) {
|
||||
switch (rsp->ccode) {
|
||||
case 0x00:
|
||||
@ -531,6 +507,9 @@ ipmi_get_sol_info(
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
lprintf(LOG_ERR, "Error: No response requesting SOL parameter '%s'",
|
||||
val2str(data[1], sol_parameter_vals));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -543,12 +522,6 @@ ipmi_get_sol_info(
|
||||
data[3] = 0x00; /* block selector */
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Error: No response requesting SOL parameter '%s'",
|
||||
val2str(data[1], sol_parameter_vals));
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (NULL != rsp) {
|
||||
switch (rsp->ccode) {
|
||||
case 0x00:
|
||||
@ -562,15 +535,11 @@ ipmi_get_sol_info(
|
||||
}
|
||||
break;
|
||||
case 0x80:
|
||||
if( intf->session != NULL ) {
|
||||
lprintf(LOG_ERR, "Info: SOL parameter '%s' not supported - defaulting to %d",
|
||||
val2str(data[1], sol_parameter_vals), intf->session->port);
|
||||
if( intf->session != NULL ){
|
||||
lprintf(LOG_ERR, "Info: SOL parameter '%s' not supported - defaulting to %d", val2str(data[1], sol_parameter_vals), intf->session->port);
|
||||
params->payload_port = intf->session->port;
|
||||
} else {
|
||||
lprintf(LOG_ERR,
|
||||
"Info: SOL parameter '%s' not supported - can't determine which "
|
||||
"payload port to use on NULL session",
|
||||
val2str(data[1], sol_parameter_vals));
|
||||
lprintf(LOG_ERR, "Info: SOL parameter '%s' not supported - can't determine which payload port to use on NULL session" );
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
@ -580,6 +549,9 @@ ipmi_get_sol_info(
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
lprintf(LOG_ERR, "Error: No response requesting SOL parameter '%s'",
|
||||
val2str(data[1], sol_parameter_vals));
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user