Unverified Commit d99b4979 authored by Andrea Orlati's avatar Andrea Orlati Committed by GitHub
Browse files

fix issue #604: in case of mismatch between the projectID of the schedule...

fix issue #604: in case of mismatch between the projectID of the schedule header and the current ctvie project an error is (#663)

thrown. The excpetion was not declared in functions signature leading to a crash.
parent 3321199b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -178,10 +178,11 @@ void _haltSchedule();
 * @throw ManagementErrors::LogFileErrorExImpl
 * @thorw ManagementErrors::ScheduleNotExistExImpl
 * @throw ManagementErrors::CannotClosePendingTaskExImpl
 * @throw ManagementErrors::ScheduleProjectNotMatchExImpl
*/
void _startSchedule(const char* scheduleFile,const char * startSubScan) throw (ManagementErrors::ScheduleErrorExImpl,ManagementErrors::AlreadyRunningExImpl,
		ComponentErrors::MemoryAllocationExImpl,ComponentErrors::CouldntGetComponentExImpl,ComponentErrors::CORBAProblemExImpl,
		ManagementErrors::LogFileErrorExImpl,ManagementErrors::ScheduleNotExistExImpl,ManagementErrors::CannotClosePendingTaskExImpl);
		ManagementErrors::LogFileErrorExImpl,ManagementErrors::ScheduleNotExistExImpl,ManagementErrors::CannotClosePendingTaskExImpl,ManagementErrors::ScheduleProjectNotMatchExImpl);

/**
 * It allows to change the backend elected as default backend, the default backend is the device used for all operation (for example tsys) when a schedule is not running.
+2 −1
Original line number Diff line number Diff line
@@ -72,11 +72,12 @@ public:
 	 * @throw ComponentErrors::CORBAProblemExImpl
 	 * @throw ManagementErrors::LogFileErrorExImpl
 	 * @thorw ManagementErrors::CannotClosePendingTaskExImpl
 	 * @throw ManagementErrors::ScheduleProjectNotMatchExImpl
 	*/
     void startSchedule(const char* scheduleFile,const char * subScanidentifier) throw (ManagementErrors::ScheduleErrorExImpl,
    		 ManagementErrors::AlreadyRunningExImpl,ComponentErrors::MemoryAllocationExImpl,ComponentErrors::CouldntGetComponentExImpl,ComponentErrors::CORBAProblemExImpl,
    		 ManagementErrors::LogFileErrorExImpl,ManagementErrors::ScheduleNotExistExImpl,
    		 ManagementErrors::CannotClosePendingTaskExImpl);
    		 ManagementErrors::CannotClosePendingTaskExImpl,ManagementErrors::ScheduleProjectNotMatchExImpl);
     
     /**
      * initialize the schedule executor.
+2 −3
Original line number Diff line number Diff line
@@ -1156,12 +1156,11 @@ void CCore::_haltSchedule()

void CCore::_startSchedule(const char* scheduleFile,const char * startSubScan) throw (ManagementErrors::ScheduleErrorExImpl,ManagementErrors::AlreadyRunningExImpl,
		ComponentErrors::MemoryAllocationExImpl,ComponentErrors::CouldntGetComponentExImpl,ComponentErrors::CORBAProblemExImpl,
		ManagementErrors::LogFileErrorExImpl,ManagementErrors::ScheduleNotExistExImpl,ManagementErrors::CannotClosePendingTaskExImpl)
		ManagementErrors::LogFileErrorExImpl,ManagementErrors::ScheduleNotExistExImpl,ManagementErrors::CannotClosePendingTaskExImpl,
		ManagementErrors::ScheduleProjectNotMatchExImpl)
{
	//no need to get the mutex, because it is already done inside the Schedule Executor thread
	if (m_schedExecuter) {
 		//ManagementErrors::ScheduleErrorExImpl, ManagementErrors::AlreadyRunningExImpl,ComponentErrors::MemoryAllocationExImpl,ComponentErrors::CouldntGetComponentExImpl,
 		//ComponentErrors::CORBAProblemExImpl,ManagementErrors::LogFileErrorExImpl,ManagementErrors::ScheduleNotExistExImpl
		m_schedExecuter->startSchedule(scheduleFile,startSubScan);
	}
}
+1 −1
Original line number Diff line number Diff line
@@ -556,7 +556,7 @@ void CScheduleExecutor::initialize(maci::ContainerServices *services,const doubl
void CScheduleExecutor::startSchedule(const char* scheduleFile,const char * subScanidentifier) throw (
 		ManagementErrors::ScheduleErrorExImpl, ManagementErrors::AlreadyRunningExImpl,ComponentErrors::MemoryAllocationExImpl,ComponentErrors::CouldntGetComponentExImpl,
 		ComponentErrors::CORBAProblemExImpl,ManagementErrors::LogFileErrorExImpl,ManagementErrors::ScheduleNotExistExImpl,
 		ManagementErrors::CannotClosePendingTaskExImpl)
 		ManagementErrors::CannotClosePendingTaskExImpl,ManagementErrors::ScheduleProjectNotMatchExImpl)
{
 	baci::ThreadSyncGuard guard(&m_mutex);
 	bool projectChanged;