Disables unavailable metrics for interfaces with sampled traffic

Fixes #5471
This commit is contained in:
Simone Mainardi 2021-07-09 16:40:31 +02:00
parent e55f88faa2
commit bb95e65db1
5 changed files with 52 additions and 37 deletions

View file

@ -540,6 +540,15 @@ void ViewInterface::viewed_flows_walker(Flow *f, const struct timeval *tv) {
/* **************************************************** */
bool ViewInterface::isSampledTraffic() const {
for(u_int8_t s = 0; s < num_viewed_interfaces; s++)
if(viewed_interfaces[s]->isSampledTraffic()) return true;
return false;
}
/* **************************************************** */
void ViewInterface::flowPollLoop() {
while(!ntop->getGlobals()->isShutdownRequested()) {
while(idle()) sleep(1);