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])
   2. Linux-HA CVS: lib by andrew from 
      ([email protected])
   3. Linux-HA CVS: lib by zhenh from  ([email protected])
   4. Linux-HA CVS: linux-ha by zhenh from 
      ([email protected])


----------------------------------------------------------------------

Message: 1
Date: Tue, 17 Jan 2006 14:47:28 -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/cib


Modified Files:
        callbacks.c 


Log Message:
Overhaul of IPC and HA channel callbacks

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/callbacks.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -3 -r1.93 -r1.94
--- callbacks.c 16 Jan 2006 09:18:14 -0000      1.93
+++ callbacks.c 17 Jan 2006 21:47:28 -0000      1.94
@@ -1,4 +1,4 @@
-/* $Id: callbacks.c,v 1.93 2006/01/16 09:18:14 andrew Exp $ */
+/* $Id: callbacks.c,v 1.94 2006/01/17 21:47:28 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -271,17 +271,16 @@
                return FALSE;
        }
        
-       while(channel->ops->is_message_pending(channel)) {
-               if (channel->ch_status == IPC_DISCONNECT) {
-                       /* The message which was pending for us is that
-                        * the channel is no longer fully connected.
-                        *
-                        * Dont read requests from disconnected clients
-                        */
+       while(IPC_ISRCONN(channel)) {
+               if(channel->ops->is_message_pending(channel) == 0) {
                        break;
                }
-               op_request = msgfromIPC_noauth(channel);
 
+               op_request = msgfromIPC_noauth(channel);
+               if(op_request == NULL) {
+                       break;
+               }
+               
                type = cl_get_string(op_request, F_CIB_OPERATION);
                if(safe_str_eq(type, T_CIB_NOTIFY) ) {
                        /* Update the notify filters for this client */
@@ -368,10 +367,11 @@
                
                send_ipc_message(channel, op_request);
 
-               if(channel->ch_status != IPC_DISC_PENDING) {
+               if(channel->ch_status == IPC_CONNECT) {
                        break;
                }
        }
+
        did_disconnect = cib_process_disconnect(channel, cib_client);   
        if(did_disconnect) {
                crm_debug_2("Client disconnected");
@@ -403,13 +403,8 @@
        crm_debug_2("Callback for %s on %s channel",
                    cib_client->id, cib_client->channel_name);
 
-       while(channel->ops->is_message_pending(channel)) {
-               if (channel->ch_status == IPC_DISCONNECT) {
-                       /* The message which was pending for us is that
-                        * the channel is no longer connected.
-                        *
-                        * Dont read requests from disconnected clients
-                        */
+       while(IPC_ISRCONN(channel)) {
+               if(channel->ops->is_message_pending(channel) == 0) {
                        break;
                }
                op_request = msgfromIPC(channel, 0);
@@ -418,7 +413,6 @@
                        break;
                }
 
-
                op = cl_get_string(op_request, F_CIB_OPERATION);
                crm_info("Processing %s operation from %s/%s",
                         op, cib_client->name, cib_client->channel_name);
@@ -439,7 +433,7 @@
                crm_msg_del(op_request);
                op_request = NULL;
 
-               if(channel->ch_status != IPC_DISC_PENDING) {
+               if(channel->ch_status == IPC_CONNECT) {
                        break;
                }
        }
@@ -1122,7 +1116,7 @@
        if (channel == NULL) {
                keep_connection = FALSE;
                
-       } else if(channel->ch_status == IPC_DISCONNECT && cib_client != NULL) {
+       } else if(channel->ch_status != IPC_CONNECT && cib_client != NULL) {
                crm_debug_2("Cleaning up after client disconnect: %s/%s",
                            crm_str(cib_client->name),cib_client->channel_name);
                
@@ -1152,7 +1146,7 @@
 
                keep_connection = FALSE;
 
-       } else if (channel->ch_status == IPC_DISCONNECT) {
+       } else if (channel->ch_status != IPC_CONNECT) {
                crm_warn("Unknown client disconnected");
                keep_connection = FALSE;
        }
@@ -1177,22 +1171,23 @@
 gboolean
 cib_ha_dispatch(IPC_Channel *channel, gpointer user_data)
 {
-       int lpc = 0;
        ll_cluster_t *hb_cluster = (ll_cluster_t*)user_data;
 
-       while(lpc < 2 && hb_cluster->llc_ops->msgready(hb_cluster)) {
-               lpc++; 
+       crm_debug_3("Invoked");
+       if(IPC_ISRCONN(channel)) {
+               if(hb_cluster->llc_ops->msgready(hb_cluster) == 0) {
+                       crm_debug_2("no message ready yet");
+               }
                /* invoke the callbacks but dont block */
                hb_cluster->llc_ops->rcvmsg(hb_cluster, 0);
        }
-
-       crm_debug_4("%d HA messages dispatched", lpc);
-
-       if (channel && (channel->ch_status != IPC_CONNECT)) {
+       
+       if (channel->ch_status != IPC_CONNECT) {
                crm_crit("Lost connection to heartbeat service... exiting");
                exit(100);
                return FALSE;
        }
+       
        return TRUE;
 }
 




------------------------------

Message: 2
Date: Tue, 17 Jan 2006 14:47:29 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : andrew
Host    : 
Project : linux-ha
Module  : lib

Dir     : linux-ha/lib/crm/common


Modified Files:
        ipc.c 


Log Message:
Overhaul of IPC and HA channel callbacks

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/common/ipc.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- ipc.c       16 Jan 2006 09:21:44 -0000      1.15
+++ ipc.c       17 Jan 2006 21:47:28 -0000      1.16
@@ -1,4 +1,4 @@
-/* $Id: ipc.c,v 1.15 2006/01/16 09:21:44 andrew Exp $ */
+/* $Id: ipc.c,v 1.16 2006/01/17 21:47:28 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -313,10 +313,12 @@
        const char *sys_to;
        const char *task;
 
-       while(sender->ch_status == IPC_CONNECT
-             && sender->ops->is_message_pending(sender)) {
-
+       while(IPC_ISRCONN(sender)) {
                gboolean process = FALSE;
+               if(sender->ops->is_message_pending(sender) == 0) {
+                       break;
+               }
+
                if (sender->ops->recv(sender, &msg) != IPC_OK) {
                        cl_perror("Receive failure from %d:",
                                  sender->farside_pid);
@@ -386,6 +388,10 @@
                
                delete_ha_msg_input(new_input);
                msg = NULL;
+
+               if(sender->ch_status == IPC_CONNECT) {
+                       break;
+               }
        }
 
        /* clean up after a break */




------------------------------

Message: 3
Date: Tue, 17 Jan 2006 22:01:54 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by zhenh from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : zhenh
Host    : 
Project : linux-ha
Module  : lib

Dir     : linux-ha/lib/mgmt


Added Files:
        .cvsignore 


Log Message:
add .cvsignore




------------------------------

Message: 4
Date: Tue, 17 Jan 2006 22:02:25 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: linux-ha by zhenh from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : zhenh
Host    : 
Module  : linux-ha

Dir     : linux-ha


Modified Files:
        .cvsignore 


Log Message:
add libltdl.tar to .cvsignore
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/.cvsignore,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- .cvsignore  8 Sep 2005 11:14:49 -0000       1.22
+++ .cvsignore  18 Jan 2006 05:02:24 -0000      1.23
@@ -36,3 +36,4 @@
 logs
 specfile
 stringlen
+libltdl.tar




------------------------------

_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs


End of Linux-ha-cvs Digest, Vol 26, Issue 43
********************************************

Reply via email to