We end up here multiple times. There's no real point putting the events into
the child struct, at the end of this routine we need to free them anyway.
*/
for (child = children->children; child != NULL; child = child->next) {
+ struct tevent_fd *event;
+
if (child->aiocb == NULL) {
continue;
}
continue;
}
- /* We're never using this event on the
- * main event context again... */
- TALLOC_FREE(child->sock_event);
-
- child->sock_event = event_add_fd(ev,
- child,
- child->sockfd,
- EVENT_FD_READ,
- handle_aio_completion,
- child);
+ event = event_add_fd(ev,
+ frame,
+ child->sockfd,
+ EVENT_FD_READ,
+ handle_aio_completion,
+ child);
while (1) {
if (tevent_loop_once(ev) == -1) {