smartcard: Remove duplicate accessor

smartcard_channel_client_get_device() is the same as
smartcard_channel_client_get_char_device(). Let's only keep the latter.
This commit is contained in:
Christophe Fergeau 2016-11-21 14:32:49 +01:00
parent 00d2c6f226
commit 598fb35ec5
3 changed files with 1 additions and 8 deletions

View File

@ -282,11 +282,6 @@ static void smartcard_channel_client_remove_reader(SmartCardChannelClient *scc,
}
}
RedCharDeviceSmartcard* smartcard_channel_client_get_device(SmartCardChannelClient *scc)
{
return scc->priv->smartcard;
}
static void smartcard_channel_client_write_to_reader(SmartCardChannelClient *scc)
{
g_return_if_fail(scc);

View File

@ -83,8 +83,6 @@ void smartcard_channel_client_send_error(RedChannelClient *rcc,
SpiceMarshaller *m,
RedPipeItem *item);
RedCharDeviceSmartcard* smartcard_channel_client_get_device(SmartCardChannelClient *scc);
int smartcard_channel_client_handle_message(RedChannelClient *rcc,
uint16_t type,
uint32_t size,

View File

@ -501,7 +501,7 @@ void smartcard_channel_write_to_reader(RedCharDeviceWriteBuffer *write_buf)
sin = g_smartcard_readers.sin[vheader->reader_id];
dev = RED_CHAR_DEVICE_SMARTCARD(sin->st);
spice_assert(!dev->priv->scc ||
dev == smartcard_channel_client_get_device(dev->priv->scc));
dev == smartcard_channel_client_get_char_device(dev->priv->scc));
/* protocol requires messages to be in network endianess */
vheader->type = htonl(vheader->type);
vheader->length = htonl(vheader->length);