[evolution-data-server] nntp: Fix two more 'returns FALSE on error' vs. 'returns 0 on success' errors
- From: David Woodhouse <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] nntp: Fix two more 'returns FALSE on error' vs. 'returns 0 on success' errors
- Date: Sun, 11 Jul 2010 10:59:42 +0000 (UTC)
commit ffcba2db913eeddded4b61d001d9b485a5e62b23
Author: David Woodhouse <David Woodhouse intel com>
Date: Sun Jul 11 11:56:32 2010 +0100
nntp: Fix two more 'returns FALSE on error' vs. 'returns 0 on success' errors
We really need to start being consistent about this.
Pass the GError pointer through to camel_folder_summary_save_to_db()
from nntp_folder_sync() too... although it seems to be NULL a lot of the
time anyway, but that's the fault of our caller. No need to compound it.
camel/providers/nntp/camel-nntp-folder.c | 3 +--
camel/providers/nntp/camel-nntp-store.c | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/camel/providers/nntp/camel-nntp-folder.c b/camel/providers/nntp/camel-nntp-folder.c
index bc01453..15edc20 100644
--- a/camel/providers/nntp/camel-nntp-folder.c
+++ b/camel/providers/nntp/camel-nntp-folder.c
@@ -160,8 +160,7 @@ nntp_folder_sync (CamelFolder *folder, GError **error)
g_ptr_array_free (changed, TRUE);
camel_folder_summary_touch (folder->summary);
}
- success = camel_folder_summary_save_to_db (folder->summary, NULL);
-
+ success = !camel_folder_summary_save_to_db (folder->summary, error);
camel_service_unlock (CAMEL_SERVICE (parent_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
return success;
diff --git a/camel/providers/nntp/camel-nntp-store.c b/camel/providers/nntp/camel-nntp-store.c
index 8c45f6d..62d569b 100644
--- a/camel/providers/nntp/camel-nntp-store.c
+++ b/camel/providers/nntp/camel-nntp-store.c
@@ -1498,7 +1498,7 @@ camel_nntp_command (CamelNNTPStore *store, GError **error, CamelNNTPFolder *fold
if (ret == 211) {
g_free(store->current_folder);
store->current_folder = g_strdup (full_name);
- if (!camel_nntp_folder_selected(folder, *line, &local_error)) {
+ if (camel_nntp_folder_selected(folder, *line, &local_error) < 0) {
ret = -1;
goto error;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]