[Cluster-devel] [ipmitool] avoiding assertion hit in wrong state transition
Masatake YAMATO
yamato at redhat.com
Tue Oct 30 01:27:47 UTC 2012
> Hello,
>
> Are you sure you appended the whole thing?
> I do not see the last_state being used for anything.
I'm sorry. last_session_state should be the right side.
This is the revised version. This is diff against the
upstream code checked out from its cvs repository.
Masatake YAMATO
*** lanplus.c.~1.72.~ 2012-07-11 01:01:09.000000000 +0900
--- lanplus.c 2012-10-29 15:31:19.929332293 +0900
***************
*** 2091,2096 ****
--- 2091,2097 ----
int xmit = 1;
time_t ltime;
uint32_t timeout;
+ enum LANPLUS_SESSION_STATE last_session_state;
if (!intf->opened && intf->open && intf->open(intf) < 0)
return NULL;
***************
*** 2233,2238 ****
--- 2234,2240 ----
usleep(100); /* Not sure what this is for */
/* Remember our connection state */
+ last_session_state = session->v2_data.session_state;
switch (payload->payload_type)
{
case IPMI_PAYLOAD_TYPE_RMCP_OPEN_REQUEST:
***************
*** 2302,2307 ****
--- 2304,2318 ----
if (xmit) {
/* increment session timeout by 1 second each retry */
timeout++;
+
+ /* Roll back the state transition */
+ switch (payload->payload_type)
+ {
+ case IPMI_PAYLOAD_TYPE_RMCP_OPEN_REQUEST:
+ case IPMI_PAYLOAD_TYPE_RAKP_1:
+ case IPMI_PAYLOAD_TYPE_RAKP_3:
+ session->v2_data.session_state = last_session_state;
+ }
}
try++;
More information about the Cluster-devel
mailing list