- Recovered POLDI from the land of lost files
This commit is contained in:
33
histmem.c
33
histmem.c
@ -711,6 +711,15 @@
|
||||
return StartDevice(GetExecutor(),"HistogramMemory", self->pDes, self,
|
||||
pCon, self->pDriv->fCountPreset);
|
||||
}
|
||||
/*-------------------------------------------------------------------------*/
|
||||
int HistDoEnd(pHistMem self, SConnection *pCon)
|
||||
{
|
||||
assert(self);
|
||||
assert(self->pCall);
|
||||
|
||||
/* send a COUNTEND event */
|
||||
InvokeCallBack(self->pCall,COUNTEND,NULL);
|
||||
}
|
||||
/*-----------------------------------------------------------------------*/
|
||||
int HistBlockCount(pHistMem self, SConnection *pCon)
|
||||
{
|
||||
@ -1171,6 +1180,30 @@ static int checkHMEnd(pHistMem self, char *text){
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
/* COUNTEND signal*/
|
||||
else if(strcmp(argv[1],"countend") == 0)
|
||||
{
|
||||
if(SCMatchRights(pCon,self->iAccess))
|
||||
{
|
||||
if(IsCounting(pServ->pExecutor))
|
||||
{
|
||||
SCWrite(pCon,"WARNING: HM is counting!",eWarning);
|
||||
return 1;
|
||||
}
|
||||
iRet = HistDoEnd(self,pCon);
|
||||
if(iRet == 1)
|
||||
{
|
||||
SCSendOK(pCon);
|
||||
}
|
||||
return iRet;
|
||||
}
|
||||
else
|
||||
{
|
||||
SCWrite(pCon,
|
||||
"ERROR: you are not privileged for attempted operation",eError);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
/* forced count, for the case several hm need to be started */
|
||||
else if(strcmp(argv[1],"countf") == 0)
|
||||
|
Reference in New Issue
Block a user