spa: bluez: add steal_reply_and_unref() helper

This function retrieves the reply from a DBusPendingCall and unrefs the call.
This commit is contained in:
Barnabás Pőcze 2023-07-11 17:10:37 +02:00
parent 183270f53c
commit 708e5443ae
7 changed files with 33 additions and 58 deletions

View file

@ -44,8 +44,7 @@ static void upower_get_percentage_properties_reply(DBusPendingCall *pending, voi
DBusMessage *r;
DBusMessageIter i, variant_i;
r = dbus_pending_call_steal_reply(pending);
dbus_pending_call_unref(pending);
r = steal_reply_and_unref(&pending);
if (r == NULL)
return;