summaryrefslogtreecommitdiff
path: root/lib/tevent
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2011-04-25 23:40:15 -0400
committerAndreas Schneider <asn@samba.org>2011-08-10 18:14:02 +0200
commit74f3e52f009126aad7a039d02e42f5c60e6209a8 (patch)
tree4666495c8e0cdec9a2c60ab2e3e32aa428c37d78 /lib/tevent
parent09ad4d47f875bb3b273902f78e9882e5c4ee259f (diff)
downloadsamba-74f3e52f009126aad7a039d02e42f5c60e6209a8.tar.gz
samba-74f3e52f009126aad7a039d02e42f5c60e6209a8.tar.bz2
samba-74f3e52f009126aad7a039d02e42f5c60e6209a8.zip
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>
Diffstat (limited to 'lib/tevent')
-rw-r--r--lib/tevent/tevent.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/tevent/tevent.c b/lib/tevent/tevent.c
index 87e5aff034..51555bae5d 100644
--- a/lib/tevent/tevent.c
+++ b/lib/tevent/tevent.c
@@ -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;
}