Magellan Linux

Annotation of /trunk/hal/patches/hal-0.5.10-probe-net-bluetooth-get-property-from-env-instead-o.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 597 - (hide annotations) (download)
Mon May 19 19:05:19 2008 UTC (16 years, 1 month ago) by niro
File size: 1366 byte(s)
-gentoo patches

1 niro 597 From 2b081980e08101af19b62805bc43f109053613f6 Mon Sep 17 00:00:00 2001
2     From: Guillem Jover <guillem.jover@nokia.com>
3     Date: Tue, 20 Nov 2007 15:30:44 +0100
4     Subject: [PATCH] probe-net-bluetooth: get property from env instead of asking hald
5    
6     Get property from environment instead of asking hald.
7     ---
8     hald/linux/probing/probe-net-bluetooth.c | 13 +++++++------
9     1 files changed, 7 insertions(+), 6 deletions(-)
10    
11     diff --git a/hald/linux/probing/probe-net-bluetooth.c b/hald/linux/probing/probe-net-bluetooth.c
12     index 854e8e7..69ddb0a 100644
13     --- a/hald/linux/probing/probe-net-bluetooth.c
14     +++ b/hald/linux/probing/probe-net-bluetooth.c
15     @@ -147,16 +147,13 @@ main (int argc, char *argv[])
16     if (udi == NULL)
17     goto out;
18    
19     - dbus_error_init (&error);
20     - if ((ctx = libhal_ctx_init_direct (&error)) == NULL)
21     + iface = getenv ("HAL_PROP_NET_INTERFACE");
22     + if (iface == NULL)
23     goto out;
24    
25     - iface = libhal_device_get_property_string (ctx, udi, "net.interface", NULL);
26     -
27     HAL_INFO (("Investigating '%s'", iface));
28    
29     - if (iface == NULL)
30     - goto out;
31     + dbus_error_init (&error);
32    
33     if ((conn = dbus_bus_get (DBUS_BUS_SYSTEM, &error)) == NULL)
34     goto out;
35     @@ -216,6 +213,10 @@ main (int argc, char *argv[])
36     goto out;
37     }
38    
39     + ctx = libhal_ctx_init_direct (&error);
40     + if (ctx == NULL)
41     + goto out;
42     +
43     get_properties (conn, ctx, udi, id, connection);
44    
45     out:
46     --
47     1.5.3.7
48