mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-29 05:39:24 +01:00
network: Move network_emit_removed to network.c
This commit is contained in:
parent
5dc3a892db
commit
49df40fdff
@ -254,6 +254,23 @@ void network_emit_added(struct network *network)
|
||||
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()
|
||||
{
|
||||
networks = l_queue_new();
|
||||
|
@ -50,6 +50,7 @@ const char *network_get_path(struct network *network);
|
||||
enum security network_get_security(struct network *network);
|
||||
|
||||
void network_emit_added(struct network *network);
|
||||
void network_emit_removed(struct network *network);
|
||||
|
||||
void network_init();
|
||||
void network_exit();
|
||||
|
17
src/wiphy.c
17
src/wiphy.c
@ -509,23 +509,6 @@ static void setup_network_interface(struct l_dbus_interface *interface)
|
||||
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)
|
||||
{
|
||||
struct scan_bss *bss = data;
|
||||
|
Loading…
Reference in New Issue
Block a user