Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 58cebef081c94cb5f88b9fe2fbddfdc8 > files > 52

openais-0.80.6-28.el5_6.1.src.rpm

Index: exec/totemsrp.c
===================================================================
--- exec/totemsrp.c	(revision 2165)
+++ exec/totemsrp.c	(revision 2166)
@@ -498,6 +498,8 @@
 	unsigned int my_pbl;
 
 	unsigned int my_cbl;
+
+	uint32_t orf_token_discard;
 };
 
 struct message_handlers {
@@ -637,6 +639,8 @@
 	instance->my_high_seq_received = SEQNO_START_MSG;
 
 	instance->my_high_delivered = SEQNO_START_MSG;
+
+	instance->orf_token_discard = 0;
 }
 
 void main_token_seqid_get (
@@ -1461,6 +1465,7 @@
 			log_printf (instance->totemsrp_log_level_notice,
 				"The token was lost in the RECOVERY state.\n");
 			memb_recovery_state_token_loss (instance);
+			instance->orf_token_discard = 1;
 			break;
 	}
 }
@@ -1711,6 +1716,8 @@
 	struct totemsrp_instance *instance,
 	int gather_from)
 {
+	instance->orf_token_discard = 1;
+
 	memb_set_merge (
 		&instance->my_id, 1,
 		instance->my_proc_list, &instance->my_proc_list_entries);
@@ -1823,6 +1830,8 @@
 	log_printf (instance->totemsrp_log_level_notice,
 		"entering RECOVERY state.\n");
 
+	instance->orf_token_discard = 0;
+
 	instance->my_high_ring_delivered = 0;
 
 	sq_reinit (&instance->recovery_sort_queue, SEQNO_START_MSG);
@@ -3278,6 +3287,9 @@
 			/ 1000.0);
 #endif
 
+	if (instance->orf_token_discard) {
+		return (0);
+	}
 #ifdef TEST_DROP_ORF_TOKEN_PERCENTAGE
 	if (random()%100 < TEST_DROP_ORF_TOKEN_PERCENTAGE) {
 		return (0);