From c589c1a252a8bfbec0e89c955aa20df9723a3bd1 Mon Sep 17 00:00:00 2001 From: Murray Cumming Date: Wed, 20 Jun 2007 10:10:19 +0000 Subject: [PATCH] 2007-06-20 Murray Cumming * libmodest-dbus-client/libmodest-dbus-client.h: Document the folder struct item. * src/dbus_api/modest-dbus-callbacks.c: (find_message_by_url): Better debug message when the folder cannot be found. This should help with fixing projects.maemo.org bug #61287. * src/modest-search.c: (add_hit): Do not leak the furl string. pmo-trunk-r2329 --- ChangeLog2 | 13 +++++++++++-- libmodest-dbus-client/libmodest-dbus-client.h | 4 ++-- src/dbus_api/modest-dbus-callbacks.c | 3 ++- src/modest-search.c | 3 ++- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/ChangeLog2 b/ChangeLog2 index 7a04d2d..f740d3f 100644 --- a/ChangeLog2 +++ b/ChangeLog2 @@ -1,4 +1,13 @@ -2007-06-20 Murray Cumming +2007-06-20 Murray Cumming + + * libmodest-dbus-client/libmodest-dbus-client.h: Document the folder + struct item. + * src/dbus_api/modest-dbus-callbacks.c: (find_message_by_url): + Better debug message when the folder cannot be found. + This should help with fixing projects.maemo.org bug #61287. + * src/modest-search.c: (add_hit): Do not leak the furl string. + +2007-06-20 Murray Cumming * src/modest-ui-actions.c: (modest_ui_actions_on_folder_selection_changed): @@ -7,7 +16,7 @@ projects.maemo.org bug NB#60955 (The smtp connections dialog was not shown when the Outbox was selected). -2007-06-19 Murray Cumming,,, +2007-06-19 Murray Cumming,,, * libmodest-dbus-client/libmodest-dbus-client.c: (_dbus_iter_get_string_or_null): Initialize the string variable in diff --git a/libmodest-dbus-client/libmodest-dbus-client.h b/libmodest-dbus-client/libmodest-dbus-client.h index cb7609e..7b7bdc6 100644 --- a/libmodest-dbus-client/libmodest-dbus-client.h +++ b/libmodest-dbus-client/libmodest-dbus-client.h @@ -70,9 +70,9 @@ typedef enum { typedef struct { - gchar *msgid; + gchar *msgid; /* E.g. the URI of the message. */ gchar *subject; - gchar *folder; + gchar *folder; /* The name, not the URI. */ gchar *sender; guint64 msize; gboolean has_attachment; diff --git a/src/dbus_api/modest-dbus-callbacks.c b/src/dbus_api/modest-dbus-callbacks.c index d10cb96..4ce7f3a 100644 --- a/src/dbus_api/modest-dbus-callbacks.c +++ b/src/dbus_api/modest-dbus-callbacks.c @@ -567,7 +567,8 @@ find_message_by_url (const char *uri, TnyAccount **ac_out) &err); if (folder == NULL) { - g_debug ("%s: tny_store_account_find_folder() failed.\n", __FUNCTION__); + g_debug ("%s: tny_store_account_find_folder() failed\naccount=%s, uri=%s.\n", __FUNCTION__, + tny_account_get_id (TNY_ACCOUNT(account)), uri); goto out; } g_debug ("%s: Found folder. (%s)\n", __FUNCTION__, uri); diff --git a/src/modest-search.c b/src/modest-search.c index f5b7186..eb0fca2 100644 --- a/src/modest-search.c +++ b/src/modest-search.c @@ -80,6 +80,7 @@ add_hit (GList *list, TnyHeader *header, TnyFolder *folder) hit = g_slice_new0 (ModestSearchHit); furl = tny_folder_get_url_string (folder); + printf ("DEBUG: %s: folder URL=%s\n", __FUNCTION__, furl); if (!furl) { g_warning ("%s: tny_folder_get_url_string(): returned NULL for folder. Folder name=%s\n", __FUNCTION__, tny_folder_get_name (folder)); } @@ -94,6 +95,7 @@ add_hit (GList *list, TnyHeader *header, TnyFolder *folder) } msg_url = g_strdup_printf ("%s/%s", furl, uid); + g_free (furl); subject = tny_header_get_subject (header); sender = tny_header_get_from (header); @@ -104,7 +106,6 @@ add_hit (GList *list, TnyHeader *header, TnyFolder *folder) hit->subject = g_strdup_or_null (subject); hit->sender = g_strdup_or_null (sender); hit->folder = g_strdup_or_null (tny_folder_get_name (folder)); - //furl; /* We just provide our new instance instead of copying it and freeing it. */ hit->msize = tny_header_get_message_size (header); hit->has_attachment = flags & TNY_HEADER_FLAG_ATTACHMENTS; hit->is_unread = ! (flags & TNY_HEADER_FLAG_SEEN); -- 1.7.9.5