Răsfoiți Sursa

Fix problem where AMF locks up system if two or more components are members
of the same service unit. Also fixes problem where AMF asserts if two or
more components are specified in a service unit.


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

Steven Dake 19 ani în urmă
părinte
comite
b800167c9f
1 a modificat fișierele cu 6 adăugiri și 2 ștergeri
  1. 6 2
      exec/amfsu.c

+ 6 - 2
exec/amfsu.c

@@ -378,7 +378,11 @@ void amf_su_comp_state_changed (
 
 				su_presence_state_set (comp->su, SA_AMF_PRESENCE_INSTANTIATED);
 			} else {
-				assert (0);
+				/*
+				 * This state occurs when there is more then
+				 * one SU
+				 */
+				return;
 			}
 		} else if (state == SA_AMF_PRESENCE_INSTANTIATING) {
 		} else if (state == SA_AMF_PRESENCE_RESTARTING) {
@@ -393,7 +397,7 @@ void amf_su_comp_state_changed (
 		if (state == SA_AMF_OPERATIONAL_ENABLED) {
 			struct amf_comp *comp_compare;
 			int all_set = 1;
-			for (comp_compare = comp->su->comp_head; comp_compare != NULL; comp_compare = comp->next) {
+			for (comp_compare = comp->su->comp_head; comp_compare != NULL; comp_compare = comp_compare->next) {
 				if (comp_compare->saAmfCompOperState != SA_AMF_OPERATIONAL_ENABLED) {
 					all_set = 0;
 					break;