From 0d251eb1f4544cab4f9d48b538ed04cd37032c77 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 7 Dec 2009 15:06:56 -0500 Subject: Allow nesting to fix #310 --- server/Makefile.am | 1 + server/providers/ldap/sdap_async_accounts.c | 1 + server/util/util.h | 3 +++ 3 files changed, 5 insertions(+) (limited to 'server') diff --git a/server/Makefile.am b/server/Makefile.am index 8f36f72d0..fdaefea2a 100644 --- a/server/Makefile.am +++ b/server/Makefile.am @@ -167,6 +167,7 @@ AM_CPPFLAGS = -Wall \ -DSSS_PAM_SOCKET_NAME=\"$(pipepath)/pam\" \ -DSSS_PAM_PRIV_SOCKET_NAME=\"$(pipepath)/private/pam\" \ -DUSE_MMAP=1 \ + -DTEVENT_DEPRECATED=1\ -DLOCALEDIR=\"$(localedir)\" EXTRA_DIST = build/config.rpath diff --git a/server/providers/ldap/sdap_async_accounts.c b/server/providers/ldap/sdap_async_accounts.c index e4656cd7e..abebe2883 100644 --- a/server/providers/ldap/sdap_async_accounts.c +++ b/server/providers/ldap/sdap_async_accounts.c @@ -680,6 +680,7 @@ static int sdap_find_entry_by_origDN(TALLOC_CTX *memctx, tevent_req_set_callback(req, sdap_find_entry_by_origDN_done, state); /* WARNING: SYNC LOOP HERE */ + tevent_loop_allow_nesting(ev); while (state->done == 0) { tevent_loop_once(ev); } diff --git a/server/util/util.h b/server/util/util.h index 7e9c182f0..1c583e231 100644 --- a/server/util/util.h +++ b/server/util/util.h @@ -142,6 +142,9 @@ errno_t set_debug_file_from_fd(const int fd); req->async.fn(req); \ } \ } while(0) + +/* noop */ +#define tevent_loop_allow_nesting(x) #endif #define TEVENT_REQ_RETURN_ON_ERROR(req) do { \ -- cgit