Explorar o código

Fix off by one error in totemsrp.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1070 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake %!s(int64=19) %!d(string=hai) anos
pai
achega
b0c735ee64
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      exec/totemsrp.c

+ 3 - 2
exec/totemsrp.c

@@ -2264,8 +2264,9 @@ static int orf_token_rtr (
 	 * Retransmit messages on orf_token's RTR list from RTR queue
 	 */
 	for (instance->fcc_remcast_current = 0, i = 0;
-		instance->fcc_remcast_current <= *fcc_allowed && i < orf_token->rtr_list_entries;) {
+		instance->fcc_remcast_current < *fcc_allowed && i < orf_token->rtr_list_entries;) {
 
+printf ("entering retransmit operation\n");
 		/*
 		 * If this retransmit request isn't from this configuration,
 		 * try next rtr entry
@@ -2292,7 +2293,7 @@ static int orf_token_rtr (
 			i += 1;
 		}
 	}
-	*fcc_allowed = *fcc_allowed - instance->fcc_remcast_current - 1;
+	*fcc_allowed = *fcc_allowed - instance->fcc_remcast_current;
 
 	/*
 	 * Add messages to retransmit to RTR list