[Spice-commits] gtk/channel-smartcard.c
Marc-André Lureau
elmarco at kemper.freedesktop.org
Tue Aug 28 10:10:35 PDT 2012
gtk/channel-smartcard.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 88ee2d1f5dcccdb6f92092292d86c5e2413cf2cf
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date: Tue Aug 28 19:02:46 2012 +0200
misc build fix when --disable-smartcard
diff --git a/gtk/channel-smartcard.c b/gtk/channel-smartcard.c
index 41d9554..5dafd29 100644
--- a/gtk/channel-smartcard.c
+++ b/gtk/channel-smartcard.c
@@ -133,12 +133,14 @@ static void spice_smartcard_channel_init(SpiceSmartcardChannel *channel)
static void spice_smartcard_channel_constructed(GObject *object)
{
SpiceSession *s = spice_channel_get_session(SPICE_CHANNEL(object));
- SpiceSmartcardChannel *channel = SPICE_SMARTCARD_CHANNEL(object);
- SpiceSmartcardManager *manager = spice_smartcard_manager_get();
-
g_return_if_fail(s != NULL);
+
+#ifdef USE_SMARTCARD
if (!s->priv->migration_copy) {
+ SpiceSmartcardChannel *channel = SPICE_SMARTCARD_CHANNEL(object);
+ SpiceSmartcardManager *manager = spice_smartcard_manager_get();
+
g_signal_connect(G_OBJECT(manager), "reader-added",
(GCallback)reader_added_cb, channel);
g_signal_connect(G_OBJECT(manager), "reader-removed",
@@ -148,6 +150,7 @@ static void spice_smartcard_channel_constructed(GObject *object)
g_signal_connect(G_OBJECT(manager), "card-removed",
(GCallback)card_removed_cb, channel);
}
+#endif
if (G_OBJECT_CLASS(spice_smartcard_channel_parent_class)->constructed)
G_OBJECT_CLASS(spice_smartcard_channel_parent_class)->constructed(object);
More information about the Spice-commits
mailing list