included mismatched indices error shouldnt return fail, but client should try to read again

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@375 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d
2012-12-13 08:33:22 +00:00
parent f74ea5191d
commit 9c6886d030
3 changed files with 18 additions and 15 deletions

View File

@ -391,15 +391,13 @@ void* postProcessing::processData(int delflag) {
bool newData=false;
char currentfName[MAX_STR_LENGTH];
int currentfIndex=0;
while(1){
while(1){cout<<"\t"<<flush;
if (checkJoinThread()) break;
usleep(200000);
pthread_mutex_lock(&mg);
caught=getCurrentFrameIndex();
pthread_mutex_unlock(&mg);
incrementProgress(caught-prevCaught);
if(caught-prevCaught) newData=true;
else newData=false;
@ -414,16 +412,22 @@ void* postProcessing::processData(int delflag) {
cout<<"****Detector returned NULL***"<<endl;
return 0;
}
fdata=decodeData(receiverData);
delete [] receiverData;
if(fdata){
if (dataReady) {
thisData=new detectorData(fdata,NULL,NULL,getCurrentProgress(),currentfName,getTotalNumberOfChannels());
dataReady(thisData, currentfIndex, pCallbackArg);
delete thisData;
fdata=NULL;
if(currentfIndex>=0){
fdata=decodeData(receiverData);
delete [] receiverData;
if(fdata){
if (dataReady) {
thisData=new detectorData(fdata,NULL,NULL,getCurrentProgress(),currentfName,getTotalNumberOfChannels());
dataReady(thisData, currentfIndex, pCallbackArg);
delete thisData;
fdata=NULL;
}
}
}
else{
cout<<"****Detector returned mismatched indeices***"<<endl;
}
}
}
}