summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--VERSION4
-rw-r--r--ctdb/tcp/ctdb_tcp.h1
-rw-r--r--ctdb/tcp/tcp_connect.c11
-rw-r--r--ctdb/tcp/tcp_init.c12
-rw-r--r--ctdb/tcp/tcp_io.c2
5 files changed, 16 insertions, 14 deletions
diff --git a/VERSION b/VERSION
index 0a215dada54..79cc8aedb62 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
########################################################
SAMBA_VERSION_MAJOR=4
SAMBA_VERSION_MINOR=9
-SAMBA_VERSION_RELEASE=15
+SAMBA_VERSION_RELEASE=16
########################################################
# If a official release has a serious bug #
@@ -99,7 +99,7 @@ SAMBA_VERSION_RC_RELEASE=
# e.g. SAMBA_VERSION_IS_SVN_SNAPSHOT=yes #
# -> "3.0.0-SVN-build-199" #
########################################################
-SAMBA_VERSION_IS_GIT_SNAPSHOT=no
+SAMBA_VERSION_IS_GIT_SNAPSHOT=yes
########################################################
# This is for specifying a release nickname #
diff --git a/ctdb/tcp/ctdb_tcp.h b/ctdb/tcp/ctdb_tcp.h
index 9a615fc6393..daabad74297 100644
--- a/ctdb/tcp/ctdb_tcp.h
+++ b/ctdb/tcp/ctdb_tcp.h
@@ -37,7 +37,6 @@ struct ctdb_tcp_node {
struct tevent_timer *connect_te;
struct ctdb_context *ctdb;
- int in_fd;
struct ctdb_queue *in_queue;
};
diff --git a/ctdb/tcp/tcp_connect.c b/ctdb/tcp/tcp_connect.c
index f02340c1789..0b5d021480a 100644
--- a/ctdb/tcp/tcp_connect.c
+++ b/ctdb/tcp/tcp_connect.c
@@ -153,7 +153,7 @@ static void ctdb_node_connect_write(struct tevent_context *ev,
* as connected, but only if the corresponding listening
* socket is also connected
*/
- if (tnode->in_fd != -1) {
+ if (tnode->in_queue != NULL) {
node->ctdb->upcalls->node_connected(node);
}
}
@@ -312,6 +312,13 @@ static void ctdb_listen_event(struct tevent_context *ev, struct tevent_fd *fde,
return;
}
+ if (tnode->in_queue != NULL) {
+ DBG_ERR("Incoming queue active, rejecting connection from %s\n",
+ ctdb_addr_to_str(&addr));
+ close(fd);
+ return;
+ }
+
ret = set_blocking(fd, false);
if (ret != 0) {
DBG_ERR("Failed to set socket non-blocking (%s)\n",
@@ -348,8 +355,6 @@ static void ctdb_listen_event(struct tevent_context *ev, struct tevent_fd *fde,
return;
}
- tnode->in_fd = fd;
-
/*
* Mark the connecting node as connected, but only if the
* corresponding outbound connected is also up
diff --git a/ctdb/tcp/tcp_init.c b/ctdb/tcp/tcp_init.c
index 91d4e992c8f..dc92abd4e6c 100644
--- a/ctdb/tcp/tcp_init.c
+++ b/ctdb/tcp/tcp_init.c
@@ -43,11 +43,6 @@ static int tnode_destructor(struct ctdb_tcp_node *tnode)
tnode->out_fd = -1;
}
- if (tnode->in_fd != -1) {
- close(tnode->in_fd);
- tnode->in_fd = -1;
- }
-
return 0;
}
@@ -61,7 +56,6 @@ static int ctdb_tcp_add_node(struct ctdb_node *node)
CTDB_NO_MEMORY(node->ctdb, tnode);
tnode->out_fd = -1;
- tnode->in_fd = -1;
tnode->ctdb = node->ctdb;
node->private_data = tnode;
@@ -143,8 +137,14 @@ static void ctdb_tcp_shutdown(struct ctdb_context *ctdb)
{
struct ctdb_tcp *ctcp = talloc_get_type(ctdb->private_data,
struct ctdb_tcp);
+ uint32_t i;
+
talloc_free(ctcp);
ctdb->private_data = NULL;
+
+ for (i=0; i<ctdb->num_nodes; i++) {
+ TALLOC_FREE(ctdb->nodes[i]->private_data);
+ }
}
/*
diff --git a/ctdb/tcp/tcp_io.c b/ctdb/tcp/tcp_io.c
index e8ebff887e1..2d8ec0f7062 100644
--- a/ctdb/tcp/tcp_io.c
+++ b/ctdb/tcp/tcp_io.c
@@ -76,8 +76,6 @@ void ctdb_tcp_read_cb(uint8_t *data, size_t cnt, void *args)
failed:
TALLOC_FREE(tnode->in_queue);
- close(tnode->in_fd);
- tnode->in_fd = -1;
node->ctdb->upcalls->node_dead(node);
TALLOC_FREE(data);