diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2016-07-14 20:49:00 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2016-07-14 20:49:00 +0300 |
commit | 1dce3168c8a43ba1ef6d2b78355933aafc35d3f9 (patch) | |
tree | 92338dc0dd5ff73a32bfa8cec5189ef513a524ad | |
parent | 33757db5ed54d22eaf4ab3911c70d51176f055c0 (diff) | |
download | accel-ppp-1dce3168c8a43ba1ef6d2b78355933aafc35d3f9.tar.gz accel-ppp-1dce3168c8a43ba1ef6d2b78355933aafc35d3f9.zip |
ppp: code simplification
-rw-r--r-- | accel-pppd/ppp/ppp.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/accel-pppd/ppp/ppp.c b/accel-pppd/ppp/ppp.c index d39e39d8..e511bf86 100644 --- a/accel-pppd/ppp/ppp.c +++ b/accel-pppd/ppp/ppp.c @@ -251,7 +251,6 @@ static void destablish_ppp(struct ppp_t *ppp) if (net->move_link(def_net, ppp->ses.ifindex)) { log_ppp_warn("failed to attach to default namespace\n"); triton_md_unregister_handler(&ppp->unit_hnd, 1); - ap_session_finished(&ppp->ses); goto skip; } ppp->ses.net = def_net; @@ -264,14 +263,11 @@ static void destablish_ppp(struct ppp_t *ppp) if (net->sock_ioctl(SIOCSIFNAME, &ifr)) { log_ppp_warn("failed to rename ppp to default name\n"); 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); @@ -282,6 +278,8 @@ static void destablish_ppp(struct ppp_t *ppp) triton_md_unregister_handler(&ppp->unit_hnd, 1); skip: + ap_session_finished(&ppp->ses); + ppp->unit_fd = -1; destroy_ppp_channel(ppp); |