diff options
author | Kozlov Dmitry <xeb@mail.ru> | 2012-05-31 09:46:22 +0400 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2012-05-31 09:46:22 +0400 |
commit | d99e69fca1f6c442472eb596ef197c63879e5c97 (patch) | |
tree | 07cbef7794adcebca4efce031a86e0728d5cef9e /accel-pppd/ctrl | |
parent | 62dc5e3fe0c9dbeb808e3830ee72283b6c2842d1 (diff) | |
parent | 9ae4a0151805229face3385e6c966de90c7fec29 (diff) | |
download | accel-ppp-d99e69fca1f6c442472eb596ef197c63879e5c97.tar.gz accel-ppp-d99e69fca1f6c442472eb596ef197c63879e5c97.zip |
Merge branch 'master' of ssh://accel-ppp.git.sourceforge.net/gitroot/accel-ppp/accel-ppp
Diffstat (limited to 'accel-pppd/ctrl')
-rw-r--r-- | accel-pppd/ctrl/l2tp/l2tp.c | 8 | ||||
-rw-r--r-- | accel-pppd/ctrl/pppoe/pppoe.c | 3 | ||||
-rw-r--r-- | accel-pppd/ctrl/pptp/pptp.c | 3 |
3 files changed, 9 insertions, 5 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index d8a98f8d..c629bb35 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -26,6 +26,7 @@ #include "crypto.h" #include "connlimit.h" +#include "fdtrash.h" #include "memdebug.h" @@ -116,7 +117,6 @@ static void l2tp_disconnect(struct l2tp_conn_t *conn) struct l2tp_packet_t *pack; triton_md_unregister_handler(&conn->hnd); - close(conn->hnd.fd); if (conn->timeout_timer.tpd) triton_timer_del(&conn->timeout_timer); @@ -139,10 +139,12 @@ static void l2tp_disconnect(struct l2tp_conn_t *conn) pthread_mutex_unlock(&l2tp_lock); if (conn->ppp.fd != -1) - close(conn->ppp.fd); + fdtrash_add(conn->ppp.fd); if (conn->tunnel_fd != -1) - close(conn->tunnel_fd); + fdtrash_add(conn->tunnel_fd); + + fdtrash_add(conn->hnd.fd); triton_event_fire(EV_CTRL_FINISHED, &conn->ppp); diff --git a/accel-pppd/ctrl/pppoe/pppoe.c b/accel-pppd/ctrl/pppoe/pppoe.c index 73ddb913..ddd61e79 100644 --- a/accel-pppd/ctrl/pppoe/pppoe.c +++ b/accel-pppd/ctrl/pppoe/pppoe.c @@ -27,6 +27,7 @@ #endif #include "connlimit.h" +#include "fdtrash.h" #include "pppoe.h" @@ -117,7 +118,7 @@ static void disconnect(struct pppoe_conn_t *conn) pppoe_send_PADT(conn); - close(conn->disc_sock); + fdtrash_add(conn->disc_sock); triton_event_fire(EV_CTRL_FINISHED, &conn->ppp); diff --git a/accel-pppd/ctrl/pptp/pptp.c b/accel-pppd/ctrl/pptp/pptp.c index 2f0c5efd..9cbb51fe 100644 --- a/accel-pppd/ctrl/pptp/pptp.c +++ b/accel-pppd/ctrl/pptp/pptp.c @@ -22,6 +22,7 @@ #include "iprange.h" #include "utils.h" #include "cli.h" +#include "fdtrash.h" #include "connlimit.h" @@ -76,7 +77,7 @@ static void disconnect(struct pptp_conn_t *conn) log_ppp_debug("pptp: disconnect\n"); triton_md_unregister_handler(&conn->hnd); - close(conn->hnd.fd); + fdtrash_add(conn->hnd.fd); if (conn->timeout_timer.tpd) triton_timer_del(&conn->timeout_timer); |