diff --git a/counter.c b/counter.c index 283dbe29..1b21f4a7 100644 --- a/counter.c +++ b/counter.c @@ -44,15 +44,11 @@ #include #include "fortify.h" #include +#include "sics.h" #include "countdriv.h" -#include "obdes.h" -#include "conman.h" -#include "interface.h" #include "counter.h" #include "fupa.h" -#include "devexec.h" #include "status.h" -#include "event.h" #include "splitter.h" /*-------------------------------------------------------------------------*/ /* @@ -841,6 +837,10 @@ SCWrite(pCon,pBueffel,eValue); return 1; case 7: /* SetExponent */ + if(!SCMatchRights(pCon,usMugger)) + { + return 0; + } self->iExponent = PaRes.Arg[0].iVal; SCSendOK(pCon); return 1; @@ -913,6 +913,13 @@ "ERROR: Insufficient privilege to set threshold",eError); return 0; } + if(isInRunMode(pServ->pExecutor)) + { + SCWrite(pCon, + "ERROR: cannot change threshold while instrument is active", + eError); + return 0; + } /* set threshold value */ iRet = self->pDriv->Set(self->pDriv,PARTHRESHOLD, PaRes.Arg[0].iVal,PaRes.Arg[1].fVal);