3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-29 13:59:24 +01:00

network: Move network_emit_removed to network.c

This commit is contained in:
Denis Kenzior 2016-05-12 09:52:52 -05:00
parent 5dc3a892db
commit 49df40fdff
3 changed files with 18 additions and 17 deletions

View File

@ -254,6 +254,23 @@ void network_emit_added(struct network *network)
l_dbus_send(dbus, signal); l_dbus_send(dbus, signal);
} }
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,
device_get_path(network->netdev),
IWD_DEVICE_INTERFACE,
"NetworkRemoved");
if (!signal)
return;
l_dbus_message_set_arguments(signal, "o", network->object_path);
l_dbus_send(dbus, signal);
}
void network_init() void network_init()
{ {
networks = l_queue_new(); networks = l_queue_new();

View File

@ -50,6 +50,7 @@ const char *network_get_path(struct network *network);
enum security network_get_security(struct network *network); enum security network_get_security(struct network *network);
void network_emit_added(struct network *network); void network_emit_added(struct network *network);
void network_emit_removed(struct network *network);
void network_init(); void network_init();
void network_exit(); void network_exit();

View File

@ -509,23 +509,6 @@ static void setup_network_interface(struct l_dbus_interface *interface)
NULL); NULL);
} }
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,
device_get_path(network->netdev),
IWD_DEVICE_INTERFACE,
"NetworkRemoved");
if (!signal)
return;
l_dbus_message_set_arguments(signal, "o", network->object_path);
l_dbus_send(dbus, signal);
}
static void bss_free(void *data) static void bss_free(void *data)
{ {
struct scan_bss *bss = data; struct scan_bss *bss = data;