[servicemapper] reset stats when starting the mapper
This commit is contained in:
parent
2be4265a29
commit
d638f25225
2 changed files with 16 additions and 0 deletions
|
@ -78,6 +78,9 @@ service_mapper_start ( const service_mapper_conf_t *conf, htsmsg_t *uuids )
|
|||
int e, tr, qd = 0;
|
||||
service_t *s;
|
||||
|
||||
/* Reset stat counters */
|
||||
service_mapper_reset_stats();
|
||||
|
||||
/* Store config */
|
||||
service_mapper_conf = *conf;
|
||||
|
||||
|
@ -432,3 +435,13 @@ service_mapper_thread ( void *aux )
|
|||
pthread_mutex_unlock(&global_lock);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
service_mapper_reset_stats (void)
|
||||
{
|
||||
service_mapper_stat.total = 0;
|
||||
service_mapper_stat.ok = 0;
|
||||
service_mapper_stat.ignore = 0;
|
||||
service_mapper_stat.fail = 0;
|
||||
service_mapper_stat.active = NULL;
|
||||
}
|
||||
|
|
|
@ -72,4 +72,7 @@ void service_mapper_unlink ( struct service *s, struct channel *c, void *origin
|
|||
*/
|
||||
int service_mapper_clean ( struct service *s, struct channel *ch, void *origin );
|
||||
|
||||
// Resets the stat counters
|
||||
void service_mapper_reset_stats ( void );
|
||||
|
||||
#endif /* __TVH_SERVICE_MAPPER_H__ */
|
||||
|
|
Loading…
Add table
Reference in a new issue