ipmid: Use sd_event_loop()
The infinite for-loop over sd_event_run() is effectively the
implementation of sd_event_loop(). sd_event_loop() has the additional
features of terminating correctly and running exit tasks on
sd_event_exit().
Change-Id: Ib01a9b1e43891cbb65cfcab1c7a000d2a13728de
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/ipmid.cpp b/ipmid.cpp
index cfaad9b..cb92175 100644
--- a/ipmid.cpp
+++ b/ipmid.cpp
@@ -693,17 +693,7 @@
restrictionModeIntf),
handle_restricted_mode_change);
- for (;;)
- {
- /* Process requests */
- r = sd_event_run(events, (uint64_t)-1);
- if (r < 0)
- {
- log<level::ERR>("Failure in processing request",
- entry("ERRNO=0x%X", -r));
- goto finish;
- }
- }
+ r = sd_event_loop(events);
}
finish: