From 453908c7cb29bc2c519194ba24b1f1eea2bac137 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Tue, 27 Oct 2020 18:16:42 +0100 Subject: [PATCH] m3 and g2: bugfix to close fd in server after reading detector type --- .../gotthard2DetectorServer/slsDetectorFunctionList.c | 1 + .../mythen3DetectorServer/slsDetectorFunctionList.c | 1 + 2 files changed, 2 insertions(+) diff --git a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c index 168d766b5..99002cb46 100644 --- a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c @@ -1766,6 +1766,7 @@ int checkDetectorType() { char buffer[MAX_STR_LENGTH]; memset(buffer, 0, sizeof(buffer)); fread(buffer, MAX_STR_LENGTH, sizeof(char), fd); + fclose(fd); if (strlen(buffer) == 0) { LOG(logERROR, ("Could not read file %s to get type of the module attached\n", diff --git a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c index 0e89c7811..62a6d6a7c 100644 --- a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c @@ -1976,6 +1976,7 @@ int checkDetectorType() { char buffer[MAX_STR_LENGTH]; memset(buffer, 0, sizeof(buffer)); fread(buffer, MAX_STR_LENGTH, sizeof(char), fd); + fclose(fd); if (strlen(buffer) == 0) { LOG(logERROR, ("Could not read file %s to get type of the module attached\n",