mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 14:38:14 +02:00
Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor
This commit is contained in:
commit
40d2f66146
@ -1,9 +1,9 @@
|
||||
Path: slsDetectorPackage/slsDetectorServers/eigerDetectorServer
|
||||
URL: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
|
||||
Repository Root: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
|
||||
Repsitory UUID: 1fe473e830b937b05052fe69cb7bfccde451055a
|
||||
Revision: 24
|
||||
Repsitory UUID: be331021649ca28d7656355cbb93baf91877b672
|
||||
Revision: 27
|
||||
Branch: refactor
|
||||
Last Changed Author: Dhanya_Thattil
|
||||
Last Changed Rev: 4359
|
||||
Last Changed Date: 2019-02-22 13:58:42.000000002 +0100 ./xparameters.h
|
||||
Last Changed Rev: 4417
|
||||
Last Changed Date: 2019-03-11 14:57:57.000000002 +0100 ./xparameters.h
|
||||
|
@ -1,6 +1,6 @@
|
||||
#define GITURL "git@github.com:slsdetectorgroup/slsDetectorPackage.git"
|
||||
#define GITREPUUID "1fe473e830b937b05052fe69cb7bfccde451055a"
|
||||
#define GITREPUUID "be331021649ca28d7656355cbb93baf91877b672"
|
||||
#define GITAUTH "Dhanya_Thattil"
|
||||
#define GITREV 0x4359
|
||||
#define GITDATE 0x20190222
|
||||
#define GITREV 0x4417
|
||||
#define GITDATE 0x20190311
|
||||
#define GITBRANCH "refactor"
|
||||
|
@ -2027,12 +2027,18 @@ int lock_server(int file_des) {
|
||||
(!strcmp(lastClientIP, thisClientIP)) || // if it was locked, need same ip
|
||||
(!strcmp(lastClientIP,"none"))) { // if it was locked, must be by "none"
|
||||
lockStatus = lock;
|
||||
if (lock) {
|
||||
FILE_LOG(logINFO, ("Server lock to %s\n", lastClientIP));
|
||||
} else {
|
||||
FILE_LOG(logINFO, ("Server unlocked\n"));
|
||||
}
|
||||
strcpy(lastClientIP, thisClientIP);
|
||||
} else {
|
||||
Server_LockedError();
|
||||
}
|
||||
}
|
||||
return Server_SendResult(file_des, INT32, UPDATE, &lockStatus, sizeof(lockStatus));
|
||||
int retval = lockStatus;
|
||||
return Server_SendResult(file_des, INT32, UPDATE, &retval, sizeof(retval));
|
||||
}
|
||||
|
||||
|
||||
@ -2041,7 +2047,7 @@ int lock_server(int file_des) {
|
||||
int get_last_client_ip(int file_des) {
|
||||
ret = OK;
|
||||
memset(mess, 0, sizeof(mess));
|
||||
return Server_SendResult(file_des, INT32, UPDATE, lastClientIP, sizeof(lastClientIP));
|
||||
return Server_SendResult(file_des, OTHER, UPDATE, lastClientIP, sizeof(lastClientIP));
|
||||
}
|
||||
|
||||
|
||||
|
@ -749,10 +749,10 @@ std::string slsDetector::checkOnline() {
|
||||
//Need both control and stop socket to work!
|
||||
auto client = sls::ClientSocket(false, detector_shm()->hostname, detector_shm()->controlPort);
|
||||
auto stop = sls::ClientSocket(false, detector_shm()->hostname, detector_shm()->stopPort);
|
||||
retval = detector_shm()->hostname;
|
||||
detector_shm()->onlineFlag = ONLINE_FLAG;
|
||||
} catch (...) {
|
||||
//try catch should not be used for control but we should also not call this function
|
||||
detector_shm()->onlineFlag = OFFLINE_FLAG;
|
||||
retval = detector_shm()->hostname;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
@ -4052,8 +4052,10 @@ std::string slsDetector::checkReceiverOnline() {
|
||||
std::string retval;
|
||||
try {
|
||||
auto receiver = sls::ClientSocket(true, detector_shm()->receiver_hostname, detector_shm()->receiverTCPPort);
|
||||
retval = detector_shm()->receiver_hostname;
|
||||
detector_shm()->receiverOnlineFlag = ONLINE_FLAG;
|
||||
} catch (...) {
|
||||
detector_shm()->receiverOnlineFlag = OFFLINE_FLAG;
|
||||
retval = detector_shm()->receiver_hostname;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user