public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: ccaulfield@sourceware.org To: cluster-cvs@sources.redhat.com, cluster-devel@redhat.com Subject: Cluster Project branch, STABLE2, updated. cluster-2.02.00-18-gae3311d Date: Tue, 18 Mar 2008 15:58:00 -0000 [thread overview] Message-ID: <20080318155814.10240.qmail@sourceware.org> (raw) 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=ae3311d1de243236751a1d8b1970ee413e24d305 The branch, STABLE2 has been updated via ae3311d1de243236751a1d8b1970ee413e24d305 (commit) from 1c5fcd3e08369099f71182557cd88470860d2e85 (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 ae3311d1de243236751a1d8b1970ee413e24d305 Author: Christine Caulfield <ccaulfie@redhat.com> Date: Tue Mar 18 15:56:45 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 <ccaulfie@redhat.com> ----------------------------------------------------------------------- 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 5691ccf..e132397 100644 --- a/cman/daemon/cnxman-private.h +++ b/cman/daemon/cnxman-private.h @@ -132,7 +132,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 e7f4766..099b421 100644 --- a/cman/daemon/daemon.c +++ b/cman/daemon/daemon.c @@ -101,9 +101,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) @@ -112,6 +115,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
reply other threads:[~2008-03-18 15:58 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20080318155814.10240.qmail@sourceware.org \ --to=ccaulfield@sourceware.org \ --cc=cluster-cvs@sources.redhat.com \ --cc=cluster-devel@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).