RE: Issue 193: Peer SM review
From: Pasi.Eronen (Pasi.Eronennokia.com)
Date: Mon, 15 Dec 2003 10:02:37 -0600 (CST)
Hi,

I finally got around to checking the remaining open issues,
and found one nit in #193:

> The INITIALIZE state does not initialize all variables. 
> Non-initialized variables include:
> 
> eapKeyData = NONE
> eapKeyAvailable = FALSE
> eapSuccess = FALSE
> eapFail = FALSE
> methodState = NONE
> selectedMethod = NONE
> decision = FAIL
> 
> The initialization values seem important since transitions 
> can be based on them before they are initialized. Re-initializing 
> variables in the INITIALIZE state is a bit different from giving 
> the variables initial values before they are ever used.

Of these, methodState, selectedMethod, and decision are already 
initialized (though the exact value for "decision" was not
exactly right). 

However, eapSuccess and eapFail must be initialized by 
the lower layer; otherwise there's a race condition.

I'm not not quite sure about eapKeyData and eapKeyAvailable.
I would prefer if they were also initialized by the lower layer
(in general, variables that trigger a transition in some 
other state machine must be reset in the state machine that 
reads them; otherwise some extra synchronization is needed),
but possibly eapSuccess provides the needed "extra synchronization".

Best regards,
Pasi

Results generated by Tiger Technologies using MHonArc.