sockname is only needed in a cluster.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
{
struct db_context *result = NULL;
const char *base;
- const char *sockname;
if (!DBWRAP_LOCK_ORDER_VALID(lock_order)) {
errno = EINVAL;
}
}
- 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"));