mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 22:40:02 +02:00
check for giving an error in gui if cannot connect to hostname
This commit is contained in:
parent
ca89835035
commit
028ba57876
@ -1037,8 +1037,10 @@ int multiSlsDetector::setOnline(int off) {
|
|||||||
for (int i=0; i<thisMultiDetector->numberOfDetectors; i++) {
|
for (int i=0; i<thisMultiDetector->numberOfDetectors; i++) {
|
||||||
if (detectors[i]){
|
if (detectors[i]){
|
||||||
detectors[i]->setOnline(off);
|
detectors[i]->setOnline(off);
|
||||||
if(detectors[i]->getErrorMask())
|
if(detectors[i]->getErrorMask()){
|
||||||
setErrorMask(getErrorMask()|(1<<i));
|
setErrorMask(getErrorMask()|(1<<i));
|
||||||
|
cprintf(BG_RED,"Setting error mask for %d\n",i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1246,18 +1246,16 @@ string slsDetector::checkOnline() {
|
|||||||
delete controlSocket;
|
delete controlSocket;
|
||||||
controlSocket=NULL;
|
controlSocket=NULL;
|
||||||
retval = string(thisDetector->hostname);
|
retval = string(thisDetector->hostname);
|
||||||
thisDetector->onlineFlag=OFFLINE_FLAG;
|
//#ifdef VERBOSE
|
||||||
#ifdef VERBOSE
|
|
||||||
std::cout<< "offline!" << std::endl;
|
std::cout<< "offline!" << std::endl;
|
||||||
#endif
|
//#endif
|
||||||
} else {
|
} else {
|
||||||
thisDetector->onlineFlag=ONLINE_FLAG;
|
thisDetector->onlineFlag=ONLINE_FLAG;
|
||||||
controlSocket->SetTimeOut(100);
|
controlSocket->SetTimeOut(100);
|
||||||
disconnectControl();
|
disconnectControl();
|
||||||
thisDetector->onlineFlag=ONLINE_FLAG;
|
//#ifdef VERBOSE
|
||||||
#ifdef VERBOSE
|
|
||||||
std::cout<< "online!" << std::endl;
|
std::cout<< "online!" << std::endl;
|
||||||
#endif
|
//#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return retval;
|
return retval;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user