From: Andrew Tridgell Date: Mon, 16 Apr 2007 14:11:04 +0000 (+1000) Subject: wait on the right fd .... X-Git-Tag: tevent-0.9.20~348^2~2915 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fca41760e32914288e663b2fcb24cf6c94a81733;p=thirdparty%2Fsamba.git wait on the right fd .... (This used to be ctdb commit 27b67ee6576b17f8b3aae024ae3bd0bb1c42f0f2) --- diff --git a/ctdb/tests/lockwait.c b/ctdb/tests/lockwait.c index 6b26cdbbbb4..bb47bfdec03 100644 --- a/ctdb/tests/lockwait.c +++ b/ctdb/tests/lockwait.c @@ -41,6 +41,7 @@ static void lockwait_handler(struct event_context *ev, struct fd_event *fde, struct lockwait_handle); void (*callback)(void *) = h->callback; void *p = h->private_data; + printf("%s\n", __location__); talloc_set_destructor(h, NULL); close(h->fd[0]); talloc_free(h); @@ -103,7 +104,7 @@ static struct lockwait_handle *lockwait(struct event_context *ev, close(h->fd[1]); talloc_set_destructor(h, lockwait_destructor); - h->fde = event_add_fd(ev, h, fd, EVENT_FD_READ, lockwait_handler, h); + h->fde = event_add_fd(ev, h, h->fd[0], EVENT_FD_READ, lockwait_handler, h); if (h->fde == NULL) { talloc_free(h); return NULL;