API Change: Remove unnecessary params from oio_tcp_handle_accept()

closes #13.
This commit is contained in:
Ryan Dahl 2011-04-18 00:12:33 -07:00
parent 0027dbd976
commit d546a3115f
3 changed files with 3 additions and 5 deletions

View File

@ -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, int oio_tcp_handle_accept(oio_handle* server, oio_handle* client) {
oio_close_cb close_cb, void* data) {
if (server->accepted_fd < 0) { if (server->accepted_fd < 0) {
return -1; return -1;
} }

3
oio.h
View File

@ -107,8 +107,7 @@ int oio_shutdown(oio_req* req);
/* TCP server methods. */ /* TCP server methods. */
int oio_listen(oio_handle* handle, int backlog, oio_accept_cb cb); int oio_listen(oio_handle* handle, int backlog, oio_accept_cb cb);
int oio_tcp_handle_accept(oio_handle* server, oio_handle* client, int oio_tcp_handle_accept(oio_handle* server, oio_handle* client);
oio_close_cb close_cb, void* data);
/* Generic handle methods */ /* Generic handle methods */
int oio_read(oio_req* req, oio_buf* bufs, int bufcnt); int oio_read(oio_req* req, oio_buf* bufs, int bufcnt);

View File

@ -67,7 +67,7 @@ void on_accept(oio_handle* server) {
int r = oio_tcp_handle_init(&p->handle, on_close, (void*)p); int r = oio_tcp_handle_init(&p->handle, on_close, (void*)p);
ASSERT(!r) 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) FATAL(oio_tcp_handle_accept failed)
} }