void nn_fsm_raise (struct nn_fsm *self, struct nn_fsm_event *event, int type) { event->fsm = self->owner; event->src = self->src; event->srcptr = self->srcptr; event->type = type; nn_ctx_raise (self->ctx, event); }
void nn_ep_stopped (struct nn_ep *self) { /* TODO: Do the following in a more sane way. */ self->fsm.stopped.fsm = &self->fsm; self->fsm.stopped.src = NN_FSM_ACTION; self->fsm.stopped.srcptr = NULL; self->fsm.stopped.type = NN_EP_ACTION_STOPPED; nn_ctx_raise (self->fsm.ctx, &self->fsm.stopped); }