diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2016-03-19 23:08:15 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2016-03-19 23:08:15 +0300 |
commit | 07ca3acb40df7668cfd0c6abbdcefc21d944d993 (patch) | |
tree | babcb91b49f8ff2050ca55b3951b6ad9f7c1ddf3 /accel-pppd/ppp/ppp.c | |
parent | 5ab29b12f636ebc46e70c48fad7ae990a297f4f4 (diff) | |
download | accel-ppp-07ca3acb40df7668cfd0c6abbdcefc21d944d993.tar.gz accel-ppp-07ca3acb40df7668cfd0c6abbdcefc21d944d993.zip |
ppp: futher improvement of distablish_ppp function
Diffstat (limited to 'accel-pppd/ppp/ppp.c')
-rw-r--r-- | accel-pppd/ppp/ppp.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/accel-pppd/ppp/ppp.c b/accel-pppd/ppp/ppp.c index 9833a28b..24951a61 100644 --- a/accel-pppd/ppp/ppp.c +++ b/accel-pppd/ppp/ppp.c @@ -236,8 +236,9 @@ 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; } @@ -250,15 +251,10 @@ 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); |