From: teigland@sourceware.org <teigland@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/group/daemon app.c gd_internal.h main.c
Date: 4 Oct 2006 15:52:25 -0000 [thread overview]
Message-ID: <20061004155225.15838.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-10-04 15:52:24
Modified files:
group/daemon : app.c gd_internal.h main.c
Log message:
set the "member" field in the group_data struct that's returned
when querying for group information
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/app.c.diff?cvsroot=cluster&r1=1.47&r2=1.48
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/gd_internal.h.diff?cvsroot=cluster&r1=1.42&r2=1.43
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/main.c.diff?cvsroot=cluster&r1=1.46&r2=1.47
--- cluster/group/daemon/app.c 2006/09/26 21:32:38 1.47
+++ cluster/group/daemon/app.c 2006/10/04 15:52:24 1.48
@@ -629,7 +629,7 @@
return NULL;
}
-static int is_our_join(event_t *ev)
+int is_our_join(event_t *ev)
{
return (ev->nodeid == our_nodeid);
}
--- cluster/group/daemon/gd_internal.h 2006/09/26 21:32:38 1.42
+++ cluster/group/daemon/gd_internal.h 2006/10/04 15:52:24 1.43
@@ -257,6 +257,7 @@
struct recovery_set *get_recovery_set(int nodeid);
void groupd_down(int nodeid);
char *msg_type(int type);
+int is_our_join(event_t *ev);
/* main.c */
void app_stop(app_t *a);
--- cluster/group/daemon/main.c 2006/09/26 21:32:38 1.46
+++ cluster/group/daemon/main.c 2006/10/04 15:52:24 1.47
@@ -439,6 +439,7 @@
static void copy_group_data(group_t *g, group_data_t *data)
{
node_t *node;
+ event_t *ev;
int i = 0;
strncpy(data->client_name, client[g->app->client].type, 32);
@@ -472,6 +473,16 @@
list_for_each_entry(node, &g->app->nodes, list) {
data->members[i] = node->nodeid;
i++;
+
+ if (node->nodeid == our_nodeid)
+ data->member = 1;
+ }
+
+ /* we're in the member list but are still joining */
+ if (data->member) {
+ ev = g->app->current_event;
+ if (ev && is_our_join(ev))
+ data->member = 0;
}
}
next reply other threads:[~2006-10-04 15:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-04 15:52 teigland [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-09-12 21:57 [Cluster-devel] cluster/group/daemon app.c gd_internal.h main.c teigland
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=20061004155225.15838.qmail@sourceware.org \
--to=teigland@sourceware.org \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.