summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrançois Cachereul <f.cachereul@alphalink.fr>2016-07-12 15:57:00 +0200
committerDmitry Kozlov <xeb@mail.ru>2016-07-14 20:48:13 +0300
commitef06cf0c864cbaafcaa7d3c93d5bd86c93a6e9f8 (patch)
treef686e811fa06192cddc226d69e45594b67e4d416
parent69ddf69d08072819deb3adde2be28f613f92cac3 (diff)
downloadaccel-ppp-ef06cf0c864cbaafcaa7d3c93d5bd86c93a6e9f8.tar.gz
accel-ppp-ef06cf0c864cbaafcaa7d3c93d5bd86c93a6e9f8.zip
Revert "ppp: futher improvement of distablish_ppp function"
This reverts commit 07ca3acb40df7668cfd0c6abbdcefc21d944d993. Signed-off-by: François Cachereul <f.cachereul@alphalink.fr>
-rw-r--r--accel-pppd/ppp/ppp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/accel-pppd/ppp/ppp.c b/accel-pppd/ppp/ppp.c
index 264ae136..cfc6aca1 100644
--- a/accel-pppd/ppp/ppp.c
+++ b/accel-pppd/ppp/ppp.c
@@ -238,9 +238,8 @@ static void destablish_ppp(struct ppp_t *ppp)
{
struct pppunit_cache *uc = NULL;
- ap_session_finished(&ppp->ses);
-
if (ppp->unit_fd < 0) {
+ ap_session_finished(&ppp->ses);
destroy_ppp_channel(ppp);
return;
}
@@ -253,10 +252,15 @@ static void destablish_ppp(struct ppp_t *ppp)
strncpy(ifr.ifr_name, ppp->ses.ifname, IFNAMSIZ);
if (net->sock_ioctl(SIOCSIFNAME, &ifr)) {
triton_md_unregister_handler(&ppp->unit_hnd, 1);
+ ap_session_finished(&ppp->ses);
goto skip;
}
}
+ }
+ ap_session_finished(&ppp->ses);
+
+ if (conf_unit_cache) {
triton_md_unregister_handler(&ppp->unit_hnd, 0);
uc = mempool_alloc(uc_pool);