- Recovered POLDI from the land of lost files

This commit is contained in:
cvs
2003-04-23 11:52:44 +00:00
parent b06a473cf5
commit 7669a9b3fb
6 changed files with 220 additions and 141 deletions

View File

@ -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)