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

defect 718
if no active replica is not set do not set expiration time and return error.


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

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

+ 6 - 0
exec/ckpt.c

@@ -2271,6 +2271,12 @@ static int message_handler_req_exec_ckpt_sectionexpirationtimeset (void *message
 		goto error_exit;
 	}
 
+	if (ckptCheckpoint->active_replica_set == 0) {
+		log_printf (LOG_LEVEL_NOTICE, "expirationset: no active replica, returning error.\n");
+		error = SA_AIS_ERR_NOT_EXIST;
+		goto error_exit;
+	}
+
 	/*
 	 * Determine if the user is trying to set expiration time for the default section
 	 */