From 7ca550fd6421bdeb1e81b33198965f24398cfac1 Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Mon, 18 May 2020 11:36:44 +0200 Subject: Fix stats data errors and panic for VPP 20.05 - fixes panic occurring when updating error counters - fixes stat data length errors when updating stats Change-Id: If2d4bcb7df084bf1999ba469f128b7a01aa6be5e Signed-off-by: Ondrej Fabry --- core/stats.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/stats.go') diff --git a/core/stats.go b/core/stats.go index 2a9e964..0717be6 100644 --- a/core/stats.go +++ b/core/stats.go @@ -88,7 +88,7 @@ func newStatsConnection(stats adapter.StatsAPI) *StatsConnection { } } -// Connect connects to Stats API using specified adapter and returns a connection handle. +// ConnectStats connects to Stats API using specified adapter and returns a connection handle. // This call blocks until it is either connected, or an error occurs. // Only one connection attempt will be performed. func ConnectStats(stats adapter.StatsAPI) (*StatsConnection, error) { @@ -177,7 +177,7 @@ func (c *StatsConnection) updateStats(statDir **adapter.StatDir, patterns ...str return err } -// UpdateSystemStats retrieves VPP system stats. +// GetSystemStats retrieves VPP system stats. func (c *StatsConnection) GetSystemStats(sysStats *api.SystemStats) (err error) { if err := c.updateStats(&c.sysStatsData, SystemStatsPrefix); err != nil { return err -- cgit 1.2.3-korg