[seahorse] More fixes for new async operation code.



commit bf8a2e217103b693aa475e0c09900b1c10eecfd8
Author: Stef Walter <stefw collabora co uk>
Date:   Fri Aug 19 07:06:11 2011 +0200

    More fixes for new async operation code.

 libseahorse/seahorse-util.c  |    4 ++--
 pgp/seahorse-gpgme.c         |    3 +--
 ssh/seahorse-ssh-operation.c |   11 ++++-------
 3 files changed, 7 insertions(+), 11 deletions(-)
---
diff --git a/libseahorse/seahorse-util.c b/libseahorse/seahorse-util.c
index 1cdae53..9d6a357 100644
--- a/libseahorse/seahorse-util.c
+++ b/libseahorse/seahorse-util.c
@@ -629,8 +629,8 @@ seahorse_util_detect_mime_type (const gchar *mime)
 	         g_ascii_strcasecmp (mime, "application/x-pem-key") == 0)
 		return SEAHORSE_SSH;
 #endif 
-    
-	g_warning ("unsupported type of key data: %s", mime);
+
+	g_message ("unsupported type of key data: %s", mime);
 	return 0;
 }
 
diff --git a/pgp/seahorse-gpgme.c b/pgp/seahorse-gpgme.c
index b2a7695..345d759 100644
--- a/pgp/seahorse-gpgme.c
+++ b/pgp/seahorse-gpgme.c
@@ -318,8 +318,8 @@ seahorse_gpgme_gsource_dispatch (GSource *gsource,
 		if (watch->registered && watch->poll_fd.revents) {
 			seahorse_debug ("GPGME OP: io for GPGME on %d", watch->poll_fd.fd);
 			g_assert (watch->fnc);
-			(watch->fnc) (watch->fnc_data, watch->poll_fd.fd);
 			watch->poll_fd.revents = 0;
+			(watch->fnc) (watch->fnc_data, watch->poll_fd.fd);
 		}
 	}
 	g_list_free (watches);
@@ -338,7 +338,6 @@ seahorse_gpgme_gsource_finalize (GSource *gsource)
 	g_cancellable_disconnect (gpgme_gsource->cancellable,
 	                          gpgme_gsource->cancelled_sig);
 	g_clear_object (&gpgme_gsource->cancellable);
-	gpgme_set_io_cbs (gpgme_gsource->gctx, NULL);
 }
 
 static GSourceFuncs seahorse_gpgme_gsource_funcs = {
diff --git a/ssh/seahorse-ssh-operation.c b/ssh/seahorse-ssh-operation.c
index 0a48a4c..87a8b05 100644
--- a/ssh/seahorse-ssh-operation.c
+++ b/ssh/seahorse-ssh-operation.c
@@ -262,9 +262,9 @@ on_watch_ssh_process (GPid pid,
 
 	/* Command failed */
 	} else if (WEXITSTATUS (status) != 0) {
-		g_warning ("SSH command failed: (%d)", WEXITSTATUS (status));
+		g_message ("SSH command failed: (%d)", WEXITSTATUS (status));
 		if (closure->serr->len)
-			g_warning ("SSH error output: %s", closure->serr->str);
+			g_message ("SSH error output: %s", closure->serr->str);
 		g_simple_async_result_set_error (res, SEAHORSE_ERROR, 0, "%s",
 		                                 closure->serr->len ? closure->serr->str : _("The SSH command failed."));
 
@@ -859,7 +859,7 @@ seahorse_ssh_op_change_passphrase_async  (SeahorseSSHKey *key,
 	source = seahorse_object_get_source (SEAHORSE_OBJECT (key));
 	g_return_if_fail (SEAHORSE_IS_SSH_SOURCE (source));
 
-	res = g_simple_async_result_new (G_OBJECT (source), callback, user_data,
+	res = g_simple_async_result_new (G_OBJECT (key), callback, user_data,
 	                                 seahorse_ssh_op_change_passphrase_async);
 	g_simple_async_result_set_op_res_gpointer (res, g_object_ref (key), g_object_unref);
 
@@ -877,10 +877,7 @@ seahorse_ssh_op_change_passphrase_finish (SeahorseSSHKey *key,
                                           GAsyncResult *result,
                                           GError **error)
 {
-	SeahorseSource *source;
-
-	source = seahorse_object_get_source (SEAHORSE_OBJECT (key));
-	g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (source),
+	g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (key),
 	                      seahorse_ssh_op_change_passphrase_async), FALSE);
 
 	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error))



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