mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
check that intf->open(intf) is successful before proceeding
add additional debug messages
This commit is contained in:
parent
e21475c78d
commit
a94f0e612c
@ -718,9 +718,17 @@ ipmi_lan_send_cmd(struct ipmi_intf * intf, struct ipmi_rq * req)
|
|||||||
struct ipmi_rs * rsp = NULL;
|
struct ipmi_rs * rsp = NULL;
|
||||||
int try = 0;
|
int try = 0;
|
||||||
|
|
||||||
|
lprintf(LOG_DEBUG, "ipmi_lan_send_cmd:opened=[%d], open=[%d]",
|
||||||
|
intf->opened, intf->open);
|
||||||
|
|
||||||
if (intf->opened == 0 && intf->open != NULL) {
|
if (intf->opened == 0 && intf->open != NULL) {
|
||||||
if (intf->open(intf) < 0)
|
if (intf->open(intf) < 0) {
|
||||||
|
lprintf(LOG_ERR,
|
||||||
|
"ipmi_lan_send_cmd failed to open intf");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
lprintf(LOG_DEBUG, "\topened=[%d], open=[%d]",
|
||||||
|
intf->opened, intf->open);
|
||||||
}
|
}
|
||||||
|
|
||||||
entry = ipmi_lan_build_cmd(intf, req);
|
entry = ipmi_lan_build_cmd(intf, req);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user