Просмотр исходного кода

Merge trunk revision 2917:
r2917 | sdake | 2010-06-01 13:35:53 -0700 (Tue, 01 Jun 2010) | 17 lines

Totem spec is clear:

reject retransmitted tokens
if token.aru = aru in token on last rotation ... do some logic

Here is how the current code works:

last_aru = instance->my_last_aru;
instance->my_last_aru = token->aru;
reject retransmitted tokens
if token.aru = aru in token on last rotation ... do some logic

The issue is last_aru will be set to token->aru when a token retransmission
occurs before a new token arrives.

This results in the "do some logic" part happening more often then it should.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@2935 fd59a12c-fef9-0310-b244-a6a79926bd2f

Steven Dake 15 лет назад
Родитель
Сommit
bed9a9de4f
1 измененных файлов с 2 добавлено и 3 удалено
  1. 2 3
      exec/totemsrp.c

+ 2 - 3
exec/totemsrp.c

@@ -3425,9 +3425,6 @@ static int message_handler_orf_token (
 		 */
 		 */
 
 
 	case MEMB_STATE_RECOVERY:
 	case MEMB_STATE_RECOVERY:
-		last_aru = instance->my_last_aru;
-		instance->my_last_aru = token->aru;
-
 		/*
 		/*
 		 * Discard tokens from another configuration
 		 * Discard tokens from another configuration
 		 */
 		 */
@@ -3468,6 +3465,8 @@ static int message_handler_orf_token (
 
 
 			return (0); /* discard token */
 			return (0); /* discard token */
 		}
 		}
+		last_aru = instance->my_last_aru;
+		instance->my_last_aru = token->aru;
 
 
 		transmits_allowed = fcc_calculate (instance, token);
 		transmits_allowed = fcc_calculate (instance, token);
 		mcasted_retransmit = orf_token_rtr (instance, token, &transmits_allowed);
 		mcasted_retransmit = orf_token_rtr (instance, token, &transmits_allowed);