[libgdata] [core] Fix ETag returns for async queries
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] [core] Fix ETag returns for async queries
- Date: Thu, 8 Apr 2010 20:54:10 +0000 (UTC)
commit e4ebb13a83cd9d2747ac8eedfd3b43997d6e48f0
Author: Philip Withnall <philip tecnocode co uk>
Date: Thu Apr 8 21:53:23 2010 +0100
[core] Fix ETag returns for async queries
If an async query had an ETag match, a NULL feed was returned, but the
async query code didn't handle this properly.
gdata/gdata-service.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gdata/gdata-service.c b/gdata/gdata-service.c
index 3188544..69ea0dc 100644
--- a/gdata/gdata-service.c
+++ b/gdata/gdata-service.c
@@ -920,7 +920,7 @@ query_thread (GSimpleAsyncResult *result, GDataService *service, GCancellable *c
/* Execute the query and return */
data->feed = gdata_service_query (service, data->feed_uri, data->query, data->entry_type, cancellable,
data->progress_callback, data->progress_user_data, &error);
- if (data->feed == NULL) {
+ if (data->feed == NULL && error != NULL) {
g_simple_async_result_set_from_error (result, error);
g_error_free (error);
}
@@ -999,8 +999,7 @@ gdata_service_query_finish (GDataService *self, GAsyncResult *async_result, GErr
data = g_simple_async_result_get_op_res_gpointer (result);
if (data->feed != NULL)
return g_object_ref (data->feed);
-
- g_assert_not_reached ();
+ return NULL;
}
/* Does the bulk of the work of gdata_service_query. Split out because certain queries (such as that done by
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]