Change yield from ptr to object
The ptr makes for ugly code:
i.e. *(ctx->yield) all over the place.
Change it to copy as it is just 4 pointers.
Tested: ipmitool mc info still works
Change-Id: I30c5bc395849875cd58925fac99bb23c1804cd5b
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/ipmid-new.cpp b/ipmid-new.cpp
index c32ba3f..f210c5d 100644
--- a/ipmid-new.cpp
+++ b/ipmid-new.cpp
@@ -537,7 +537,7 @@
entry("RQSA=%x", rqSA));
auto ctx = std::make_shared<ipmi::Context>(getSdBus(), netFn, cmd, channel,
- userId, privilege, rqSA, &yield);
+ userId, privilege, rqSA, yield);
auto request = std::make_shared<ipmi::message::Request>(
ctx, std::forward<std::vector<uint8_t>>(data));
message::Response::ptr response = executeIpmiCommand(request);
@@ -750,7 +750,7 @@
m.read(seq, netFn, lun, cmd, data);
std::shared_ptr<sdbusplus::asio::connection> bus = getSdBus();
auto ctx = std::make_shared<ipmi::Context>(
- bus, netFn, cmd, 0, 0, ipmi::Privilege::Admin, 0, &yield);
+ bus, netFn, cmd, 0, 0, ipmi::Privilege::Admin, 0, yield);
auto request = std::make_shared<ipmi::message::Request>(
ctx, std::forward<std::vector<uint8_t>>(data));
ipmi::message::Response::ptr response =