Send Linux-ha-cvs mailing list submissions to
        linux-ha-cvs@lists.linux-ha.org

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: heartbeat by alan from 
      (linux-ha-cvs@lists.linux-ha.org)


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

Message: 1
Date: Thu, 11 May 2006 11:45:35 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: heartbeat by alan from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : alan
Host    : 
Project : linux-ha
Module  : heartbeat

Dir     : linux-ha/heartbeat


Modified Files:
        heartbeat.c 


Log Message:
Modified a recent patch to a Coverity problem, to eliminate a possible infinite 
loop

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/heartbeat/heartbeat.c,v
retrieving revision 1.508
retrieving revision 1.509
diff -u -3 -r1.508 -r1.509
--- heartbeat.c 11 May 2006 07:52:41 -0000      1.508
+++ heartbeat.c 11 May 2006 17:45:35 -0000      1.509
@@ -1,4 +1,4 @@
-/* $Id: heartbeat.c,v 1.508 2006/05/11 07:52:41 lars Exp $ */
+/* $Id: heartbeat.c,v 1.509 2006/05/11 17:45:35 alan Exp $ */
 /*
  * heartbeat: Linux-HA heartbeat code
  *
@@ -5911,10 +5911,16 @@
        struct node_info* fromnode = NULL;
 
        if (fromnodename == NULL){
-               cl_log(LOG_ERR, "process_rexmit: "
-                      "from node not found in the message");
+               cl_log(LOG_ERR, "process_rexmit"
+               ": from node not found in the message");
                return;         
        }
+       if (firstslot >= MAXMSGHIST) {
+               cl_log(LOG_ERR, "process_rexmit"
+               ": firstslot out of range [%d]"
+               ,       firstslot);
+               hist->lastmsg = firstslot = MAXMSGHIST-1;
+       }
        
        fromnode = lookup_tables(fromnodename, NULL);
        if (fromnode == NULL){
@@ -5976,6 +5982,11 @@
                        size_t          len;
 
                        if (msgslot < 0) {
+                               /* Time to wrap around */
+                               if (firstslot == MAXMSGHIST-1) { 
+                                 /* We're back where we started */
+                                       break;
+                               }
                                msgslot = MAXMSGHIST-1;
                        }
                        if (hist->msgq[msgslot] == NULL) {
@@ -6282,6 +6293,9 @@
 
 /*
  * $Log: heartbeat.c,v $
+ * Revision 1.509  2006/05/11 17:45:35  alan
+ * Modified a recent patch to a Coverity problem, to eliminate a possible 
infinite loop
+ *
  * Revision 1.508  2006/05/11 07:52:41  lars
  * Reverting hunk which was NOT supposed to go into CVS.
  *




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

_______________________________________________
Linux-ha-cvs mailing list
Linux-ha-cvs@lists.linux-ha.org
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs


End of Linux-ha-cvs Digest, Vol 30, Issue 36
********************************************

Reply via email to