[PATCH phosphor-event v4 4/4] Object manager doesn't show until first log

OpenBMC Patches openbmc-patches at stwcx.xyz
Wed Nov 25 03:20:30 AEDT 2015


From: Chris Austen <austenc at us.ibm.com>

---
 event_messaged.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/event_messaged.c b/event_messaged.c
index 5a0c3da..07430b0 100644
--- a/event_messaged.c
+++ b/event_messaged.c
@@ -262,12 +262,6 @@ int create_new_log_event(void *userdata,
 
 	printf("Event Log added %s\n", loglocation);
 
-	r = sd_bus_add_object_manager(bus, NULL, "/org/openbmc/records/events") ;
-	if (r < 0) {
-		fprintf(stderr, "Object Manager failure  %s\n", strerror(-r));
-		return 0;
-	}
-
 	r = sd_bus_emit_object_added(bus, loglocation);
 	if (r < 0) {
 		fprintf(stderr, "Failed to emit signal %s\n", strerror(-r));
@@ -312,6 +306,12 @@ int start_event_recording(void) {
 		goto finish;
 	}
 
+	r = sd_bus_add_object_manager(bus, NULL, "/org/openbmc/records/events") ;
+	if (r < 0) {
+		fprintf(stderr, "Object Manager failure  %s\n", strerror(-r));
+		return 0;
+	}
+
 	for (;;) {
 		r = sd_bus_process(bus, NULL);
 		if (r < 0) {
-- 
2.6.3




More information about the openbmc mailing list