Send a warning message if a scan point is skipped because of a drive or count failure.

r2158 | ffr | 2007-09-26 14:20:27 +1000 (Wed, 26 Sep 2007) | 2 lines
This commit is contained in:
Ferdi Franceschini
2007-09-26 14:20:27 +10:00
committed by Douglas Clowes
parent 5322cb8254
commit 08296df12f

24
scan.c
View File

@@ -547,10 +547,6 @@ CountEntry CollectCounterData(pScanData self)
{ {
/*--------- drive */ /*--------- drive */
iRet = self->ScanDrive(self,i); iRet = self->ScanDrive(self,i);
if(!iRet)
{
return 0;
}
/* finished, check for interrupts. Whatever happened, user /* finished, check for interrupts. Whatever happened, user
interrupt or HW interrupt, it will be on our connection interrupt or HW interrupt, it will be on our connection
*/ */
@@ -579,13 +575,15 @@ CountEntry CollectCounterData(pScanData self)
return 0; return 0;
break; break;
} }
/*-------------- count */
iRet = self->ScanCount(self, i);
if(!iRet) if(!iRet)
{ {
return 0; SCWrite(self->pCon,"WARNING: skipped scan point after drive failure",
eWarning);
continue;
} }
/*-------------- count */
iRet = self->ScanCount(self, i);
/* finished, check for interrupts. Whatever happened, user /* finished, check for interrupts. Whatever happened, user
interrupt or HW interrupt, it will be on our connection interrupt or HW interrupt, it will be on our connection
*/ */
@@ -610,6 +608,13 @@ CountEntry CollectCounterData(pScanData self)
return 0; return 0;
break; break;
} }
if(!iRet)
{
SCWrite(self->pCon,"WARNING: skipped scan point after count failure",
eWarning);
continue;
}
/*-------- scan post processing */ /*-------- scan post processing */
self->CollectScanData(self,i); self->CollectScanData(self,i);
InvokeCallBack(self->pCall,SCANPOINT,self); InvokeCallBack(self->pCall,SCANPOINT,self);
@@ -2220,9 +2225,8 @@ static int DumpScan(pScanData self, SConnection *pCon)
} }
/*----------- getnumchan */ /*----------- getnumchan */
else if(strcmp(argv[1],"getnumchan") == 0) { else if(strcmp(argv[1],"getnumchan") == 0) {
snprintf(pBueffel,511,"%s.getnumchan = %ld", argv[0], GetNMonitor((pCounter)self->pCounterData)); snprintf(pBueffel,511,"%s.getnumchan = %d", argv[0], GetNMonitor((pCounter)self->pCounterData));
SCWrite(pCon,pBueffel,eValue); SCWrite(pCon,pBueffel,eValue);
return 1;
} }
/*----------- setchannel */ /*----------- setchannel */
else if(strcmp(argv[1],"setchannel") == 0) else if(strcmp(argv[1],"setchannel") == 0)