From d546a3115fcbbde62a4c47ff3ebff631f2127bd9 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 18 Apr 2011 00:12:33 -0700 Subject: [PATCH] API Change: Remove unnecessary params from oio_tcp_handle_accept() closes #13. --- oio-unix.c | 3 +-- oio.h | 3 +-- test/echo-server.c | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/oio-unix.c b/oio-unix.c index 5d08abe3..0c035090 100644 --- a/oio-unix.c +++ b/oio-unix.c @@ -236,8 +236,7 @@ void oio__server_io(EV_P_ ev_io* watcher, int revents) { } -int oio_tcp_handle_accept(oio_handle* server, oio_handle* client, - oio_close_cb close_cb, void* data) { +int oio_tcp_handle_accept(oio_handle* server, oio_handle* client) { if (server->accepted_fd < 0) { return -1; } diff --git a/oio.h b/oio.h index 9f1e56bf..a3a1b4c2 100644 --- a/oio.h +++ b/oio.h @@ -107,8 +107,7 @@ int oio_shutdown(oio_req* req); /* TCP server methods. */ int oio_listen(oio_handle* handle, int backlog, oio_accept_cb cb); -int oio_tcp_handle_accept(oio_handle* server, oio_handle* client, - oio_close_cb close_cb, void* data); +int oio_tcp_handle_accept(oio_handle* server, oio_handle* client); /* Generic handle methods */ int oio_read(oio_req* req, oio_buf* bufs, int bufcnt); diff --git a/test/echo-server.c b/test/echo-server.c index b269e129..fdd91ee7 100644 --- a/test/echo-server.c +++ b/test/echo-server.c @@ -67,7 +67,7 @@ void on_accept(oio_handle* server) { int r = oio_tcp_handle_init(&p->handle, on_close, (void*)p); ASSERT(!r) - if (oio_tcp_handle_accept(server, &p->handle, on_close, (void*)p)) { + if (oio_tcp_handle_accept(server, &p->handle)) { FATAL(oio_tcp_handle_accept failed) }