mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 12:57:13 +02:00
check for module attached only when enabling veto streaming, not disabling
This commit is contained in:
@ -7455,31 +7455,32 @@ int set_veto(int file_des) {
|
|||||||
// only set
|
// only set
|
||||||
if (Server_VerifyLock() == OK) {
|
if (Server_VerifyLock() == OK) {
|
||||||
// veto allowed only if module attached or in -nomodule mode
|
// veto allowed only if module attached or in -nomodule mode
|
||||||
if (checkModuleFlag) {
|
if (arg > 0) {
|
||||||
int type_ret = checkDetectorType();
|
if (checkModuleFlag) {
|
||||||
if (type_ret == -1) {
|
int type_ret = checkDetectorType();
|
||||||
ret = FAIL;
|
if (type_ret == -1) {
|
||||||
sprintf(
|
ret = FAIL;
|
||||||
mess,
|
sprintf(mess, "Could not enable veto streaming. "
|
||||||
"Could not enable/disable veto streaming. Could not open "
|
"Could not open "
|
||||||
"file to know if module attached.\n");
|
"file to know if module attached.\n");
|
||||||
LOG(logERROR, (mess));
|
LOG(logERROR, (mess));
|
||||||
} else if (type_ret == -2) {
|
} else if (type_ret == -2) {
|
||||||
ret = FAIL;
|
ret = FAIL;
|
||||||
sprintf(mess, "Could not enable/disable veto streaming. No "
|
sprintf(mess, "Could not enable veto streaming. No "
|
||||||
"module attached!\n");
|
"module attached!\n");
|
||||||
LOG(logERROR, (mess));
|
LOG(logERROR, (mess));
|
||||||
} else if (type_ret == FAIL) {
|
} else if (type_ret == FAIL) {
|
||||||
ret = FAIL;
|
ret = FAIL;
|
||||||
sprintf(mess, "Could not enable/disable veto streaming. Wrong "
|
sprintf(mess, "Could not enable veto streaming. Wrong "
|
||||||
"module type "
|
"module type "
|
||||||
"attached!\n");
|
"attached!\n");
|
||||||
LOG(logERROR, (mess));
|
LOG(logERROR, (mess));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
LOG(logINFOBLUE,
|
||||||
|
("In No-Module mode: Ignoring module-attached check. "
|
||||||
|
"Continuing to enable veto streaming.\n"));
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
LOG(logINFOBLUE,
|
|
||||||
("In No-Module mode: Ignoring module-attached check. "
|
|
||||||
"Continuing to enable/disable veto streaming.\n"));
|
|
||||||
}
|
}
|
||||||
if (ret == OK) {
|
if (ret == OK) {
|
||||||
setVeto(arg);
|
setVeto(arg);
|
||||||
|
Reference in New Issue
Block a user