mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 06:29:23 +01:00
wired: Return bus connection object via ready and shutdown callbacks
This commit is contained in:
parent
975e3714b8
commit
a924de37c3
@ -51,7 +51,7 @@ static void request_name_callback(struct l_dbus *dbus, bool success,
|
||||
l_warn("Unable to register ObjectManager interface");
|
||||
|
||||
if (info->ready_func)
|
||||
info->ready_func(info->user_data);
|
||||
info->ready_func(dbus, info->user_data);
|
||||
}
|
||||
|
||||
static void dbus_ready(void *user_data)
|
||||
@ -111,7 +111,7 @@ int dbus_run(enum l_dbus_bus bus, const char *name,
|
||||
exit_status = l_main_run_with_signal(dbus_signal_handler, info);
|
||||
|
||||
if (shutdown_func)
|
||||
shutdown_func(info->user_data);
|
||||
shutdown_func(dbus, info->user_data);
|
||||
|
||||
l_dbus_destroy(dbus);
|
||||
dbus = NULL;
|
||||
|
@ -21,9 +21,10 @@
|
||||
*/
|
||||
|
||||
enum l_dbus_bus;
|
||||
struct l_dbus;
|
||||
|
||||
typedef void (*dbus_ready_func_t) (void *user_data);
|
||||
typedef void (*dbus_shutdown_func_t) (void *user_data);
|
||||
typedef void (*dbus_ready_func_t) (struct l_dbus *dbus, void *user_data);
|
||||
typedef void (*dbus_shutdown_func_t) (struct l_dbus *dbus, void *user_data);
|
||||
|
||||
typedef void (*dbus_destroy_func_t) (void *user_data);
|
||||
|
||||
|
@ -40,7 +40,7 @@ struct main_opts {
|
||||
const char *nointerfaces;
|
||||
};
|
||||
|
||||
static void dbus_ready(void *user_data)
|
||||
static void dbus_ready(struct l_dbus *dbus, void *user_data)
|
||||
{
|
||||
struct main_opts *opts = user_data;
|
||||
|
||||
@ -51,7 +51,7 @@ static void dbus_ready(void *user_data)
|
||||
ethdev_init(opts->interfaces, opts->nointerfaces);
|
||||
}
|
||||
|
||||
static void dbus_shutdown(void *user_data)
|
||||
static void dbus_shutdown(struct l_dbus *dbus, void *user_data)
|
||||
{
|
||||
l_info("System shutdown");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user