From: Korynkevych, RomanX Date: Tue, 6 Dec 2016 12:13:37 +0000 (+0000) Subject: intel_rdt: reset pqos monitoring groups on initialization. X-Git-Tag: collectd-5.8.0~277^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=ef3c388980a1f84840db8acc8b8ef480cebe3f3e;p=collectd.git intel_rdt: reset pqos monitoring groups on initialization. Monitoring groups fail to start when intel_rdt plugin has unpredictably stopped without unsubscribing from the pqos library. Reset pqos monitoring groups registers after pqos library is initialized. Change-Id: I231ba44e531deb8791f34730e7572bfe0cbd825d Signed-off-by: Korynkevych, RomanX --- diff --git a/src/intel_rdt.c b/src/intel_rdt.c index d1a0c51d..6beac7b4 100644 --- a/src/intel_rdt.c +++ b/src/intel_rdt.c @@ -478,10 +478,6 @@ static int rdt_preinit(void) { return (-ENOMEM); } - /* In case previous instance of the application was not closed properly - * call fini and ignore return code. */ - pqos_fini(); - struct pqos_config pqos = {.fd_log = -1, .callback_log = rdt_pqos_log, .context_log = NULL, @@ -512,6 +508,9 @@ static int rdt_preinit(void) { goto rdt_preinit_error2; } + /* Reset pqos monitoring groups registers */ + pqos_mon_reset(); + return (0); rdt_preinit_error2: