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

Frediano Ziglio fziglio at redhat.com
Tue Oct 8 17:39:19 UTC 2019


More coherent. Also it's not good for a library to output on
standard output.

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 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



More information about the Spice-devel mailing list