diff --git a/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer b/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer index 4d329a19f..746942b14 100755 Binary files a/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer and b/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer differ diff --git a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c index 854011305..abb502113 100644 --- a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c @@ -514,6 +514,30 @@ int readConfigFile() { continue; } + // removing leading spaces + if (line[0] == ' ' || line[0] == '\t') { + int len = strlen(line); + // find first valid character + int i = 0; + for (i = 0; i < len; ++i) { + if (line[i] != ' ' && line[i] != '\t') { + break; + } + } + // ignore the line full of spaces (last char \n) + if (i >= len - 1) { + LOG(logDEBUG1, ("Ignoring line full of spaces\n")); + continue; + } + // copying only valid char + char temp[LZ]; + memset(temp, 0, LZ); + memcpy(temp, line + i, strlen(line) - i); + memset(line, 0, LZ); + memcpy(line, temp, strlen(temp)); + LOG(logDEBUG1, ("Removing leading spaces.\n")); + } + LOG(logDEBUG1, ("Command to process: (size:%d) %.*s\n", strlen(line), strlen(line) -1, line)); memset(command, 0, LZ); diff --git a/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer b/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer index 96cdf3fc1..ea88e3726 100755 Binary files a/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer and b/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer differ diff --git a/slsDetectorServers/slsDetectorServer/src/readDefaultPattern.c b/slsDetectorServers/slsDetectorServer/src/readDefaultPattern.c index d830db130..2b5855fd9 100755 --- a/slsDetectorServers/slsDetectorServer/src/readDefaultPattern.c +++ b/slsDetectorServers/slsDetectorServer/src/readDefaultPattern.c @@ -53,6 +53,30 @@ int loadDefaultPattern(char* fname) { continue; } + // removing leading spaces + if (line[0] == ' ' || line[0] == '\t') { + int len = strlen(line); + // find first valid character + int i = 0; + for (i = 0; i < len; ++i) { + if (line[i] != ' ' && line[i] != '\t') { + break; + } + } + // ignore the line full of spaces (last char \n) + if (i >= len - 1) { + LOG(logDEBUG1, ("Ignoring line full of spaces\n")); + continue; + } + // copying only valid char + char temp[LZ]; + memset(temp, 0, LZ); + memcpy(temp, line + i, strlen(line) - i); + memset(line, 0, LZ); + memcpy(line, temp, strlen(temp)); + LOG(logDEBUG1, ("Removing leading spaces.\n")); + } + LOG(logDEBUG1, ("Command to process: (size:%d) %.*s\n", strlen(line), strlen(line) -1, line)); memset(command, 0, LZ); diff --git a/slsSupportLib/include/versionAPI.h b/slsSupportLib/include/versionAPI.h index 731a112ef..24dff6ead 100644 --- a/slsSupportLib/include/versionAPI.h +++ b/slsSupportLib/include/versionAPI.h @@ -9,4 +9,5 @@ #define APIJUNGFRAU 0x200409 #define APIMYTHEN3 0x200428 #define APIGOTTHARD2 0x200429 -#define APIMOENCH 0x200428 + +#define APIMOENCH 0x200429