mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
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:
parent
183270f53c
commit
708e5443ae
7 changed files with 33 additions and 58 deletions
|
|
@ -19,4 +19,14 @@ static inline void cancel_and_unref(DBusPendingCall **pp)
|
|||
}
|
||||
}
|
||||
|
||||
static inline DBusMessage *steal_reply_and_unref(DBusPendingCall **pp)
|
||||
{
|
||||
DBusPendingCall *pending_call = spa_steal_ptr(*pp);
|
||||
|
||||
DBusMessage *reply = dbus_pending_call_steal_reply(pending_call);
|
||||
dbus_pending_call_unref(pending_call);
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
#endif /* SPA_BLUEZ5_DBUS_HELPERS_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue