ctdbd_conn: "sockname" is not needed anymore
authorVolker Lendecke <vl@samba.org>
Tue, 19 Apr 2016 19:40:40 +0000 (21:40 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 17 May 2016 11:18:31 +0000 (13:18 +0200)
Previously it was used in ctdb_traverse(), but with ff72a8a this is no longer
the case

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/lib/ctdbd_conn.c

index 82abdf959373892752b0cc4e7fea1f6e4d05dc92..18849757470fafe800b571ff5e7e709aba5cf576 100644 (file)
@@ -47,7 +47,6 @@ struct ctdbd_srvid_cb {
 };
 
 struct ctdbd_connection {
-       const char *sockname;   /* Needed in ctdbd_traverse */
        struct messaging_context *msg_ctx;
        uint32_t reqid;
        uint32_t our_vnn;
@@ -433,20 +432,13 @@ int ctdbd_init_connection(TALLOC_CTX *mem_ctx,
                return ENOMEM;
        }
 
-       conn->sockname = talloc_strdup(conn, sockname);
-       if (conn->sockname == NULL) {
-               DBG_ERR("talloc failed\n");
-               ret = ENOMEM;
-               goto fail;
-       }
-
        conn->timeout = timeout;
 
        if (conn->timeout == 0) {
                conn->timeout = -1;
        }
 
-       ret = ctdbd_connect(conn->sockname, &conn->fd);
+       ret = ctdbd_connect(sockname, &conn->fd);
        if (ret != 0) {
                DEBUG(1, ("ctdbd_connect failed: %s\n", strerror(ret)));
                goto fail;