]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
wait on the right fd ....
authorAndrew Tridgell <tridge@samba.org>
Mon, 16 Apr 2007 14:11:04 +0000 (00:11 +1000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 16 Apr 2007 14:11:04 +0000 (00:11 +1000)
(This used to be ctdb commit 27b67ee6576b17f8b3aae024ae3bd0bb1c42f0f2)

ctdb/tests/lockwait.c

index 6b26cdbbbb409e7fd982135cbb2b4f50eaa47ad5..bb47bfdec0345734748ef8273d44445c2490a49f 100644 (file)
@@ -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;