Send Linux-ha-cvs mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."
Today's Topics:
1. Linux-HA CVS: crm by andrew from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Tue, 22 Nov 2005 17:42:26 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : crm
Dir : linux-ha/crm/crmd
Modified Files:
lrm.c
Log Message:
Remove the LRM from mainloop before disconnecting.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/lrm.c,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -3 -r1.155 -r1.156
--- lrm.c 22 Nov 2005 02:44:41 -0000 1.155
+++ lrm.c 23 Nov 2005 00:42:25 -0000 1.156
@@ -164,6 +164,8 @@
return "<unknown>";
}
+static GCHSource *lrm_source = NULL;
+
/* A_LRM_CONNECT */
enum crmd_fsa_input
do_lrm_control(long long action,
@@ -176,6 +178,15 @@
if(action & A_LRM_DISCONNECT) {
if(fsa_lrm_conn) {
+ gboolean removed = FALSE;
+ crm_info("Removing LRM connection from MainLoop");
+ removed = G_main_del_IPC_Channel(lrm_source);
+ if(removed == FALSE) {
+ crm_err("Could not remove LRM connection"
+ " from MainLoop");
+ }
+ lrm_source = NULL;
+ crm_info("Disconnecting from the LRM");
fsa_lrm_conn->lrm_ops->signoff(fsa_lrm_conn);
}
/* TODO: Clean up the hashtable */
@@ -183,7 +194,6 @@
if(action & A_LRM_CONNECT) {
- crm_debug_4("LRM: connect...");
ret = HA_OK;
monitors = g_hash_table_new_full(
@@ -209,7 +219,7 @@
}
if(ret == HA_OK) {
- crm_debug_4("LRM: sigon...");
+ crm_info("Connecting to the LRM");
ret = fsa_lrm_conn->lrm_ops->signon(
fsa_lrm_conn, CRM_SYSTEM_CRMD);
}
@@ -246,12 +256,11 @@
/* TODO: create a destroy handler that causes
* some recovery to happen
*/
- G_main_add_IPC_Channel(G_PRIORITY_LOW,
- fsa_lrm_conn->lrm_ops->ipcchan(fsa_lrm_conn),
- FALSE,
- lrm_dispatch,
- fsa_lrm_conn,
- default_ipc_connection_destroy);
+ lrm_source = G_main_add_IPC_Channel(
+ G_PRIORITY_LOW,
+ fsa_lrm_conn->lrm_ops->ipcchan(fsa_lrm_conn),
+ FALSE, lrm_dispatch, fsa_lrm_conn,
+ default_ipc_connection_destroy);
set_bit_inplace(fsa_input_register, R_LRM_CONNECTED);
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 24, Issue 65
********************************************