diff options
-rw-r--r-- | gtk/smartcard-manager.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/smartcard-manager.c b/gtk/smartcard-manager.c index 4b1efe2..2a0e397 100644 --- a/gtk/smartcard-manager.c +++ b/gtk/smartcard-manager.c @@ -408,6 +408,7 @@ static gboolean smartcard_manager_init(SpiceSession *session, { gchar *emul_args = NULL; VCardEmulOptions *options = NULL; + VCardEmulError emul_init_status; gchar *dbname = NULL; GStrv certificates = NULL; gboolean retval = FALSE; @@ -448,7 +449,9 @@ static gboolean smartcard_manager_init(SpiceSession *session, init: SPICE_DEBUG("vcard_emul_init"); - if (vcard_emul_init(options) != VCARD_EMUL_OK) { + emul_init_status = vcard_emul_init(options); + if ((emul_init_status != VCARD_EMUL_OK) + && (emul_init_status != VCARD_EMUL_INIT_ALREADY_INITED)) { *err = g_error_new(SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED, "Failed to initialize smartcard"); |