[Spice-commits] server/smartcard.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Tue Feb 14 18:08:43 UTC 2017


 server/smartcard.c |   15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

New commits:
commit b8f4b3338b102bb2cba46473d45f7d27fb8be739
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Fri Feb 10 14:30:57 2017 +0000

    smartcard: Remove an unnecessary wrapper function
    
    smartcard_channel_client_pipe_add_push was just calling
    red_channel_client_pipe_add_push without any cast or other
    changes.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Jonathon Jongsma <jjongsma at redhat.com>

diff --git a/server/smartcard.c b/server/smartcard.c
index f4bc40d..a7cc614 100644
--- a/server/smartcard.c
+++ b/server/smartcard.c
@@ -124,7 +124,6 @@ typedef struct RedMsgItem {
 } RedMsgItem;
 
 static RedMsgItem *smartcard_get_vsc_msg_item(RedChannelClient *rcc, VSCMsgHeader *vheader);
-static void smartcard_channel_client_pipe_add_push(RedChannelClient *rcc, RedPipeItem *item);
 
 static struct Readers {
     uint32_t num;
@@ -186,6 +185,9 @@ static RedPipeItem *smartcard_read_msg_from_device(RedCharDevice *self,
     return NULL;
 }
 
+/* this is called from both device input and client input. since the device is
+ * a usb device, the context is still the main thread (kvm_main_loop, timers)
+ * so no mutex is required. */
 static void smartcard_send_msg_to_client(RedCharDevice *self,
                                          RedPipeItem *msg,
                                          RedClient *client)
@@ -196,7 +198,7 @@ static void smartcard_send_msg_to_client(RedCharDevice *self,
     spice_assert(dev->priv->scc &&
                  red_channel_client_get_client(rcc) == client);
     red_pipe_item_ref(msg);
-    smartcard_channel_client_pipe_add_push(rcc, msg);
+    red_channel_client_pipe_add_push(rcc, msg);
 }
 
 static void smartcard_send_tokens_to_client(RedCharDevice *self,
@@ -460,15 +462,6 @@ static void smartcard_channel_send_item(RedChannelClient *rcc, RedPipeItem *item
     red_channel_client_begin_send_message(rcc);
 }
 
-/* this is called from both device input and client input. since the device is
- * a usb device, the context is still the main thread (kvm_main_loop, timers)
- * so no mutex is required. */
-static void smartcard_channel_client_pipe_add_push(RedChannelClient *rcc,
-                                                   RedPipeItem *item)
-{
-    red_channel_client_pipe_add_push(rcc, item);
-}
-
 static void smartcard_free_vsc_msg_item(RedPipeItem *base)
 {
     RedMsgItem *item = SPICE_UPCAST(RedMsgItem, base);


More information about the Spice-commits mailing list