smbd: untangle logic in smbd_messaging_context() slightly.
authorMichael Adam <obnox@samba.org>
Mon, 23 Jun 2008 15:35:08 +0000 (17:35 +0200)
committerMichael Adam <obnox@samba.org>
Thu, 26 Jun 2008 10:31:10 +0000 (12:31 +0200)
Michael
(This used to be commit fae4c21b14b9d288e06f6b4b4e1527e2c6d58dca)

source3/smbd/server.c

index ed07e5c02b07a7935baba13102c9e62e22cb3edb..4a0e60a8d7adc143b4e09b208567e6ed40d78ea6 100644 (file)
@@ -90,8 +90,11 @@ struct messaging_context *smbd_messaging_context(void)
 {
        static struct messaging_context *ctx;
 
-       if (!ctx && !(ctx = messaging_init(NULL, server_id_self(),
-                                          smbd_event_context()))) {
+       if (ctx == NULL) {
+               ctx = messaging_init(NULL, server_id_self(),
+                                    smbd_event_context());
+       }
+       if (ctx == NULL) {
                DEBUG(0, ("Could not init smbd messaging context.\n"));
        }
        return ctx;