[Spice-devel] [PATCH spice-server v2 2/7] smartcard-channel-client: Use log instead of printf

Victor Toso victortoso at redhat.com
Wed Oct 9 07:48:45 UTC 2019


On Tue, Oct 08, 2019 at 06:39:19PM +0100, Frediano Ziglio wrote:
> More coherent. Also it's not good for a library to output on
> standard output.
> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>

Acked-by: Victor Toso <victortoso at redhat.com>

Out of curiosity, have you hit unexpected messages?

> ---
>  server/smartcard-channel-client.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/server/smartcard-channel-client.c b/server/smartcard-channel-client.c
> index d47b442e4..43df902f5 100644
> --- a/server/smartcard-channel-client.c
> +++ b/server/smartcard-channel-client.c
> @@ -276,7 +276,8 @@ bool smartcard_channel_client_handle_message(RedChannelClient *rcc,
>          case VSC_APDU:
>              break; // passed on to device
>          default:
> -            printf("ERROR: unexpected message on smartcard channel\n");
> +            red_channel_warning(red_channel_client_get_channel(rcc),
> +                                "ERROR: unexpected message on smartcard channel");
>              return TRUE;
>      }
>  
> -- 
> 2.21.0
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20191009/7e01d49b/attachment.sig>


More information about the Spice-devel mailing list