rpms/NetworkManager-vpnc/F-8 NetworkManager-vpnc-0.7.0-pcfimport.patch, NONE, 1.1
Denis Leroy (denis)
fedora-extras-commits at redhat.com
Wed Nov 21 14:26:10 UTC 2007
- Previous message (by thread): rpms/sgml-common/devel sgml-common-automake.patch, 1.2, 1.3 sgml-common.spec, 1.17, 1.18
- Next message (by thread): rpms/audacious-plugins/devel .cvsignore, 1.8, 1.9 audacious-plugins.spec, 1.18, 1.19 sources, 1.8, 1.9
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: denis
Update of /cvs/pkgs/rpms/NetworkManager-vpnc/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13708
Added Files:
NetworkManager-vpnc-0.7.0-pcfimport.patch
Log Message:
Patch to relax PCF import code (#241774)
NetworkManager-vpnc-0.7.0-pcfimport.patch:
--- NEW FILE NetworkManager-vpnc-0.7.0-pcfimport.patch ---
--- NetworkManager-vpnc-0.7.0/properties/nm-vpnc.c.orig 2007-11-21 14:40:57.000000000 +0100
+++ NetworkManager-vpnc-0.7.0/properties/nm-vpnc.c 2007-11-21 15:20:11.000000000 +0100
@@ -589,26 +589,30 @@
const char *buf;
gboolean have_value;
char *basename = NULL;
- gboolean success = FALSE;
+ gboolean complete = TRUE;
+ GtkWidget *dialog;
pcf = pcf_file_load (path);
if (pcf == NULL)
- return FALSE;
+ goto error;
/* Connection name */
- if ((buf = pcf_file_lookup_value (pcf, "main", "Description")) == NULL || strlen (buf) < 1)
- goto error;
- gtk_entry_set_text (impl->w_connection_name, buf);
+ if ((buf = pcf_file_lookup_value (pcf, "main", "Description")))
+ gtk_entry_set_text (impl->w_connection_name, buf);
+ else
+ complete = FALSE;
/* Gateway */
- if ((buf = pcf_file_lookup_value (pcf, "main", "Host")) == NULL || strlen (buf) < 1)
- goto error;
- gtk_entry_set_text (impl->w_gateway, buf);
+ if ((buf = pcf_file_lookup_value (pcf, "main", "Host")))
+ gtk_entry_set_text (impl->w_gateway, buf);
+ else
+ complete = FALSE;
/* Group name */
- if ((buf = pcf_file_lookup_value (pcf, "main", "GroupName")) == NULL || strlen (buf) < 1)
- goto error;
- gtk_entry_set_text (impl->w_group_name, buf);
+ if ((buf = pcf_file_lookup_value (pcf, "main", "GroupName")))
+ gtk_entry_set_text (impl->w_group_name, buf);
+ else
+ complete = FALSE;
/* Optional settings */
@@ -665,13 +669,9 @@
if (connection)
impl_fill_connection (self, connection);
- success = TRUE;
-
- error:
g_hash_table_destroy (pcf);
- if (!success) {
- GtkWidget *dialog;
+ if (!complete) {
if (!basename)
basename = g_path_get_basename (path);
@@ -680,16 +680,36 @@
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_WARNING,
GTK_BUTTONS_CLOSE,
- _("Cannot import settings"));
+ _("Settings import incomplete"));
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
- _("The VPN settings file '%s' does not contain valid data."), basename);
+ _("The VPN settings file '%s' is incomplete. You may not be able to connect without providing further information."), basename);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
+ } else {
+
}
- g_free (basename);
+ if (basename)
+ g_free (basename);
+
+ return TRUE;
- return success;
+error:
+ if (!basename)
+ basename = g_path_get_basename (path);
+
+ dialog = gtk_message_dialog_new (NULL,
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ _("Cannot import settings"));
+ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
+ _("The VPN settings file '%s' could not be read or is invalid."),
+ basename);
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
+ g_free (basename);
+ return FALSE;
}
static void
- Previous message (by thread): rpms/sgml-common/devel sgml-common-automake.patch, 1.2, 1.3 sgml-common.spec, 1.17, 1.18
- Next message (by thread): rpms/audacious-plugins/devel .cvsignore, 1.8, 1.9 audacious-plugins.spec, 1.18, 1.19 sources, 1.8, 1.9
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list