[gnome-calendar/calendar-editor] source-dialog: take uri validation into account
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/calendar-editor] source-dialog: take uri validation into account
- Date: Thu, 26 Mar 2015 04:46:51 +0000 (UTC)
commit 3b9032d32ec8b08f6c4e71d9cdd14b47bb800e55
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Mar 26 01:45:35 2015 -0300
source-dialog: take uri validation into account
src/gcal-source-dialog.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
index c981802..7aac5f9 100644
--- a/src/gcal-source-dialog.c
+++ b/src/gcal-source-dialog.c
@@ -479,6 +479,7 @@ validate_url_cb (GcalSourceDialog *dialog)
ESourceWebdav *webdav;
ESource *source;
gchar *host, *path;
+ gboolean uri_valid;
priv->validate_url_resource_id = 0;
host = path = NULL;
@@ -491,11 +492,11 @@ validate_url_cb (GcalSourceDialog *dialog)
g_clear_pointer (&(priv->remote_source), g_object_unref);
// Get the hostname and file path from the server
- uri_get_fields (gtk_entry_get_text (GTK_ENTRY (priv->calendar_address_entry)), NULL, &host, &path);
+ uri_valid = uri_get_fields (gtk_entry_get_text (GTK_ENTRY (priv->calendar_address_entry)), NULL, &host,
&path);
g_debug ("[source-dialog] host: '%s', path: '%s'", host, path);
- if (path == NULL || host == NULL)
+ if (host == NULL || !uri_valid)
goto out;
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]