summaryrefslogtreecommitdiff
path: root/accel-pppd/logs
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-05-12 13:50:15 +0400
committerDmitry Kozlov <xeb@mail.ru>2014-05-12 13:50:15 +0400
commit0c0bdd363b63319c7484f5cfbe6dd74a15b884be (patch)
tree1e5e4f596347cd80a57af5ca68b37eb27fcd91d5 /accel-pppd/logs
parent7466e7f10fb4813a6112682dff13de5fbdd981a7 (diff)
downloadaccel-ppp-0c0bdd363b63319c7484f5cfbe6dd74a15b884be.tar.gz
accel-ppp-0c0bdd363b63319c7484f5cfbe6dd74a15b884be.zip
triton: improved epoll events handling
Diffstat (limited to 'accel-pppd/logs')
-rw-r--r--accel-pppd/logs/log_tcp.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/accel-pppd/logs/log_tcp.c b/accel-pppd/logs/log_tcp.c
index b89b7d6..5f592d9 100644
--- a/accel-pppd/logs/log_tcp.c
+++ b/accel-pppd/logs/log_tcp.c
@@ -47,8 +47,7 @@ static LIST_HEAD(targets);
static void disconnect(struct tcp_target_t *t)
{
- triton_md_unregister_handler(&t->hnd);
- close(t->hnd.fd);
+ triton_md_unregister_handler(&t->hnd, 1);
start_connect(t);
}
@@ -170,8 +169,7 @@ static int log_tcp_connect(struct triton_md_handler_t *h)
if (errno == EINPROGRESS)
return 0;
log_emerg("log-tcp: connect: %s\n", strerror(errno));
- triton_md_unregister_handler(&t->hnd);
- close(t->hnd.fd);
+ triton_md_unregister_handler(&t->hnd, 1);
triton_timer_add(&tcp_ctx, &t->conn_timer, 0);
return 0;
}
@@ -241,8 +239,7 @@ static void log_tcp_close(struct triton_context_t *ctx)
triton_timer_del(&t->conn_timer);
else {
t->connected = 0;
- triton_md_unregister_handler(&t->hnd);
- close(t->hnd.fd);
+ triton_md_unregister_handler(&t->hnd, 1);
}
}