summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-02-14 09:29:57 +0100
committerJeremy Allison <jra@samba.org>2013-02-14 10:19:38 -0800
commitb5556a79e39be0bc9945cbac4e603b045ab55505 (patch)
tree6139da1826d1a96595fe8ffd6d9faa96ea589874 /lib
parentaceeb585cb6170e42cadae17791b8314083c278c (diff)
downloadsamba-b5556a79e39be0bc9945cbac4e603b045ab55505.tar.gz
samba-b5556a79e39be0bc9945cbac4e603b045ab55505.tar.bz2
samba-b5556a79e39be0bc9945cbac4e603b045ab55505.zip
tevent: make sure tevent_backend_init() only runs once
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/tevent/tevent.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/tevent/tevent.c b/lib/tevent/tevent.c
index 63524710da..669b778eb5 100644
--- a/lib/tevent/tevent.c
+++ b/lib/tevent/tevent.c
@@ -112,6 +112,14 @@ void tevent_set_default_backend(const char *backend)
*/
static void tevent_backend_init(void)
{
+ static bool done;
+
+ if (done) {
+ return;
+ }
+
+ done = true;
+
tevent_select_init();
tevent_poll_init();
tevent_poll_mt_init();