protocol: Rework publication of events over DBus transport

A set of races was discovered around the propagation of HIOMAP protocol
BMC status events during BMC shutdown. In particular the change impacts
the design of the DBus transport defined in the protocol specification,
as signalling of both acknowledgeable and non-acknowledgeable events
could not be made atomic.

A particular case where this matters is when the daemon is terminated,
at which point it should simultaneously clear BMC_EVENT_DAEMON_READY and
set BMC_EVENT_PROTOCOL_RESET. The DBus interface as designed required
this be done as two separate messages, which lead to races propagating
the complete state update to the host during shutdown of ipmid.

Change-Id: Iaf38f77c28b8e4e4dd092b0de97dc7e777bfac65
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/mboxd.c b/mboxd.c
index f0deafe..54815b8 100644
--- a/mboxd.c
+++ b/mboxd.c
@@ -193,13 +193,8 @@
 
 	/* Best to reset windows and the lpc mapping for safety */
 	/* Host didn't request reset -> Notify it */
-	if (windows_reset_all(context)) {
-	       rc = protocol_events_set(context, BMC_EVENT_WINDOW_RESET);
-	       if (rc < 0) {
-		      MSG_ERR("Failed to notify host of reset, expect host-side corruption\n");
-		      return rc;
-	       }
-	}
+	windows_reset_all(context);
+
 	rc = lpc_reset(context);
 	/* Not much we can do if this fails */
 	if (rc < 0) {