Kaynağa Gözat

defect 636
fix saClmDispatch blocks on invalid dispatch flags

(Logical change 1.217)


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

Steven Dake 20 yıl önce
ebeveyn
işleme
54bc55ff8b
1 değiştirilmiş dosya ile 7 ekleme ve 0 silme
  1. 7 0
      lib/clm.c

+ 7 - 0
lib/clm.c

@@ -189,6 +189,13 @@ saClmDispatch (
 	SaClmClusterNotificationBufferT notificationBuffer;
 	SaClmClusterNotificationBufferT notificationBuffer;
 	int copy_items;
 	int copy_items;
 
 
+	if (dispatchFlags != SA_DISPATCH_ONE &&
+		dispatchFlags != SA_DISPATCH_ALL &&
+		dispatchFlags != SA_DISPATCH_BLOCKING) {
+
+		return (SA_AIS_ERR_INVALID_PARAM);
+	}
+
 	error = saHandleInstanceGet (&clmHandleDatabase, clmHandle,
 	error = saHandleInstanceGet (&clmHandleDatabase, clmHandle,
 		(void *)&clmInstance);
 		(void *)&clmInstance);
 	if (error != SA_OK) {
 	if (error != SA_OK) {