mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-03 20:40:34 +01:00
2006-01-08 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h - Add NMI_DBUS_USER_KEY_CANCELED_ERROR as a constant for applet/info-daemons * gnome/applet/passphrase-dialog.c - Use the constant. Fixes a bug where the arguments to dbus_message_new_error() were incorrect * src/nm-dbus-nmi.c - Use the constant git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1289 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
e4aaefce40
commit
2fa716d42d
3 changed files with 11 additions and 4 deletions
|
|
@ -148,7 +148,7 @@ nmi_passphrase_dialog_response_received (GtkWidget *dialog,
|
|||
{
|
||||
DBusMessage * reply;
|
||||
|
||||
reply = dbus_message_new_error (message, "CanceledError", "Request was cancelled.");
|
||||
reply = dbus_message_new_error (message, NMI_DBUS_USER_KEY_CANCELED_ERROR, "Request was cancelled.");
|
||||
dbus_connection_send (applet->connection, reply, NULL);
|
||||
goto out;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@
|
|||
#define NM_DBUS_NO_ACTIVE_DEVICE_ERROR "org.freedesktop.NetworkManager.NoActiveDevice"
|
||||
#define NM_DBUS_NO_ACTIVE_NET_ERROR "org.freedesktop.NetworkManager.NoActiveNetwork"
|
||||
|
||||
#define NMI_DBUS_USER_KEY_CANCELED_ERROR "org.freedesktop.NetworkManagerInfo.CanceledError"
|
||||
|
||||
|
||||
/*
|
||||
* NetworkManager signals
|
||||
|
|
|
|||
|
|
@ -59,8 +59,6 @@ static void nm_dbus_get_user_key_for_network_cb (DBusPendingCall *pcall, NMActRe
|
|||
|
||||
dbus_pending_call_ref (pcall);
|
||||
|
||||
nm_info ("Activation (%s) New wireless user key for network '%s' received.", nm_device_get_iface (dev), nm_ap_get_essid (ap));
|
||||
|
||||
if (!dbus_pending_call_get_completed (pcall))
|
||||
goto out;
|
||||
|
||||
|
|
@ -75,7 +73,12 @@ static void nm_dbus_get_user_key_for_network_cb (DBusPendingCall *pcall, NMActRe
|
|||
dbus_set_error_from_message (&err, reply);
|
||||
|
||||
/* Check for cancelled error */
|
||||
if (strcmp (err.name, "CanceledError") != 0)
|
||||
if (strcmp (err.name, NMI_DBUS_USER_KEY_CANCELED_ERROR) == 0)
|
||||
{
|
||||
nm_info ("Activation (%s) New wireless user key request for network '%s' was canceled.",
|
||||
nm_device_get_iface (dev), nm_ap_get_essid (ap));
|
||||
}
|
||||
else
|
||||
nm_warning ("nm_dbus_get_user_key_for_network_cb(): dbus returned an error.\n (%s) %s\n", err.name, err.message);
|
||||
|
||||
dbus_error_free (&err);
|
||||
|
|
@ -93,6 +96,8 @@ static void nm_dbus_get_user_key_for_network_cb (DBusPendingCall *pcall, NMActRe
|
|||
goto out;
|
||||
}
|
||||
|
||||
nm_info ("Activation (%s) New wireless user key for network '%s' received.", nm_device_get_iface (dev), nm_ap_get_essid (ap));
|
||||
|
||||
dbus_message_iter_init (reply, &iter);
|
||||
if ((security = nm_ap_security_new_deserialize (&iter)))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue