silc_fsm_init
SYNOPSIS
SilcBool silc_fsm_init(SilcFSM fsm, void *fsm_context, SilcFSMDestructor destructor, void *destructor_context, SilcSchedule schedule);
DESCRIPTION
Initializes a pre-allocated SilcFSM context. This call is equivalent to silc_fsm_alloc except that this takes the pre-allocated context as argument. The silc_fsm_free must not be called if this was called. Returns TRUE if the initialization is Ok or FALSE if error occurred. This function does not allocate any memory. The `schedule' is the caller's scheduler and the FSM will be run in the scheduler. If `schedule' is NULL this will call silc_schedule_get_global to try to get global scheduler.
EXAMPLE
SilcFSMStruct fsm; silc_fsm_init(&fsm, application, fsm_destructor, application, schedule); silc_fsm_start(&fsm, first_state);