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

improved cluster_applications_are_starting_sgs

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1297 fd59a12c-fef9-0310-b244-a6a79926bd2f
Lon Hohberger 19 лет назад
Родитель
Сommit
22f7289a28
1 измененных файлов с 12 добавлено и 6 удалено
  1. 12 6
      exec/amfcluster.c

+ 12 - 6
exec/amfcluster.c

@@ -218,21 +218,27 @@ static int cluster_applications_started_instantiated (struct amf_cluster *cluste
 
 static int cluster_applications_are_starting_sgs(struct amf_cluster *cluster)
 {
-	struct amf_application *application = 0;
+	amf_application_t *application;
+	amf_sg_t *sg;
+	amf_su_t *su;
 	int is_starting_sgs = 0;
 
 	for (application = cluster->application_head; application != NULL;
 		application = application->next) {
-		if (application->acsm_state == APP_AC_STARTING_SGS) {
-			is_starting_sgs = 1;
-			break;
+		for (sg = application->sg_head; sg != NULL; sg = sg->next) {
+			for (su = sg->su_head; su != NULL; su = su->next) {
+
+				if (su->saAmfSUPresenceState == 
+					SA_AMF_PRESENCE_INSTANTIATING) {
+					is_starting_sgs = 1;
+					break;
+				}
+			}
 		}
 	}
 	return is_starting_sgs;
 }
 
-
-
 static void acsm_cluster_enter_assigning_workload (struct amf_cluster *cluster)
 {
 	log_printf(LOG_NOTICE,