diff options
author | Kozlov Dmitry <dima@server> | 2010-12-09 13:48:39 +0300 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2010-12-09 13:48:39 +0300 |
commit | 71803e7eda63162a99f2d2e8a1eeeadc89c9b4e7 (patch) | |
tree | f2aa35049ddfc82aa4a2bc12fb15e1ea6fb3999c /accel-pptpd | |
parent | 8fb4294d45ccb5f9b1e28a45da239e93fd6f4f15 (diff) | |
download | accel-ppp-71803e7eda63162a99f2d2e8a1eeeadc89c9b4e7.tar.gz accel-ppp-71803e7eda63162a99f2d2e8a1eeeadc89c9b4e7.zip |
ppp: fixed session hangup if lcp phase was not performed
Diffstat (limited to 'accel-pptpd')
-rw-r--r-- | accel-pptpd/ppp/ppp_lcp.c | 13 | ||||
-rw-r--r-- | accel-pptpd/triton/triton.c | 1 |
2 files changed, 11 insertions, 3 deletions
diff --git a/accel-pptpd/ppp/ppp_lcp.c b/accel-pptpd/ppp/ppp_lcp.c index e8eba29..334f6c8 100644 --- a/accel-pptpd/ppp/ppp_lcp.c +++ b/accel-pptpd/ppp/ppp_lcp.c @@ -120,15 +120,22 @@ int lcp_layer_start(struct ppp_layer_data_t *ld) return 0; } +static void _lcp_layer_finished(struct ppp_lcp_t *lcp) +{ + ppp_layer_finished(lcp->ppp, &lcp->ld); +} + void lcp_layer_finish(struct ppp_layer_data_t *ld) { struct ppp_lcp_t *lcp = container_of(ld,typeof(*lcp),ld); log_ppp_debug("lcp_layer_finish\n"); - stop_echo(lcp); - - ppp_fsm_close(&lcp->fsm); + if (lcp->started) { + stop_echo(lcp); + ppp_fsm_close(&lcp->fsm); + } else + triton_context_call(lcp->ppp->ctrl->ctx, (triton_event_func)_lcp_layer_finished, lcp); } void lcp_layer_free(struct ppp_layer_data_t *ld) diff --git a/accel-pptpd/triton/triton.c b/accel-pptpd/triton/triton.c index 426eefe..26c257c 100644 --- a/accel-pptpd/triton/triton.c +++ b/accel-pptpd/triton/triton.c @@ -169,6 +169,7 @@ static void ctx_thread(struct _triton_context_t *ctx) spin_unlock(&ctx->lock); call->func(call->arg); mempool_free(call); + continue; } ctx->pending = 0; spin_unlock(&ctx->lock); |