summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2005-03-31 21:55:25 +0000
committerDan Williams <dcbw@redhat.com>2005-03-31 21:55:25 +0000
commit40bf85ca099a338d3008184cc96adb4b7515acf5 (patch)
treeae449dde158154d06de92440064ac5a58196709f
parent5ea536fa1454eb6ab78cc5932463c484425ba3ce (diff)
downloadNetworkManager-40bf85ca099a338d3008184cc96adb4b7515acf5.tar.gz
2005-03-31 Dan Williams <dcbw@redhat.com>
* panel-applet/NMWirelessAppletDbus.c - Fix device names now that hal has changed device parenting for network devices. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@536 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
-rw-r--r--ChangeLog6
-rw-r--r--panel-applet/NMWirelessAppletDbus.c36
2 files changed, 10 insertions, 32 deletions
diff --git a/ChangeLog b/ChangeLog
index 8c9e607b65..97090d6758 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2005-03-31 Dan Williams <dcbw@redhat.com>
+ * panel-applet/NMWirelessAppletDbus.c
+ - Fix device names now that hal has changed device parenting for
+ network devices.
+
+2005-03-31 Dan Williams <dcbw@redhat.com>
+
Tighten up handling of wireless devices that don't support wireless
scanning (ie, Orinoco). Due to restructuring of code, these devices
hadn't been doing pseudo-scanning for a while either and would just
diff --git a/panel-applet/NMWirelessAppletDbus.c b/panel-applet/NMWirelessAppletDbus.c
index ac3bd139a5..e785e873c2 100644
--- a/panel-applet/NMWirelessAppletDbus.c
+++ b/panel-applet/NMWirelessAppletDbus.c
@@ -628,7 +628,6 @@ static char *nmwa_dbus_get_hal_device_string_property (DBusConnection *connectio
dbus_error_free (&error);
return (NULL);
}
-
if (reply == NULL)
{
fprintf (stderr, "nmwa_dbus_get_hal_device_string_property(): dbus reply message was NULL\n" );
@@ -640,7 +639,6 @@ static char *nmwa_dbus_get_hal_device_string_property (DBusConnection *connectio
{
if (dbus_error_is_set (&error))
dbus_error_free (&error);
- dbus_property = NULL;
}
else
property = g_strdup (dbus_property);
@@ -662,43 +660,17 @@ static char *nmwa_dbus_get_hal_device_info (DBusConnection *connection, const ch
DBusMessage *message;
DBusMessage *reply;
gboolean exists = FALSE;
+ char *parent = NULL;
char *info = NULL;
- const char *product;
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (udi != NULL, NULL);
- message = dbus_message_new_method_call ("org.freedesktop.Hal", udi, "org.freedesktop.Hal.Device", "PropertyExists");
- if (!message)
- return (NULL);
-
- dbus_error_init (&error);
- product = "info.product";
- dbus_message_append_args (message, DBUS_TYPE_STRING, &product, DBUS_TYPE_INVALID);
- reply = dbus_connection_send_with_reply_and_block (connection, message, -1, &error);
- dbus_message_unref (message);
- if (dbus_error_is_set (&error))
+ if ((parent = nmwa_dbus_get_hal_device_string_property (connection, udi, "info.parent")))
{
- fprintf (stderr, "nmwa_dbus_get_hal_device_info(): %s raised:\n %s\n\n", error.name, error.message);
- dbus_error_free (&error);
- return (NULL);
+ info = nmwa_dbus_get_hal_device_string_property (connection, parent, "info.product");
+ g_free (parent);
}
-
- if (reply == NULL)
- {
- fprintf (stderr, "nmwa_dbus_get_hal_device_info(): dbus reply message was NULL\n" );
- return (NULL);
- }
-
- dbus_error_init (&error);
- if (dbus_message_get_args (reply, &error, DBUS_TYPE_BOOLEAN, &exists, DBUS_TYPE_INVALID))
- {
- if (dbus_error_is_set (&error))
- dbus_error_free (&error);
- info = nmwa_dbus_get_hal_device_string_property (connection, udi, "info.product");
- }
-
- dbus_message_unref (reply);
return (info);
}