misc interface opening changes I forgot to propogate

This commit is contained in:
Duncan Laurie 2004-08-27 16:57:04 +00:00
parent f0cbc9b2ba
commit cbc8cbdff4

View File

@ -1778,14 +1778,8 @@ ipmi_lanplus_send_payload(
struct ipmi_session * session = intf->session; struct ipmi_session * session = intf->session;
int try = 0; int try = 0;
if (!intf->opened) { if (!intf->opened && intf->open && intf->open(intf) < 0)
intf->opened = 1;
if (intf->open(intf) < 0) {
intf->opened = 0;
return NULL; return NULL;
}
}
if (payload->payload_type == IPMI_PAYLOAD_TYPE_IPMI) if (payload->payload_type == IPMI_PAYLOAD_TYPE_IPMI)
{ {
@ -2919,6 +2913,7 @@ ipmi_lanplus_open(struct ipmi_intf * intf)
return -1; return -1;
} }
intf->opened = 1;
/* /*
* *
@ -2977,6 +2972,7 @@ ipmi_lanplus_open(struct ipmi_intf * intf)
fail: fail:
printf("Error: Unable to establish IPMI v2 / RMCP+ session\n"); printf("Error: Unable to establish IPMI v2 / RMCP+ session\n");
intf->opened = 0;
return -1; return -1;
} }