]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-common: Swap conditions for ctdbd socket and test mode
authorMartin Schwenke <mschwenke@ddn.com>
Mon, 6 Jul 2026 08:39:59 +0000 (18:39 +1000)
committerMartin Schwenke <martins@samba.org>
Mon, 13 Jul 2026 12:53:23 +0000 (12:53 +0000)
This makes a subsequent commit less confusing.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
ctdb/common/path.c

index c999a6240f4c0927ff0ee06e9039038872fa6b7c..2aac1e39d371434e0f892b64fa49e179f66703e9 100644 (file)
@@ -306,8 +306,9 @@ char *path_config(TALLOC_CTX *mem_ctx)
 char *path_socket(TALLOC_CTX *mem_ctx, const char *daemon)
 {
        path_set_test_mode();
-       if (ctdb_paths.test_mode) {
-               if (strcmp(daemon, "ctdbd") == 0) {
+
+       if (strcmp(daemon, "ctdbd") == 0) {
+               if (ctdb_paths.test_mode) {
                        const char *t = getenv("CTDB_SOCKET");
 
                        if (t != NULL) {