summaryrefslogtreecommitdiff
path: root/community/synce-odccm/dbus-error-fix.patch
blob: 28af59372f21f4c7ba0151031c4f25e3651a337d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
diff -wbBur odccm-0.13/src/odccm-device-manager.c odccm-0.13.my/src/odccm-device-manager.c
--- odccm-0.13/src/odccm-device-manager.c	2007-11-21 20:00:26.000000000 +0000
+++ odccm-0.13.my/src/odccm-device-manager.c	2010-07-12 10:49:26.000000000 +0000
@@ -485,9 +485,9 @@
   int result = 0;
 
   DBusError error;
-  dbus_error_init (&error);
 
   /* Be sure it is a network interface */
+  dbus_error_init (&error);
   gchar *ifname = libhal_device_get_property_string (ctx, udi, "net.interface",
       &error);
   if (ifname == NULL) goto DONE;
@@ -495,11 +495,13 @@
   libhal_free_string (ifname);
 
   /* We'll then check some properties of its parent */
+  dbus_error_init (&error);
   gchar *parentname = libhal_device_get_property_string (ctx, udi,
       "info.parent", &error);
   if (parentname == NULL) goto DONE;
 
   /* Check the parent's device driver name (for usb-rndis-lite) */
+  dbus_error_init (&error);
   gchar *drvname = libhal_device_get_property_string (ctx, parentname,
       "info.linux.driver", &error);
   if (drvname != NULL)
@@ -509,6 +511,7 @@
     }
 
   /* Check pda.platform property (for usb-rndis-ng) */
+  dbus_error_init (&error);
   gchar *pdaplatform = libhal_device_get_property_string (ctx, parentname,
       "pda.platform", &error);
   if (pdaplatform != NULL)
@@ -626,6 +628,7 @@
   if (!libhal_ctx_set_dbus_connection (priv->hal_ctx, conn))
     goto OUT;
 
+  dbus_error_init (&error);
   if (!libhal_ctx_init (priv->hal_ctx, &error))
     {
       func_name = "libhal_ctx_init";