Added getnmon and getnumchan to the counter and scan commands so we can retrieve the number of available monitors.

r1650 | ffr | 2007-03-14 13:56:20 +1100 (Wed, 14 Mar 2007) | 2 lines
This commit is contained in:
Ferdi Franceschini
2007-03-14 13:56:20 +11:00
committed by Douglas Clowes
parent 3fdf28282a
commit 848448de38
2 changed files with 13 additions and 3 deletions

5
scan.c
View File

@@ -2232,6 +2232,11 @@ static int DumpScan(pScanData self, SConnection *pCon)
}
return iRet;
}
/*----------- getnumchan */
else if(strcmp(argv[1],"getnumchan") == 0) {
snprintf(pBueffel,511,"%s.getnumchan = %ld", argv[0], GetNMonitor((pCounter)self->pCounterData));
SCWrite(pCon,pBueffel,eValue);
}
/*----------- setchannel */
else if(strcmp(argv[1],"setchannel") == 0)
{