[PATCH 2/5] totemnet: Add totemnet_member_set_active

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



totemnet_member_set_active together with transport specific
member_set_active makes possible for totemnet (and more interestingly
transport) to be informed about membership changes.

Signed-off-by: Jan Friesse <jfriesse@xxxxxxxxxx>
---
 exec/totemnet.c |   23 +++++++++++++++++++++++
 exec/totemnet.h |    5 +++++
 2 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/exec/totemnet.c b/exec/totemnet.c
index 2571d92..85e35ea 100644
--- a/exec/totemnet.c
+++ b/exec/totemnet.c
@@ -130,6 +130,11 @@ struct transport {
 	int (*member_remove) (
 		void *transport_context,
 		const struct totem_ip_address *member);
+
+	int (*member_set_active) (
+		void *transport_context,
+		const struct totem_ip_address *member,
+		int active);
 };
 
 struct transport transport_entries[] = {
@@ -492,3 +497,21 @@ extern int totemnet_member_remove (
 
 	return (res);
 }
+
+int totemnet_member_set_active (
+	void *net_context,
+	const struct totem_ip_address *member,
+	int active)
+{
+	struct totemnet_instance *instance = (struct totemnet_instance *)net_context;
+	unsigned int res = 0;
+
+	if (instance->transport->member_set_active) {
+		res = instance->transport->member_set_active (
+			instance->transport_context,
+			member,
+			active);
+	}
+
+	return (res);
+}
diff --git a/exec/totemnet.h b/exec/totemnet.h
index 0adc107..cede214 100644
--- a/exec/totemnet.h
+++ b/exec/totemnet.h
@@ -133,4 +133,9 @@ extern int totemnet_member_remove (
 	void *net_context,
 	const struct totem_ip_address *member);
 
+extern int totemnet_member_set_active (
+	void *net_context,
+	const struct totem_ip_address *member,
+	int active);
+
 #endif /* TOTEMNET_H_DEFINED */
-- 
1.7.1

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss




[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux