changed everything to depend on receiver online shared memory flag, and if it is online is only checked rarely

This commit is contained in:
Dhanya Maliakal
2016-11-22 14:01:07 +01:00
parent 09d146ee55
commit c70f453de4
3 changed files with 88 additions and 70 deletions

View File

@ -286,12 +286,6 @@ int slsDetectorUtils::acquire(int delflag){
//send receiver file name
pthread_mutex_lock(&mg);
setFileName(fileIO::getFileName());
if(setReceiverOnline()==OFFLINE_FLAG){
stopReceiver();
*stoppedFlag=1;
pthread_mutex_unlock(&mg);
break;
}
//start receiver
if(startReceiver() == FAIL) {
stopReceiver();
@ -349,6 +343,12 @@ int slsDetectorUtils::acquire(int delflag){
}
//online
else{
if(setReceiverOnline(ONLINE_FLAG)!=ONLINE_FLAG){
stopAcquisition();
stopReceiver();
pthread_mutex_unlock(&mg);
break;
}
stopReceiver();
// cout<<"***********receiver stopped"<<endl;
}