[Spice-commits] server/smartcard-channel-client.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Mon Dec 5 11:55:21 UTC 2016


 server/smartcard-channel-client.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit b8f06e243790998bcb15054f39f29741f8d7bb12
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Fri Dec 2 07:52:10 2016 +0000

    smartcard: Optimise sending data
    
    As data is packae in a single piece of memory send it
    altogether.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Pavel Grunt <pgrunt at redhat.com>

diff --git a/server/smartcard-channel-client.c b/server/smartcard-channel-client.c
index 35327dc..95be310 100644
--- a/server/smartcard-channel-client.c
+++ b/server/smartcard-channel-client.c
@@ -212,10 +212,7 @@ void smartcard_channel_client_send_data(RedChannelClient *rcc,
     spice_assert(rcc);
     spice_assert(vheader);
     red_channel_client_init_send_data(rcc, SPICE_MSG_SMARTCARD_DATA, item);
-    spice_marshaller_add_ref(m, (uint8_t*)vheader, sizeof(VSCMsgHeader));
-    if (vheader->length > 0) {
-        spice_marshaller_add_ref(m, (uint8_t*)(vheader+1), vheader->length);
-    }
+    spice_marshaller_add_ref(m, (uint8_t*)vheader, sizeof(VSCMsgHeader) + vheader->length);
 }
 
 void smartcard_channel_client_send_error(RedChannelClient *rcc, SpiceMarshaller *m, RedPipeItem *item)


More information about the Spice-commits mailing list