From 40c0772dda9b6263d6d1d55ee81d11cf2f1c7ccb Mon Sep 17 00:00:00 2001 From: l_maliakal_d Date: Thu, 16 May 2013 07:36:55 +0000 Subject: [PATCH] bug fix wasnt locked before setframeindex and unlocked after git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@556 951219d9-93cf-4727-9268-0efd64621fa3 --- .../slsDetector/slsDetectorUtils.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/slsDetectorSoftware/slsDetector/slsDetectorUtils.cpp b/slsDetectorSoftware/slsDetector/slsDetectorUtils.cpp index 3de9d09a1..5679c08b6 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorUtils.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetectorUtils.cpp @@ -240,19 +240,21 @@ void slsDetectorUtils::acquire(int delflag){ } setCurrentFrameIndex(0); - //if ((timerValue[FRAME_NUMBER]*timerValue[CYCLES_NUMBER])>1) { - if (multiframe>1){ + + if(receiver) + pthread_mutex_lock(&mg); + if (multiframe>1) setFrameIndex(0); - } else { + else setFrameIndex(-1); - } + if(receiver){ - //send receiver file name + pthread_mutex_unlock(&mg);//unlock previous pthread_mutex_lock(&mp); createFileName(); pthread_mutex_unlock(&mp); - + //send receiver file name pthread_mutex_lock(&mg); setFileName(fileIO::getFileName()); if(setReceiverOnline()==OFFLINE_FLAG){