async: context: add implicit conversion to bus_t
Many existing sdbusplus library calls expect a `bus_t`. Add an
implicit conversion to `bus_t&` so that a `context_t&` can be passed
into any function that formerly accepted a `bus_t&`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I791bf88d86ba5761a4d2fa9bf811b6e794b097af
diff --git a/src/async/match.cpp b/src/async/match.cpp
index ed5237b..7dceba4 100644
--- a/src/async/match.cpp
+++ b/src/async/match.cpp
@@ -13,8 +13,8 @@
};
sd_bus_slot* s;
- auto r = sd_bus_add_match(get_busp(ctx.get_bus()), &s, pattern.data(),
- match_cb, this);
+ auto r = sd_bus_add_match(get_busp(ctx), &s, pattern.data(), match_cb,
+ this);
if (r < 0)
{
throw exception::SdBusError(-r, "sd_bus_add_match (async::match)");