From 2d6babc3f8ad9a0a978849933cf35cfb62c2e250 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 23 Oct 2014 22:40:32 -0500 Subject: [PATCH] wiphy: Expose iwd_device_get_path --- src/wiphy.c | 8 ++++---- src/wiphy.h | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/wiphy.c b/src/wiphy.c index 668c28da..22874289 100644 --- a/src/wiphy.c +++ b/src/wiphy.c @@ -71,7 +71,7 @@ static void do_debug(const char *str, void *user_data) l_info("%s%s", prefix, str); } -static const char *device_get_path(struct netdev *netdev) +const char *iwd_device_get_path(struct netdev *netdev) { static char path[256]; @@ -131,7 +131,7 @@ static void device_emit_added(struct netdev *netdev) } l_dbus_message_builder_append_basic(builder, 'o', - device_get_path(netdev)); + iwd_device_get_path(netdev)); __iwd_device_append_properties(netdev, builder); l_dbus_message_builder_finalize(builder); @@ -151,7 +151,7 @@ static void device_emit_removed(struct netdev *netdev) if (!signal) return; - l_dbus_message_set_arguments(signal, "o", device_get_path(netdev)); + l_dbus_message_set_arguments(signal, "o", iwd_device_get_path(netdev)); l_dbus_send(dbus, signal); } @@ -223,7 +223,7 @@ static void netdev_free(void *data) struct l_dbus *dbus; dbus = dbus_get_bus(); - l_dbus_unregister_interface(dbus, device_get_path(netdev), + l_dbus_unregister_interface(dbus, iwd_device_get_path(netdev), IWD_DEVICE_INTERFACE); device_emit_removed(netdev); diff --git a/src/wiphy.h b/src/wiphy.h index 17e21d15..bad0179c 100644 --- a/src/wiphy.h +++ b/src/wiphy.h @@ -37,3 +37,4 @@ void wiphy_set_ssid(const char *ssid); bool __iwd_device_append_properties(struct netdev *netdev, struct l_dbus_message_builder *builder); void __iwd_device_foreach(iwd_device_foreach_func func, void *user_data); +const char *iwd_device_get_path(struct netdev *netdev);