|
|
67137c |
From bf584f60cbdc755258f8311a4a4f7f4266d1c421 Mon Sep 17 00:00:00 2001
|
|
|
67137c |
From: Christophe Fergeau <cfergeau@redhat.com>
|
|
|
67137c |
Date: Fri, 10 Apr 2015 19:34:04 +0200
|
|
|
67137c |
Subject: [PATCH] channel-smartcard: Add missing USE_SMARTCARD checks
|
|
|
67137c |
|
|
|
67137c |
In order to enable build without smartcard support
|
|
|
67137c |
---
|
|
|
67137c |
gtk/channel-smartcard.c | 6 ++++++
|
|
|
67137c |
1 file changed, 6 insertions(+)
|
|
|
67137c |
|
|
|
67137c |
diff --git a/gtk/channel-smartcard.c b/gtk/channel-smartcard.c
|
|
|
67137c |
index fc23626..2f40979 100644
|
|
|
67137c |
--- a/gtk/channel-smartcard.c
|
|
|
67137c |
+++ b/gtk/channel-smartcard.c
|
|
|
67137c |
@@ -461,8 +461,10 @@ static void spice_smartcard_channel_up_cb(GObject *source_object,
|
|
|
67137c |
g_return_if_fail(SPICE_IS_SESSION(source_object));
|
|
|
67137c |
|
|
|
67137c |
if (!spice_channel_get_session(SPICE_CHANNEL(channel))->priv->migration_copy) {
|
|
|
67137c |
+#ifdef USE_SMARTCARD
|
|
|
67137c |
SpiceSmartcardManager *manager = spice_smartcard_manager_get();
|
|
|
67137c |
GList *l, *list = NULL;
|
|
|
67137c |
+#endif
|
|
|
67137c |
GError *error = NULL;
|
|
|
67137c |
|
|
|
67137c |
spice_smartcard_manager_init_finish(SPICE_SESSION(source_object),
|
|
|
67137c |
@@ -472,6 +474,7 @@ static void spice_smartcard_channel_up_cb(GObject *source_object,
|
|
|
67137c |
goto end;
|
|
|
67137c |
}
|
|
|
67137c |
|
|
|
67137c |
+#ifdef USE_SMARTCARD
|
|
|
67137c |
list = spice_smartcard_manager_get_readers(manager);
|
|
|
67137c |
for (l = list; l != NULL; l = l->next) {
|
|
|
67137c |
VReader *reader = l->data;
|
|
|
67137c |
@@ -483,8 +486,11 @@ static void spice_smartcard_channel_up_cb(GObject *source_object,
|
|
|
67137c |
|
|
|
67137c |
g_boxed_free(SPICE_TYPE_SMARTCARD_READER, reader);
|
|
|
67137c |
}
|
|
|
67137c |
+#endif
|
|
|
67137c |
end:
|
|
|
67137c |
+#ifdef USE_SMARTCARD
|
|
|
67137c |
g_list_free(list);
|
|
|
67137c |
+#endif
|
|
|
67137c |
g_clear_error(&error);
|
|
|
67137c |
}
|
|
|
67137c |
|