X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=uloop.c;h=da6f690cfad63f100f38510d087e81350cc1ea2b;hb=12bda4bdb1971385fd787737e8eec5a2eeb0deed;hp=ebd78398fe1f054e0376dab833cea07ef14d336a;hpb=8a5a4319a85cdfe54998c8f15bb29cd81b2b2c01;p=project%2Flibubox.git diff --git a/uloop.c b/uloop.c index ebd7839..da6f690 100644 --- a/uloop.c +++ b/uloop.c @@ -264,6 +264,7 @@ out: int uloop_fd_delete(struct uloop_fd *fd) { + int ret; int i; for (i = 0; i < cur_nfds; i++) { @@ -280,9 +281,11 @@ int uloop_fd_delete(struct uloop_fd *fd) uloop_fd_set_cb(fd, 0); fd->registered = false; - fd->flags = 0; uloop_fd_stack_event(fd, -1); - return __uloop_fd_delete(fd); + ret = __uloop_fd_delete(fd); + fd->flags = 0; + + return ret; } static int64_t tv_diff(struct timeval *t1, struct timeval *t2)