From 08296df12f26b3f97e79805cb068cbb86144cb01 Mon Sep 17 00:00:00 2001 From: Ferdi Franceschini Date: Wed, 26 Sep 2007 14:20:27 +1000 Subject: [PATCH] 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 --- scan.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/scan.c b/scan.c index 66c567c5..e61a3d48 100644 --- a/scan.c +++ b/scan.c @@ -547,10 +547,6 @@ CountEntry CollectCounterData(pScanData self) { /*--------- drive */ iRet = self->ScanDrive(self,i); - if(!iRet) - { - return 0; - } /* finished, check for interrupts. Whatever happened, user interrupt or HW interrupt, it will be on our connection */ @@ -579,13 +575,15 @@ CountEntry CollectCounterData(pScanData self) return 0; break; } + if(!iRet) + { + SCWrite(self->pCon,"WARNING: skipped scan point after drive failure", + eWarning); + continue; + } + /*-------------- count */ iRet = self->ScanCount(self, i); - if(!iRet) - { - return 0; - } - /* finished, check for interrupts. Whatever happened, user interrupt or HW interrupt, it will be on our connection */ @@ -610,6 +608,13 @@ CountEntry CollectCounterData(pScanData self) return 0; break; } + if(!iRet) + { + SCWrite(self->pCon,"WARNING: skipped scan point after count failure", + eWarning); + continue; + } + /*-------- scan post processing */ self->CollectScanData(self,i); InvokeCallBack(self->pCall,SCANPOINT,self); @@ -2220,9 +2225,8 @@ static int DumpScan(pScanData self, SConnection *pCon) } /*----------- getnumchan */ 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); - return 1; } /*----------- setchannel */ else if(strcmp(argv[1],"setchannel") == 0)