summaryrefslogtreecommitdiffstats
path: root/ipmid.cpp
diff options
context:
space:
mode:
authorAndrew Jeffery <andrew@aj.id.au>2018-11-23 15:28:58 +1100
committerVernon Mauery <vernon.mauery@linux.intel.com>2018-11-27 18:08:32 +0000
commitb975c4051e969bdb23ef18fa97224ee4d80882c3 (patch)
tree847a92624ecbcc49a9fa9e4ca37c643dcd5560e1 /ipmid.cpp
parent1a4117b8a6163dc2596cf9302c38edfef2042738 (diff)
downloadphosphor-host-ipmid-b975c4051e969bdb23ef18fa97224ee4d80882c3.tar.gz
phosphor-host-ipmid-b975c4051e969bdb23ef18fa97224ee4d80882c3.zip
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>
Diffstat (limited to 'ipmid.cpp')
-rw-r--r--ipmid.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/ipmid.cpp b/ipmid.cpp
index cfaad9b..cb92175 100644
--- a/ipmid.cpp
+++ b/ipmid.cpp
@@ -693,17 +693,7 @@ int main(int argc, char* argv[])
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:
OpenPOWER on IntegriCloud