浏览代码

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 21 年之前
父节点
当前提交
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
 	 */