From 7c172898d9f9cc4aa7f15bd767078d66a8ceda5c Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Wed, 11 Aug 2021 12:10:27 +0200 Subject: [PATCH] jungfrau allow no config files to assume v1.0 --- .../jungfrauDetectorServer/slsDetectorFunctionList.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c index ba07af16d..5116f0529 100644 --- a/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c @@ -620,9 +620,16 @@ int readConfigFile() { return FAIL; } + // file doesnt exist (give warning and assume chipv1.0) + if (access(fname, F_OK) != 0) { + LOG(logWARNING, ("Could not find config file. Assuming chipv1.0\n")); + return OK; + } + // open config file FILE *fd = fopen(fname, "r"); if (fd == NULL) { + sprintf(initErrorMessage, "Could not open on-board detector server config file [%s].\n", CONFIG_FILE);