From: Ralph Boehme Date: Sat, 18 Nov 2017 07:56:09 +0000 (+0100) Subject: dbwrap: move sockname variable and call to lp_ctdbd_socket into context X-Git-Tag: tdb-1.3.17~1642 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1838b15750da7b5d2627f7f8093e19000ddbb3c;p=thirdparty%2Fsamba.git dbwrap: move sockname variable and call to lp_ctdbd_socket into context sockname is only needed in a cluster. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/lib/dbwrap/dbwrap_open.c b/source3/lib/dbwrap/dbwrap_open.c index 33bf9696998..0a7edabdbc3 100644 --- a/source3/lib/dbwrap/dbwrap_open.c +++ b/source3/lib/dbwrap/dbwrap_open.c @@ -65,7 +65,6 @@ struct db_context *db_open(TALLOC_CTX *mem_ctx, { struct db_context *result = NULL; const char *base; - const char *sockname; if (!DBWRAP_LOCK_ORDER_VALID(lock_order)) { errno = EINVAL; @@ -126,9 +125,10 @@ struct db_context *db_open(TALLOC_CTX *mem_ctx, } } - sockname = lp_ctdbd_socket(); - if (lp_clustering()) { + const char *sockname; + + sockname = lp_ctdbd_socket(); if (!socket_exist(sockname)) { DEBUG(1, ("ctdb socket does not exist - is ctdb not " "running?\n"));