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

Commit timeout wasn't stopped when entering gather state. This patch stops
the commit timeout when the gather state is entered.

(Logical change 1.103)


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@379 fd59a12c-fef9-0310-b244-a6a79926bd2f

Steven Dake 21 лет назад
Родитель
Сommit
24577db3a1
1 измененных файлов с 16 добавлено и 3 удалено
  1. 16 3
      exec/gmi.c

+ 16 - 3
exec/gmi.c

@@ -3196,11 +3196,22 @@ static int memb_state_gather_enter (void) {
 		 */
 		 */
 	}
 	}
 
 
+	/*
+	 * Restart the gather timeout
+	` */
 	poll_timer_delete (*gmi_poll_handle, timer_memb_state_gather_timeout);
 	poll_timer_delete (*gmi_poll_handle, timer_memb_state_gather_timeout);
 
 
 	poll_timer_add (*gmi_poll_handle, TIMEOUT_STATE_GATHER, 0,
 	poll_timer_add (*gmi_poll_handle, TIMEOUT_STATE_GATHER, 0,
 		memb_timer_function_state_gather, &timer_memb_state_gather_timeout);
 		memb_timer_function_state_gather, &timer_memb_state_gather_timeout);
 
 
+	/*
+	 * If we already started a commit, stop it since we are
+	 * going back into the gather state
+	 */
+	poll_timer_delete (*gmi_poll_handle, timer_memb_state_commit_timeout);
+
+	timer_memb_state_commit_timeout = 0;
+
 	return (res);
 	return (res);
 }
 }
 
 
@@ -3661,9 +3672,11 @@ static int message_handler_memb_attempt_join (
 			}
 			}
 			break;
 			break;
 
 
-		default:
-			// TODO what about other states
-			gmi_log_printf (gmi_log_level_error, "memb_attempt_join: EVS or FORM state attempt join occured %d\n", memb_state);
+		case MEMB_STATE_FORM:
+		case MEMB_STATE_EVS:
+			gmi_log_printf (gmi_log_level_error,
+				"memb_attempt_join: FORM, EVS %d\n", memb_state);
+			break;
 	}
 	}
 
 
 	return (0);
 	return (0);