mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-26 08:10:02 +02:00
Merge branch 'vetoheader' of github.com:slsdetectorgroup/slsDetectorPackage into vetoheader
This commit is contained in:
commit
a708da5455
@ -7454,10 +7454,40 @@ int set_veto(int file_des) {
|
|||||||
#else
|
#else
|
||||||
// only set
|
// only set
|
||||||
if (Server_VerifyLock() == OK) {
|
if (Server_VerifyLock() == OK) {
|
||||||
setVeto(arg);
|
// veto allowed only if module attached or in -nomodule mode
|
||||||
int retval = getVeto();
|
if (arg > 0) {
|
||||||
LOG(logDEBUG1, ("veto mode retval: %u\n", retval));
|
if (checkModuleFlag) {
|
||||||
validate(arg, retval, "set veto mode", DEC);
|
int type_ret = checkDetectorType();
|
||||||
|
if (type_ret == -1) {
|
||||||
|
ret = FAIL;
|
||||||
|
sprintf(mess, "Could not enable veto streaming. "
|
||||||
|
"Could not open "
|
||||||
|
"file to know if module attached.\n");
|
||||||
|
LOG(logERROR, (mess));
|
||||||
|
} else if (type_ret == -2) {
|
||||||
|
ret = FAIL;
|
||||||
|
sprintf(mess, "Could not enable veto streaming. No "
|
||||||
|
"module attached!\n");
|
||||||
|
LOG(logERROR, (mess));
|
||||||
|
} else if (type_ret == FAIL) {
|
||||||
|
ret = FAIL;
|
||||||
|
sprintf(mess, "Could not enable veto streaming. Wrong "
|
||||||
|
"module type "
|
||||||
|
"attached!\n");
|
||||||
|
LOG(logERROR, (mess));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
LOG(logINFOBLUE,
|
||||||
|
("In No-Module mode: Ignoring module-attached check. "
|
||||||
|
"Continuing to enable veto streaming.\n"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (ret == OK) {
|
||||||
|
setVeto(arg);
|
||||||
|
int retval = getVeto();
|
||||||
|
LOG(logDEBUG1, ("veto mode retval: %u\n", retval));
|
||||||
|
validate(arg, retval, "set veto mode", DEC);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return Server_SendResult(file_des, INT32, NULL, 0);
|
return Server_SendResult(file_des, INT32, NULL, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user