[PATCH] ctdb: remove unused var and useless setting

Michael Adam obnox at samba.org
Thu Jun 25 07:19:17 MDT 2015


review/push appreciated.

Thanks - Michael

-------------- next part --------------
From f615b918ec1d5518601312679db38ef138050035 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Thu, 25 Jun 2015 10:31:40 +0200
Subject: [PATCH] ctdb: remove useless setting of variable domain_socket_name

This was used to unlink the socket at daemon exit, which
was removed in ctdb commit b18356764cd49d934eab901e596bb75c6e3ecdf8
(Samba master commit 42591560506c7fee977975e261e4790ae1a0f97f).

Signed-off-by: Michael Adam <obnox at samba.org>
---
 ctdb/server/ctdb_daemon.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c
index dada0a4..331e726 100644
--- a/ctdb/server/ctdb_daemon.c
+++ b/ctdb/server/ctdb_daemon.c
@@ -1194,7 +1194,6 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork)
 {
 	int res, ret = -1;
 	struct fd_event *fde;
-	const char *domain_socket_name;
 
 	/* create a unix domain stream socket to listen to */
 	res = ux_socket_bind(ctdb);
@@ -1240,13 +1239,6 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork)
 		DEBUG(DEBUG_NOTICE, ("Set real-time scheduler priority\n"));
 	}
 
-	/* ensure the socket is deleted on exit of the daemon */
-	domain_socket_name = talloc_strdup(talloc_autofree_context(), ctdb->daemon.name);
-	if (domain_socket_name == NULL) {
-		DEBUG(DEBUG_ALERT,(__location__ " talloc_strdup failed.\n"));
-		exit(12);
-	}
-
 	ctdb->ev = event_context_init(NULL);
 	tevent_loop_allow_nesting(ctdb->ev);
 	tevent_set_trace_callback(ctdb->ev, ctdb_tevent_trace, ctdb);
-- 
2.4.3

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150625/ceb99624/attachment.pgp>


More information about the samba-technical mailing list