From 2b081980e08101af19b62805bc43f109053613f6 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 20 Nov 2007 15:30:44 +0100 Subject: [PATCH] probe-net-bluetooth: get property from env instead of asking hald Get property from environment instead of asking hald. --- hald/linux/probing/probe-net-bluetooth.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/hald/linux/probing/probe-net-bluetooth.c b/hald/linux/probing/probe-net-bluetooth.c index 854e8e7..69ddb0a 100644 --- a/hald/linux/probing/probe-net-bluetooth.c +++ b/hald/linux/probing/probe-net-bluetooth.c @@ -147,16 +147,13 @@ main (int argc, char *argv[]) if (udi == NULL) goto out; - dbus_error_init (&error); - if ((ctx = libhal_ctx_init_direct (&error)) == NULL) + iface = getenv ("HAL_PROP_NET_INTERFACE"); + if (iface == NULL) goto out; - iface = libhal_device_get_property_string (ctx, udi, "net.interface", NULL); - HAL_INFO (("Investigating '%s'", iface)); - if (iface == NULL) - goto out; + dbus_error_init (&error); if ((conn = dbus_bus_get (DBUS_BUS_SYSTEM, &error)) == NULL) goto out; @@ -216,6 +213,10 @@ main (int argc, char *argv[]) goto out; } + ctx = libhal_ctx_init_direct (&error); + if (ctx == NULL) + goto out; + get_properties (conn, ctx, udi, id, connection); out: -- 1.5.3.7