3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-26 09:32:34 +01:00

wiphy: add network_emit_removed

This commit is contained in:
Denis Kenzior 2014-10-30 00:09:29 -05:00
parent 0d59e91a2b
commit 5b2e34b5b6

View File

@ -163,6 +163,24 @@ static void network_emit_added(struct network *network)
l_dbus_send(dbus, signal);
}
static void network_emit_removed(struct network *network)
{
struct l_dbus *dbus = dbus_get_bus();
struct l_dbus_message *signal;
signal = l_dbus_message_new_signal(dbus,
iwd_device_get_path(network->netdev),
IWD_DEVICE_INTERFACE,
"NetworkRemoved");
if (!signal)
return;
l_dbus_message_set_arguments(signal, "o",
iwd_network_get_path(network));
l_dbus_send(dbus, signal);
}
static void network_free(void *data)
{
struct network *network = data;
@ -171,6 +189,7 @@ static void network_free(void *data)
dbus = dbus_get_bus();
l_dbus_unregister_interface(dbus, iwd_network_get_path(network),
IWD_NETWORK_INTERFACE);
network_emit_removed(network);
l_free(network);
}