[seahorse/be9ddd5: 7/8] Returns an error if an unknown keytype is used



commit 1d45d8d5658041105a0e19d36134941896f71a27
Author: Thorsten Sick <tsick src gnome org>
Date:   Mon Dec 28 17:36:23 2009 +0100

    Returns an error if an unknown keytype is used
    
    This patch returns an error if an unknown keytyp is used. So far only
    "openpgp" is supported by the GenerateCredentials DBus call.

 daemon/seahorse-service.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/daemon/seahorse-service.c b/daemon/seahorse-service.c
index de5206d..cc93155 100644
--- a/daemon/seahorse-service.c
+++ b/daemon/seahorse-service.c
@@ -224,6 +224,11 @@ seahorse_service_generate_credentials (SeahorseService *svc, gchar *ktype,
         g_free (comment);
         comment = NULL;
     }
+    else {
+        g_set_error (error, SEAHORSE_DBUS_ERROR, SEAHORSE_DBUS_ERROR_INVALID,
+                     _("This keytype is not supported: %s"), ktype);
+        return FALSE;
+    }
 
     return TRUE;
 }



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