From cbc8cbdff482c7a98bad63aff71259600a3eea98 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Fri, 27 Aug 2004 16:57:04 +0000 Subject: [PATCH] misc interface opening changes I forgot to propogate --- ipmitool/src/plugins/lanplus/lanplus.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ipmitool/src/plugins/lanplus/lanplus.c b/ipmitool/src/plugins/lanplus/lanplus.c index fd7b835..7c0927e 100644 --- a/ipmitool/src/plugins/lanplus/lanplus.c +++ b/ipmitool/src/plugins/lanplus/lanplus.c @@ -1778,14 +1778,8 @@ ipmi_lanplus_send_payload( struct ipmi_session * session = intf->session; int try = 0; - if (!intf->opened) { - intf->opened = 1; - if (intf->open(intf) < 0) { - intf->opened = 0; - return NULL; - } - } - + if (!intf->opened && intf->open && intf->open(intf) < 0) + return NULL; if (payload->payload_type == IPMI_PAYLOAD_TYPE_IPMI) { @@ -2919,6 +2913,7 @@ ipmi_lanplus_open(struct ipmi_intf * intf) return -1; } + intf->opened = 1; /* * @@ -2977,6 +2972,7 @@ ipmi_lanplus_open(struct ipmi_intf * intf) fail: printf("Error: Unable to establish IPMI v2 / RMCP+ session\n"); + intf->opened = 0; return -1; }