mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 10:32:33 +01:00
client: Proxy interface destruction logic
This commit is contained in:
parent
0d7d5a427d
commit
a21db05517
@ -171,6 +171,20 @@ static void proxy_interface_create(const char *path,
|
|||||||
proxy_interface_bind_dependencies(path);
|
proxy_interface_bind_dependencies(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void proxy_interface_destroy(void *data)
|
||||||
|
{
|
||||||
|
struct proxy_interface *proxy = data;
|
||||||
|
|
||||||
|
l_free(proxy->path);
|
||||||
|
|
||||||
|
if (proxy->type->ops->destroy)
|
||||||
|
proxy->type->ops->destroy(proxy->data);
|
||||||
|
|
||||||
|
proxy->type = NULL;
|
||||||
|
|
||||||
|
l_free(proxy);
|
||||||
|
}
|
||||||
|
|
||||||
static void interfaces_added_callback(struct l_dbus_message *message,
|
static void interfaces_added_callback(struct l_dbus_message *message,
|
||||||
void *user_data)
|
void *user_data)
|
||||||
{
|
{
|
||||||
@ -252,6 +266,9 @@ static void service_appeared_callback(struct l_dbus *dbus, void *user_data)
|
|||||||
static void service_disappeared_callback(struct l_dbus *dbus,
|
static void service_disappeared_callback(struct l_dbus *dbus,
|
||||||
void *user_data)
|
void *user_data)
|
||||||
{
|
{
|
||||||
|
l_queue_clear(proxy_interfaces, proxy_interface_destroy);
|
||||||
|
|
||||||
|
display_disable_cmd_prompt();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dbus_disconnect_callback(void *user_data)
|
static void dbus_disconnect_callback(void *user_data)
|
||||||
@ -259,10 +276,6 @@ static void dbus_disconnect_callback(void *user_data)
|
|||||||
l_main_quit();
|
l_main_quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void proxy_interface_destroy(void *data)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool dbus_proxy_init(void)
|
bool dbus_proxy_init(void)
|
||||||
{
|
{
|
||||||
if (dbus)
|
if (dbus)
|
||||||
|
@ -24,6 +24,7 @@ struct proxy_interface;
|
|||||||
|
|
||||||
struct proxy_interface_type_ops {
|
struct proxy_interface_type_ops {
|
||||||
void *(*create)(void);
|
void *(*create)(void);
|
||||||
|
void (*destroy)(void *data);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct proxy_interface_type {
|
struct proxy_interface_type {
|
||||||
|
Loading…
Reference in New Issue
Block a user