[seahorse/gnome-3-4] Don't complete the hkp_source_export operation on an error



commit 41fc5c59d1a8a089e1e5853fb29b7ecd3578617d
Author: Debarshi Ray <debarshir gnome org>
Date:   Sun Mar 25 19:53:18 2012 +0200

    Don't complete the hkp_source_export operation on an error
    
    Occurence of an error does not mean that there are no more pending
    requests. So set the error but wait for the other requests to finish.
    
    Fixes: https://bugzilla.gnome.org/672814

 pgp/seahorse-hkp-source.c |   25 +++++++++++--------------
 1 files changed, 11 insertions(+), 14 deletions(-)
---
diff --git a/pgp/seahorse-hkp-source.c b/pgp/seahorse-hkp-source.c
index afd6cbd..f8ffacf 100644
--- a/pgp/seahorse-hkp-source.c
+++ b/pgp/seahorse-hkp-source.c
@@ -962,24 +962,21 @@ on_export_message_complete (SoupSession *session,
 
 	if (hkp_message_propagate_error (closure->source, message, &error)) {
 		g_simple_async_result_take_error (res, error);
-		g_simple_async_result_complete_in_idle (res);
-		g_object_unref (res);
-		return;
-	}
-
-	end = text = message->response_body->data;
-	len = message->response_body->length;
+	} else {
+		end = text = message->response_body->data;
+		len = message->response_body->length;
 
-	for (;;) {
+		for (;;) {
 
-		len -= end - text;
-		text = end;
+			len -= end - text;
+			text = end;
 
-		if (!detect_key (text, len, &start, &end))
-			break;
+			if (!detect_key (text, len, &start, &end))
+				break;
 
-		g_string_append_len (closure->data, start, end - start);
-		g_string_append_c (closure->data, '\n');
+			g_string_append_len (closure->data, start, end - start);
+			g_string_append_c (closure->data, '\n');
+		}
 	}
 
 	g_assert (closure->requests > 0);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]