mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
lock server bug: sending lockstatus converts to littleendian for eiger, lastclient should have other as datatype for eiger
This commit is contained in:
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user