diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-03-20 10:01:17 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-03-20 10:01:17 +1100 |
commit | 9709ddcd3db3a96ff4d86aa1a5daf7f9261f13d3 (patch) | |
tree | 94bd92a2eec2f966577ebba35468530b1f315aba /lib/tevent | |
parent | 844a1b3cd27f323087b707e494c5e3860340eb27 (diff) | |
parent | 3a4638db0351368d3b148bf547546f28fa0b1479 (diff) | |
download | samba-9709ddcd3db3a96ff4d86aa1a5daf7f9261f13d3.tar.gz samba-9709ddcd3db3a96ff4d86aa1a5daf7f9261f13d3.tar.bz2 samba-9709ddcd3db3a96ff4d86aa1a5daf7f9261f13d3.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'lib/tevent')
-rw-r--r-- | lib/tevent/tevent.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/tevent/tevent.c b/lib/tevent/tevent.c index 56fd6aec7a..0c02e46f3c 100644 --- a/lib/tevent/tevent.c +++ b/lib/tevent/tevent.c @@ -468,6 +468,8 @@ int _tevent_loop_once(struct tevent_context *ev, const char *location) errno = ELOOP; return -1; } + } + if (ev->nesting.level > 0) { if (ev->nesting.hook_fn) { int ret2; ret2 = ev->nesting.hook_fn(ev, @@ -485,7 +487,7 @@ int _tevent_loop_once(struct tevent_context *ev, const char *location) ret = ev->ops->loop_once(ev, location); - if (ev->nesting.level > 1) { + if (ev->nesting.level > 0) { if (ev->nesting.hook_fn) { int ret2; ret2 = ev->nesting.hook_fn(ev, @@ -525,6 +527,8 @@ int _tevent_loop_until(struct tevent_context *ev, errno = ELOOP; return -1; } + } + if (ev->nesting.level > 0) { if (ev->nesting.hook_fn) { int ret2; ret2 = ev->nesting.hook_fn(ev, @@ -547,7 +551,7 @@ int _tevent_loop_until(struct tevent_context *ev, } } - if (ev->nesting.level > 1) { + if (ev->nesting.level > 0) { if (ev->nesting.hook_fn) { int ret2; ret2 = ev->nesting.hook_fn(ev, @@ -601,9 +605,5 @@ int tevent_common_loop_wait(struct tevent_context *ev, */ int _tevent_loop_wait(struct tevent_context *ev, const char *location) { - int ret; - ev->nesting.level++; - ret = ev->ops->loop_wait(ev, location); - ev->nesting.level--; - return ret; + return ev->ops->loop_wait(ev, location); } |