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

defect 713
if active replica not set in section delete, return error


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

Steven Dake 20 лет назад
Родитель
Сommit
61f6122074
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      exec/ckpt.c

+ 6 - 0
exec/ckpt.c

@@ -2209,6 +2209,12 @@ static int message_handler_req_exec_ckpt_sectiondelete (void *message, struct in
 		goto error_exit;
 	}
 
+	if (ckptCheckpoint->active_replica_set == 0) {
+		log_printf (LOG_LEVEL_NOTICE, "sectiondelete: no active replica, returning error.\n");
+		error = SA_AIS_ERR_NOT_EXIST;
+		goto error_exit;
+	}
+
 	/*
 	 * Determine if the user is trying to delete the default section
 	 */