Răsfoiți Sursa

CheckpointRead wasn't checking the active replica was set.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1124 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake 19 ani în urmă
părinte
comite
918da2cd8d
1 a modificat fișierele cu 5 adăugiri și 1 ștergeri
  1. 5 1
      exec/ckpt.c

+ 5 - 1
exec/ckpt.c

@@ -1750,7 +1750,6 @@ static void message_handler_req_exec_ckpt_checkpointopen (
 
 
 	log_printf (LOG_LEVEL_DEBUG, "Executive request to open checkpoint %p\n", req_exec_ckpt_checkpointopen);
 	log_printf (LOG_LEVEL_DEBUG, "Executive request to open checkpoint %p\n", req_exec_ckpt_checkpointopen);
 	
 	
-printf ("opening checkpoint %s\n", req_exec_ckpt_checkpointopen->checkpoint_name.value);
 	if (req_exec_ckpt_checkpointopen->fail_with_error != SA_AIS_OK) {
 	if (req_exec_ckpt_checkpointopen->fail_with_error != SA_AIS_OK) {
 		error = req_exec_ckpt_checkpointopen->fail_with_error;
 		error = req_exec_ckpt_checkpointopen->fail_with_error;
 		goto error_exit;
 		goto error_exit;
@@ -3169,6 +3168,11 @@ static void message_handler_req_exec_ckpt_sectionread (
 		goto error_exit;
 		goto error_exit;
 	}
 	}
 
 
+	if (checkpoint->active_replica_set == 0) {
+		error = SA_AIS_ERR_NOT_EXIST;
+		goto error_exit;
+	}
+
 	/*
 	/*
 	 * Find checkpoint section to be read
 	 * Find checkpoint section to be read
 	 */
 	 */