From 7f16563bd5a4ef21b970e8dcbab0e5cbe02bfe97 Mon Sep 17 00:00:00 2001 From: Kozlov Dmitry Date: Tue, 5 Oct 2010 14:18:52 +0400 Subject: bug fixes --- accel-pptpd/ppp/ppp_ccp.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'accel-pptpd/ppp/ppp_ccp.c') diff --git a/accel-pptpd/ppp/ppp_ccp.c b/accel-pptpd/ppp/ppp_ccp.c index 36db6f9..ca12892 100644 --- a/accel-pptpd/ppp/ppp_ccp.c +++ b/accel-pptpd/ppp/ppp_ccp.c @@ -176,12 +176,15 @@ static void ccp_layer_up(struct ppp_fsm_t *fsm) { struct ppp_ccp_t *ccp=container_of(fsm,typeof(*ccp),fsm); log_ppp_debug("ccp_layer_started\n"); - ccp->started = 1; - if (ccp_set_flags(ccp->ppp->unit_fd, 1, 1)) { - ppp_terminate(ccp->ppp, 0); - return; + + if (!ccp->started) { + ccp->started = 1; + if (ccp_set_flags(ccp->ppp->unit_fd, 1, 1)) { + ppp_terminate(ccp->ppp, 0); + return; + } + ppp_layer_started(ccp->ppp,&ccp->ld); } - ppp_layer_started(ccp->ppp,&ccp->ld); } static void ccp_layer_down(struct ppp_fsm_t *fsm) -- cgit v1.2.3