Skip to content

Commit

Permalink
API Change: Remove unnecessary params from oio_tcp_handle_accept()
Browse files Browse the repository at this point in the history
closes nodejs#13.
  • Loading branch information
ry committed Apr 18, 2011
1 parent 0027dbd commit d546a31
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions oio-unix.c
Expand Up @@ -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;
}
Expand Down
3 changes: 1 addition & 2 deletions oio.h
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion test/echo-server.c
Expand Up @@ -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)
}

Expand Down

0 comments on commit d546a31

Please sign in to comment.