[Spice-commits] gtk/channel-smartcard.c
Pavel Grunt
pgrunt at kemper.freedesktop.org
Fri Mar 27 12:37:24 PDT 2015
gtk/channel-smartcard.c | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 11d9fd16005b4db8dc2682b83077afd7710634ee
Author: Pavel Grunt <pgrunt at redhat.com>
Date: Fri Mar 27 19:56:35 2015 +0100
channel-smartcard: Add missing USE_SMARTCARD checks
In order to enable build without smartcard support
diff --git a/gtk/channel-smartcard.c b/gtk/channel-smartcard.c
index 0ab7213..d91c9a0 100644
--- a/gtk/channel-smartcard.c
+++ b/gtk/channel-smartcard.c
@@ -456,8 +456,10 @@ static void spice_smartcard_channel_up_cb(GObject *source_object,
gpointer user_data)
{
SpiceChannel *channel = SPICE_CHANNEL(user_data);
+#ifdef USE_SMARTCARD
SpiceSmartcardManager *manager = spice_smartcard_manager_get();
GList *l, *list = NULL;
+#endif
GError *error = NULL;
g_return_if_fail(channel != NULL);
@@ -470,6 +472,7 @@ static void spice_smartcard_channel_up_cb(GObject *source_object,
goto end;
}
+#ifdef USE_SMARTCARD
list = spice_smartcard_manager_get_readers(manager);
for (l = list; l != NULL; l = l->next) {
VReader *reader = l->data;
@@ -481,9 +484,12 @@ static void spice_smartcard_channel_up_cb(GObject *source_object,
g_boxed_free(SPICE_TYPE_SMARTCARD_READER, reader);
}
+#endif
end:
+#ifdef USE_SMARTCARD
g_list_free(list);
+#endif
g_clear_error(&error);
}
More information about the Spice-commits
mailing list