mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-08 22:00:03 +02:00
changing manual list size entry for allowed funcs in server update mode
This commit is contained in:
parent
c14fb92c16
commit
11ad019d47
@ -80,7 +80,7 @@ char scanErrMessage[MAX_STR_LENGTH] = "";
|
|||||||
/* initialization functions */
|
/* initialization functions */
|
||||||
|
|
||||||
int updateModeAllowedFunction(int file_des) {
|
int updateModeAllowedFunction(int file_des) {
|
||||||
enum detFuncs list[] = {F_EXEC_COMMAND,
|
enum detFuncs allowedFuncs[] = {F_EXEC_COMMAND,
|
||||||
F_GET_DETECTOR_TYPE,
|
F_GET_DETECTOR_TYPE,
|
||||||
F_GET_FIRMWARE_VERSION,
|
F_GET_FIRMWARE_VERSION,
|
||||||
F_GET_SERVER_VERSION,
|
F_GET_SERVER_VERSION,
|
||||||
@ -102,10 +102,10 @@ int updateModeAllowedFunction(int file_des) {
|
|||||||
F_GET_NUM_CHANNELS,
|
F_GET_NUM_CHANNELS,
|
||||||
F_GET_NUM_INTERFACES,
|
F_GET_NUM_INTERFACES,
|
||||||
F_ACTIVATE};
|
F_ACTIVATE};
|
||||||
unsigned int listsize = 22;
|
size_t allowedFuncsSize = sizeof(allowedFuncs) / sizeof(enum detFuncs);
|
||||||
|
|
||||||
for (unsigned int i = 0; i < listsize; ++i) {
|
for (unsigned int i = 0; i < allowedFuncsSize; ++i) {
|
||||||
if ((unsigned int)fnum == list[i]) {
|
if ((unsigned int)fnum == allowedFuncs[i]) {
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user