If a session is terminated indicate this by STATE_RUN_QUIT_SESSION instead of setting STATE_RUN_FAILED which would imply some failure
this function is a helper to evaluate a state_run_t for repeated state transition
Up to this commit the client and server state machine handling used different return values for state machine changes. This is fixed with this commit: * Use common enum return values * Use common helper functions