From 2dc9b1a24f753270eae01be8b71c0c89a3c669cc Mon Sep 17 00:00:00 2001 From: Vishwanatha Subbanna Date: Fri, 18 Aug 2017 18:29:41 +0530 Subject: Enable OCC error monitoring Fixes openbmc/openbmc#2165 Change-Id: I93f317a32c910f279003fa0fce6ae2d597f90312 Signed-off-by: Vishwanatha Subbanna --- occ_status.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'occ_status.cpp') diff --git a/occ_status.cpp b/occ_status.cpp index 94b8c4c..15ffbc8 100644 --- a/occ_status.cpp +++ b/occ_status.cpp @@ -28,17 +28,21 @@ bool Status::occActive(bool value) // Bind the device device.bind(); - // And watch for errors - // Commenting until we solve the occ error monitoring issue - // TODO: openbmc/openbmc#2126 - // device.addErrorWatch(); + // Call into Manager to let know that we have bound + if (this->callBack) + { + this->callBack(value); + } } else { - // Stop watching for errors - // Commenting until we solve the occ error monitoring issue - // TODO: openbmc/openbmc#2126 - // device.removeErrorWatch(); + // Call into Manager to let know that we will unbind. + // Need to do this before doing un-bind since it will + // result in slave error if Master is un-bound + if (this->callBack) + { + this->callBack(value); + } // Do the unbind. device.unBind(); -- cgit v1.2.1