mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 11:10:09 +01:00
shared: add nm_clear_g_dbus_connection_signal() helper
This commit is contained in:
parent
b9e2fcccf7
commit
f7fff62067
1 changed files with 17 additions and 0 deletions
|
|
@ -25,6 +25,23 @@
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
static inline gboolean
|
||||
nm_clear_g_dbus_connection_signal (GDBusConnection *dbus_connection,
|
||||
guint *id)
|
||||
{
|
||||
guint v;
|
||||
|
||||
if ( id
|
||||
&& (v = *id)) {
|
||||
*id = 0;
|
||||
g_dbus_connection_signal_unsubscribe (dbus_connection, v);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static inline guint
|
||||
nm_dbus_connection_signal_subscribe_name_owner_changed (GDBusConnection *dbus_connection,
|
||||
const char *service_name,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue