tevent: completely initialize tevent_fd structs
authorStefan Metzmacher <metze@samba.org>
Sun, 4 Jan 2009 08:39:17 +0000 (09:39 +0100)
committerStefan Metzmacher <metze@samba.org>
Sun, 4 Jan 2009 08:39:17 +0000 (09:39 +0100)
This fixes crash bugs... I forgot to commit and squash
this to commit e45ed828d042acca09cb1ed5b6dd7a24eb5e7ffd

metze

lib/tevent/tevent_aio.c
lib/tevent/tevent_epoll.c
lib/tevent/tevent_select.c
lib/tevent/tevent_standard.c

index f4ed6d8a5ae8ce832b55841628cda8db4b6b5975..b15dab3aaf310f58464dacb7da76824ac2a07493 100644 (file)
@@ -431,6 +431,7 @@ static struct tevent_fd *aio_event_add_fd(struct tevent_context *ev, TALLOC_CTX
        fde->fd                 = fd;
        fde->flags              = flags;
        fde->handler            = handler;
+       fde->close_fn           = NULL;
        fde->private_data       = private_data;
        fde->handler_name       = handler_name;
        fde->location           = location;
index 023041981f45c1ff73705a6d85993e9cef084f0b..38357743499c44b44f7398ed6e22022072877764 100644 (file)
@@ -389,6 +389,7 @@ static struct tevent_fd *epoll_event_add_fd(struct tevent_context *ev, TALLOC_CT
        fde->fd                 = fd;
        fde->flags              = flags;
        fde->handler            = handler;
+       fde->close_fn           = NULL;
        fde->private_data       = private_data;
        fde->handler_name       = handler_name;
        fde->location           = location;
index d94e473db81e91aa6ef35d5d9391feff02eb09cd..cf4453f64fa649940e457ff2e66979310fedb143 100644 (file)
@@ -133,6 +133,7 @@ static struct tevent_fd *select_event_add_fd(struct tevent_context *ev, TALLOC_C
        fde->fd                 = fd;
        fde->flags              = flags;
        fde->handler            = handler;
+       fde->close_fn           = NULL;
        fde->private_data       = private_data;
        fde->handler_name       = handler_name;
        fde->location           = location;
index 145f510533b032d004ae668f5ddbbba474227a48..2a292a4c3966ed27b7440917c6ac2eb2d3f5ce21 100644 (file)
@@ -423,7 +423,10 @@ static struct tevent_fd *std_event_add_fd(struct tevent_context *ev, TALLOC_CTX
        fde->fd                 = fd;
        fde->flags              = flags;
        fde->handler            = handler;
+       fde->close_fn           = NULL;
        fde->private_data       = private_data;
+       fde->handler_name       = handler_name;
+       fde->location           = location;
        fde->additional_flags   = 0;
        fde->additional_data    = NULL;