Exemplo n.º 1
0
static void pppcp_transition_state(enum pppcp_state new_state,
					struct pppcp_data *data)
{
	/*
	 * if switching from a state where
	 * TO events occur, to one where they
	 * may not, shut off the timer
	 */
	switch (new_state) {
	case INITIAL:
	case STARTING:
	case CLOSED:
	case STOPPED:
	case OPENED:
		pppcp_stop_timer(&data->config_timer_data);
		pppcp_stop_timer(&data->terminate_timer_data);
		break;
	case CLOSING:
	case STOPPING:
	case REQSENT:
	case ACKRCVD:
	case ACKSENT:
		break;
	}
	data->state = new_state;
}
Exemplo n.º 2
0
void pppcp_free(struct pppcp_data *pppcp)
{
	pppcp_stop_timer(&pppcp->config_timer_data);
	pppcp_stop_timer(&pppcp->terminate_timer_data);
	g_free(pppcp->peer_options);
	g_free(pppcp);
}
Exemplo n.º 3
0
static void pppcp_start_timer(struct pppcp_timer_data *timer_data)
{
	pppcp_stop_timer(timer_data);

	timer_data->restart_timer =
		g_timeout_add_seconds(timer_data->restart_interval,
				pppcp_timeout, timer_data);
}