]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:mdssvc: use a helper variable for the service type
authorRalph Boehme <slow@samba.org>
Tue, 20 Aug 2019 14:50:52 +0000 (16:50 +0200)
committerRalph Boehme <slow@samba.org>
Wed, 9 Oct 2019 14:35:29 +0000 (14:35 +0000)
No change in behaviour. Simplifies a subsequent logical change.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
source3/rpc_server/mdssvc/srv_mdssvc_nt.c

index aea6019e8717bffe881347c7b80c2973b747e1aa..345e05be912ab95c534c741cd8db4ff85d20637a 100644 (file)
@@ -63,6 +63,8 @@ static bool rpc_setup_mdssvc(struct tevent_context *ev_ctx,
        NTSTATUS status;
        enum rpc_service_mode_e service_mode = rpc_service_mode(t->name);
        enum rpc_daemon_type_e mdssvc_type = rpc_mdssd_daemon();
+       bool external = service_mode != RPC_SERVICE_MODE_EMBEDDED ||
+                       mdssvc_type != RPC_DAEMON_EMBEDDED;
 
        mdssvc_cb.init         = mdssvc_init_cb;
        mdssvc_cb.shutdown     = mdssvc_shutdown_cb;
@@ -73,8 +75,7 @@ static bool rpc_setup_mdssvc(struct tevent_context *ev_ctx,
                return false;
        }
 
-       if (service_mode != RPC_SERVICE_MODE_EMBEDDED
-           || mdssvc_type != RPC_DAEMON_EMBEDDED) {
+       if (external) {
                return true;
        }