From ed0ad05fccab77caf9f26160c2fbd5f830e5b13c Mon Sep 17 00:00:00 2001 From: Kozlov Dmitry Date: Sat, 13 Nov 2010 15:09:35 +0300 Subject: cli: implemented tcp frontend to send batch commands --- accel-pptpd/ctrl/pppoe/pppoe.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'accel-pptpd/ctrl') diff --git a/accel-pptpd/ctrl/pppoe/pppoe.c b/accel-pptpd/ctrl/pppoe/pppoe.c index f7737cf..0761609 100644 --- a/accel-pptpd/ctrl/pppoe/pppoe.c +++ b/accel-pptpd/ctrl/pppoe/pppoe.c @@ -854,7 +854,16 @@ static void pppoe_serv_close(struct triton_context_t *ctx) struct pppoe_serv_t *serv = container_of(ctx, typeof(*serv), ctx); triton_md_disable_handler(&serv->hnd, MD_MODE_READ | MD_MODE_WRITE); + serv->stopping = 1; + + pthread_mutex_lock(&serv->lock); + if (!serv->conn_cnt) { + pthread_mutex_unlock(&serv->lock); + pppoe_server_free(serv); + return; + } + pthread_mutex_unlock(&serv->lock); } void pppoe_server_start(const char *ifname, void *cli) -- cgit v1.2.3