evolution-data-server r9343 - in trunk/addressbook: . backends/google
- From: mfcn svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9343 - in trunk/addressbook: . backends/google
- Date: Wed, 13 Aug 2008 21:53:46 +0000 (UTC)
Author: mfcn
Date: Wed Aug 13 21:53:46 2008
New Revision: 9343
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9343&view=rev
Log:
* backends/google/google-book.c (google_book_construct_base_uri),
(google_book_finalize), (google_book_add_contact):
Always use non-ssl uri when adding entries to the feed; ssl does not seem
to work for adding (not sure whether this is libsoup's or google's servers
fault).
* backends/google/util.c (_gdata_entry_update_from_e_contact):
Fix a small leak
Modified:
trunk/addressbook/ChangeLog
trunk/addressbook/backends/google/google-book.c
trunk/addressbook/backends/google/util.c
Modified: trunk/addressbook/backends/google/google-book.c
==============================================================================
--- trunk/addressbook/backends/google/google-book.c (original)
+++ trunk/addressbook/backends/google/google-book.c Wed Aug 13 21:53:46 2008
@@ -81,6 +81,8 @@
GDataService *service;
guint refresh_interval;
char *base_uri;
+ /* FIXME - this one should not be needed */
+ char *add_base_uri;
gboolean live_mode;
@@ -448,15 +450,17 @@
GoogleBookPrivate *priv = GET_PRIVATE (book);
__debug__ (G_STRFUNC);
- if (priv->base_uri) {
- g_free (priv->base_uri);
- }
+ g_free (priv->base_uri);
+ g_free (priv->add_base_uri);
esc_username = g_uri_escape_string (priv->username, NULL, FALSE);
priv->base_uri = g_strdup_printf (format, use_ssl ? "https://" : "http://", esc_username);
+ /* FIXME - always use non ssl mode when adding entries. Somehow this does not
+ * work on SSL; i.e. get duplicate entries and SOUP returns error 7 - connection
+ * terminated unexpectedly
+ */
+ priv->add_base_uri = g_strdup_printf (format, "http://", esc_username);
g_free (esc_username);
-
- g_debug ("base_uri is now %s", priv->base_uri);
}
static void
@@ -540,6 +544,7 @@
GoogleBookPrivate *priv = GET_PRIVATE (object);
g_free (priv->base_uri);
+ g_free (priv->add_base_uri);
g_free (priv->username);
if (G_OBJECT_CLASS (google_book_parent_class)->finalize)
@@ -796,7 +801,7 @@
entry = _gdata_entry_new_from_e_contact (contact);
__debug__ ("new entry with xml: %s", gdata_entry_generate_xml (entry));
new_entry = gdata_service_insert_entry (GDATA_SERVICE (priv->service),
- priv->base_uri, entry, &soup_error);
+ priv->add_base_uri, entry, &soup_error);
g_object_unref (entry);
if (soup_error) {
google_book_error_from_soup_error (soup_error, error,
Modified: trunk/addressbook/backends/google/util.c
==============================================================================
--- trunk/addressbook/backends/google/util.c (original)
+++ trunk/addressbook/backends/google/util.c Wed Aug 13 21:53:46 2008
@@ -185,6 +185,7 @@
}
}
gdata_entry_set_title (entry, fullname);
+ g_free (fullname);
gdata_entry_set_email_addresses (entry, email_addresses);
gdata_entry_set_im_addresses (entry, im_addresses);
gdata_entry_set_phone_numbers (entry, phone_numbers);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]