summaryrefslogtreecommitdiffstats
path: root/libcacard/vcard.c
diff options
context:
space:
mode:
authorPeter Maydell2014-10-30 18:04:29 +0100
committerPeter Maydell2014-10-30 18:04:29 +0100
commitf33f43bd86beb94ae1be14a62dc89cbeb4a665bb (patch)
treefbe5c32f91c47ca42f68919ea183a1ed61f25df7 /libcacard/vcard.c
parentMerge remote-tracking branch 'remotes/kraxel/tags/pull-gtk-20141028-1' into s... (diff)
parentuhci: remove useless DEBUG (diff)
downloadqemu-f33f43bd86beb94ae1be14a62dc89cbeb4a665bb.tar.gz
qemu-f33f43bd86beb94ae1be14a62dc89cbeb4a665bb.tar.xz
qemu-f33f43bd86beb94ae1be14a62dc89cbeb4a665bb.zip
Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20141028-1' into staging
Fixes for libcacard (usb smartcard emulation), xhci and uhci. # gpg: Signature made Tue 28 Oct 2014 10:39:52 GMT using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-usb-20141028-1: uhci: remove useless DEBUG xhci: add property to turn on/off streams support libcacard: don't free sign buffer while sign op is pending libcacard: Lock NSS cert db when selecting an applet on an emulated card libcacard: introduce new vcard_emul_logout Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'libcacard/vcard.c')
-rw-r--r--libcacard/vcard.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libcacard/vcard.c b/libcacard/vcard.c
index 87ad5166a8..d140a8ed1a 100644
--- a/libcacard/vcard.c
+++ b/libcacard/vcard.c
@@ -250,6 +250,11 @@ void
vcard_select_applet(VCard *card, int channel, VCardApplet *applet)
{
assert(channel < MAX_CHANNEL);
+
+ /* If using an emulated card, make sure to log out of any already logged in
+ * session. */
+ vcard_emul_logout(card);
+
card->current_applet[channel] = applet;
/* reset the applet */
if (applet && applet->reset_applet) {