1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-03 13:47:25 +03:00

tevent: cleanup nesting counter when doing a full reinit.

We may be forking from within a loop, so we need to clean-up to avoid
aborts when nesting is not allowed and we are in a new children.

Signed-off-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Simo Sorce 2011-04-25 23:40:15 -04:00 committed by Andreas Schneider
parent 09ad4d47f8
commit 74f3e52f00

View File

@ -185,6 +185,13 @@ int tevent_common_context_destructor(struct tevent_context *ev)
tevent_cleanup_pending_signal_handlers(se);
}
/* clean up nesting or we get an abort when nesting
* is not allowed. -- SSS */
ev->nesting.allowed = false;
ev->nesting.level = 0;
ev->nesting.hook_fn = NULL;
ev->nesting.hook_private = NULL;
return 0;
}