From mboxrd@z Thu Jan 1 00:00:00 1970 From: ccaulfield@sourceware.org Date: 18 Mar 2008 15:43:22 -0000 Subject: [Cluster-devel] Cluster Project branch, master, updated. gfs-kernel_0_1_22-76-g2f41945 Message-ID: <20080318154322.5462.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Cluster Project". http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=2f419450985f7bbc069a5be4443757f35450655c The branch, master has been updated via 2f419450985f7bbc069a5be4443757f35450655c (commit) from bee9018146ab3200d1691621dc4bd648670ece09 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2f419450985f7bbc069a5be4443757f35450655c Author: Christine Caulfield Date: Tue Mar 18 15:42:04 2008 +0000 [CMAN] Free up any queued messages when someone disconnects When a client disconnects we need to go through the list of queued replies to get rid of any that have not been collected. Signed-off-by: Christine Caulfield ----------------------------------------------------------------------- Summary of changes: cman/daemon/cnxman-private.h | 1 - cman/daemon/daemon.c | 14 +++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/cman/daemon/cnxman-private.h b/cman/daemon/cnxman-private.h index a7e386a..7f6f692 100644 --- a/cman/daemon/cnxman-private.h +++ b/cman/daemon/cnxman-private.h @@ -124,7 +124,6 @@ struct connection uint32_t events; /* Registered for events */ uint32_t confchg; /* Registered for confchg */ struct list write_msgs; /* Queued messages to go to data clients */ - struct cl_comms_socket *clsock; struct connection *next; struct list list; /* when on the client_list */ }; diff --git a/cman/daemon/daemon.c b/cman/daemon/daemon.c index 444d95b..b9923c9 100644 --- a/cman/daemon/daemon.c +++ b/cman/daemon/daemon.c @@ -102,9 +102,12 @@ static int send_reply_message(struct connection *con, struct sock_header *msg) return 0; } - static void remove_client(poll_handle handle, struct connection *con) { + struct list *tmp, *qmh; + struct queued_reply *qm; + int msgs=0; + poll_dispatch_delete(handle, con->fd); close(con->fd); if (con->type == CON_CLIENT) @@ -113,6 +116,15 @@ static void remove_client(poll_handle handle, struct connection *con) unbind_con(con); remove_barriers(con); + list_iterate_safe(qmh, tmp, &con->write_msgs) { + qm = list_item(qmh, struct queued_reply); + + list_del(&qm->list); + free(qm); + msgs++; + } + + P_DAEMON("Freed %d queued messages\n", msgs); free(con); num_connections--; } hooks/post-receive -- Cluster Project