[Spice-devel] [PATCH spice-gtk] channel-smartcard: Add missing USE_SMARTCARD checks

Marc-André Lureau mlureau at redhat.com
Fri Mar 27 12:03:07 PDT 2015


ack

----- Original Message -----
> In order to enable build without smartcard support
> ---
>  gtk/channel-smartcard.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> 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);
>  }
>  
> --
> 2.3.4
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 


More information about the Spice-devel mailing list