network-manager-applet r662 - in trunk: . src
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: network-manager-applet r662 - in trunk: . src
- Date: Thu, 10 Apr 2008 04:12:48 +0100 (BST)
Author: dcbw
Date: Thu Apr 10 04:12:48 2008
New Revision: 662
URL: http://svn.gnome.org/viewvc/network-manager-applet?rev=662&view=rev
Log:
2008-04-09 Dan Williams <dcbw redhat com>
* src/vpn-password-dialog.c
src/vpn-password-dialog.h
- (nma_vpn_request_password): pass the VPN connection ID to the auth
dialog too because that's needed to get keyring items in some cases
* src/applet.c
- (applet_settings_new_secrets_requested_cb): pass the exported
connection so that the connection's ID can be found
Modified:
trunk/ChangeLog
trunk/src/applet.c
trunk/src/vpn-password-dialog.c
trunk/src/vpn-password-dialog.h
Modified: trunk/src/applet.c
==============================================================================
--- trunk/src/applet.c (original)
+++ trunk/src/applet.c Thu Apr 10 04:12:48 2008
@@ -1700,7 +1700,7 @@
/* VPN secrets get handled a bit differently */
if (!strcmp (s_con->type, NM_SETTING_VPN_SETTING_NAME)) {
- nma_vpn_request_password (connection, setting_name, ask_user, context);
+ nma_vpn_request_password (NM_EXPORTED_CONNECTION (exported), setting_name, ask_user, context);
return;
}
Modified: trunk/src/vpn-password-dialog.c
==============================================================================
--- trunk/src/vpn-password-dialog.c (original)
+++ trunk/src/vpn-password-dialog.c Thu Apr 10 04:12:48 2008
@@ -156,12 +156,13 @@
}
gboolean
-nma_vpn_request_password (NMConnection *connection,
+nma_vpn_request_password (NMExportedConnection *exported,
const char *setting_name,
gboolean retry,
DBusGMethodInvocation *context)
{
const char *argv[] = { NULL /*"/usr/libexec/nm-vpnc-auth-dialog"*/,
+ "-i", NULL /*"1"*/,
"-n", NULL /*"davidznet42"*/,
"-s", NULL /*"org.freedesktop.vpnc"*/,
"-r",
@@ -179,9 +180,11 @@
NMSettingVPN *s_vpn;
gboolean success = FALSE;
GError *error = NULL;
+ NMConnection *connection;
- g_return_val_if_fail (NM_IS_CONNECTION (connection), FALSE);
+ g_return_val_if_fail (NM_IS_EXPORTED_CONNECTION (exported), FALSE);
+ connection = nm_exported_connection_get_connection (exported);
s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
g_return_val_if_fail (s_con != NULL, FALSE);
g_return_val_if_fail (s_con->id != NULL, FALSE);
@@ -203,10 +206,11 @@
/* Fix up parameters with what we got */
argv[0] = auth_dialog_binary;
- argv[2] = s_con->id;
- argv[4] = s_vpn->service_type;
+ argv[2] = nm_exported_connection_get_id (exported);
+ argv[4] = s_con->id;
+ argv[6] = s_vpn->service_type;
if (!retry)
- argv[5] = NULL;
+ argv[7] = NULL;
child_status = -1;
Modified: trunk/src/vpn-password-dialog.h
==============================================================================
--- trunk/src/vpn-password-dialog.h (original)
+++ trunk/src/vpn-password-dialog.h Thu Apr 10 04:12:48 2008
@@ -23,10 +23,10 @@
#define VPN_PASSWORD_DIALOG_H
#include <glib.h>
-#include <nm-connection.h>
#include <dbus/dbus-glib.h>
+#include <nm-settings.h>
-gboolean nma_vpn_request_password (NMConnection *connection,
+gboolean nma_vpn_request_password (NMExportedConnection *exported,
const char *setting_name,
gboolean retry,
DBusGMethodInvocation *context);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]