mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-27 00:30:03 +02:00
solved bug for real: undefined state when stoppping receiver
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@546 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
1eae11a87a
commit
5e7d22357e
@ -6063,6 +6063,7 @@ int* slsDetector::readFrameFromReceiver(char* fName, int &fIndex){
|
|||||||
std::cout<< "slsDetector: Reading frame from receiver "<< thisDetector->dataBytes << " " <<nel <<std::endl;
|
std::cout<< "slsDetector: Reading frame from receiver "<< thisDetector->dataBytes << " " <<nel <<std::endl;
|
||||||
#endif
|
#endif
|
||||||
if (connectData() == OK){
|
if (connectData() == OK){
|
||||||
|
if(!thisDetector->stoppedFlag){
|
||||||
dataSocket->SendDataOnly(&fnum,sizeof(fnum));
|
dataSocket->SendDataOnly(&fnum,sizeof(fnum));
|
||||||
dataSocket->ReceiveDataOnly(&ret,sizeof(ret));
|
dataSocket->ReceiveDataOnly(&ret,sizeof(ret));
|
||||||
|
|
||||||
@ -6076,6 +6077,7 @@ int* slsDetector::readFrameFromReceiver(char* fName, int &fIndex){
|
|||||||
n=dataSocket->ReceiveDataOnly(fName,MAX_STR_LENGTH);
|
n=dataSocket->ReceiveDataOnly(fName,MAX_STR_LENGTH);
|
||||||
n=dataSocket->ReceiveDataOnly(&fIndex,sizeof(fIndex));
|
n=dataSocket->ReceiveDataOnly(&fIndex,sizeof(fIndex));
|
||||||
n=dataSocket->ReceiveDataOnly(retval,thisDetector->dataBytes);
|
n=dataSocket->ReceiveDataOnly(retval,thisDetector->dataBytes);
|
||||||
|
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
std::cout<< "Received "<< n << " data bytes" << std::endl;
|
std::cout<< "Received "<< n << " data bytes" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
@ -6087,6 +6089,10 @@ int* slsDetector::readFrameFromReceiver(char* fName, int &fIndex){
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
cout << "Acquisition stopped" << endl;
|
||||||
|
|
||||||
dataSocket->Disconnect();
|
dataSocket->Disconnect();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user