Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 1dba9a9285d0346454f9eeefc89f4d83 > files > 1

evolution-data-server-1.12.2-1mdv2008.0.src.rpm

--- evolution-data-server-1.11.1/camel/camel-gpg-context.c.gpgutf8	2007-04-20 06:27:55.000000000 +0200
+++ evolution-data-server-1.11.1/camel/camel-gpg-context.c	2007-04-23 08:24:41.000000000 +0200
@@ -1339,11 +1339,22 @@
 	
 	if (gpg_ctx_op_wait (gpg) != 0) {
 		const char *diagnostics;
+		gchar *message;
 		
 		diagnostics = gpg_ctx_get_diagnostics (gpg);
-		camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
-				     diagnostics && *diagnostics ? diagnostics :
-				     _("Failed to execute gpg."));
+
+		if (diagnostics) {
+			message = g_locale_to_utf8(diagnostics, -1, NULL, NULL, NULL);
+		} else {
+			message = _("Failed to execute gpg.");
+		}
+
+		camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, message);
+
+		if (diagnostics) {
+			g_free(message);
+		}
+
 		goto fail;
 	}
 
@@ -1622,10 +1633,22 @@
 	
 	if (gpg_ctx_op_wait (gpg) != 0) {
 		const char *diagnostics;
-		
+		gchar *message;
+
 		diagnostics = gpg_ctx_get_diagnostics (gpg);
-		camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
-				     diagnostics && *diagnostics ? diagnostics : _("Failed to execute gpg."));
+
+		if (diagnostics) {
+			message = g_locale_to_utf8(diagnostics, -1, NULL, NULL, NULL);
+		} else {
+			message = _("Failed to execute gpg.");
+		}
+
+		camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, message);
+
+		if (diagnostics) {
+			g_free(message);
+		}
+
 		goto fail;
 	}
 
@@ -1740,11 +1763,22 @@
 	
 	if (gpg_ctx_op_wait (gpg) != 0) {
 		const char *diagnostics;
-		
+		gchar *message;
+
 		diagnostics = gpg_ctx_get_diagnostics (gpg);
-		camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
-				     diagnostics && *diagnostics ? diagnostics :
-				     _("Failed to execute gpg."));
+
+		if (diagnostics) {
+			message = g_locale_to_utf8(diagnostics, -1, NULL, NULL, NULL);
+		} else {
+			message = _("Failed to execute gpg.");
+		}
+
+		camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, message);
+
+		if (diagnostics) {
+			g_free(message);
+		}
+
 		goto fail;
 	}
 
@@ -1819,11 +1853,22 @@
 	
 	if (gpg_ctx_op_wait (gpg) != 0) {
 		const char *diagnostics;
-		
+		gchar *message;
+
 		diagnostics = gpg_ctx_get_diagnostics (gpg);
-		camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
-				     diagnostics && *diagnostics ? diagnostics :
-				     _("Failed to execute gpg."));
+
+		if (diagnostics) {
+			message = g_locale_to_utf8(diagnostics, -1, NULL, NULL, NULL);
+		} else {
+			message = _("Failed to execute gpg.");
+		}
+
+		camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, message);
+
+		if (diagnostics) {
+			g_free(message);
+		}
+
 		goto fail;
 	}
 
@@ -1864,11 +1909,22 @@
 	
 	if (gpg_ctx_op_wait (gpg) != 0) {
 		const char *diagnostics;
-		
+		gchar *message;
+
 		diagnostics = gpg_ctx_get_diagnostics (gpg);
-		camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
-				     diagnostics && *diagnostics ? diagnostics :
-				     _("Failed to execute gpg."));
+
+		if (diagnostics) {
+			message = g_locale_to_utf8(diagnostics, -1, NULL, NULL, NULL);
+		} else {
+			message = _("Failed to execute gpg.");
+		}
+
+		camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, message);
+
+		if (diagnostics) {
+			g_free(message);
+		}
+
 		goto fail;
 	}