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