[PATCH] get property from environment instead of asking hald

Guillem Jover guillem.jover at nokia.com
Mon Nov 5 16:16:39 PST 2007


---
 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.5



More information about the hal mailing list