From b38a41493bceeee6124f47e66a4c6cdb75a61072 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Thu, 10 Jan 2019 16:27:23 +0100 Subject: [PATCH] bug fix, clock divider hangs due to incorrect number of arguments --- slsDetectorSoftware/slsDetector/slsDetector.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index 73899c815..ef2990066 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -2349,11 +2349,12 @@ int64_t slsDetector::getTimeLeft(timerIndex index) { int slsDetector::setSpeed(speedVariable sp, int value) { int fnum = F_SET_SPEED; int ret = FAIL; + int args[2] = {(int)sp, value}; int retval = -1; FILE_LOG(logDEBUG1) << "Setting speed index " << sp << " to " << value; if (thisDetector->onlineFlag == ONLINE_FLAG && connectControl() == OK) { - ret = thisDetectorControl->Client_Send(fnum, &value, sizeof(value), &retval, sizeof(retval)); + ret = thisDetectorControl->Client_Send(fnum, args, sizeof(args), &retval, sizeof(retval)); disconnectControl(); // handle ret