summaryrefslogtreecommitdiff
path: root/accel-pptpd/ctrl
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2010-11-13 15:09:35 +0300
committerKozlov Dmitry <dima@server>2010-11-13 15:09:35 +0300
commited0ad05fccab77caf9f26160c2fbd5f830e5b13c (patch)
treef57122d492c8c60531cb4ce21e2c9fa22df70094 /accel-pptpd/ctrl
parent1873cf67a900b521021ccd4ae87c0821a64a408d (diff)
downloadaccel-ppp-ed0ad05fccab77caf9f26160c2fbd5f830e5b13c.tar.gz
accel-ppp-ed0ad05fccab77caf9f26160c2fbd5f830e5b13c.zip
cli: implemented tcp frontend to send batch commands
Diffstat (limited to 'accel-pptpd/ctrl')
-rw-r--r--accel-pptpd/ctrl/pppoe/pppoe.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/accel-pptpd/ctrl/pppoe/pppoe.c b/accel-pptpd/ctrl/pppoe/pppoe.c
index f7737cf3..0761609e 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)