From 27c4d8652ebc54b2f4da64ba249c2497c35f9e43 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Tue, 19 Oct 2021 07:58:54 +0200 Subject: [PATCH] added sync and not executing set detector position in update mode --- .../src/slsDetectorServer_funcs.c | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c b/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c index ac17288b4..16c0cbc4c 100644 --- a/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c +++ b/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c @@ -4319,21 +4319,20 @@ int copy_detector_server(int file_des) { } #endif - // sync - if (ret == OK) { - strcpy(cmd, "sync"); - if (executeCommand(cmd, retvals, logDEBUG1) == FAIL) { - ret = FAIL; - snprintf( - mess, MAX_STR_LENGTH, - "Could not copy detector server (sync). %s\n", - retvals); - // LOG(logERROR, (mess)); already printed in executecommand - } else { - LOG(logINFO, ("\tsync\n")); + // sync + if (ret == OK) { + strcpy(cmd, "sync"); + if (executeCommand(cmd, retvals, logDEBUG1) == FAIL) { + ret = FAIL; + snprintf(mess, MAX_STR_LENGTH, + "Could not copy detector server (sync). %s\n", + retvals); + // LOG(logERROR, (mess)); already printed in executecommand + } else { + LOG(logINFO, ("\tsync\n")); + } } } - } #endif return Server_SendResult(file_des, OTHER, retvals, sizeof(retvals)); } @@ -4960,7 +4959,7 @@ int set_detector_position(int file_des) { // only set if (Server_VerifyLock() == OK) { - if (check_detector_idle("configure mac") == OK) { + if (!updateFlag && check_detector_idle("configure mac") == OK) { maxydet = args[0]; detectorId = args[1]; calculate_and_set_position();