Reset smart card state before reconnect. This fixes stability problems

when using smart cards in conjunction with RandR. 



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1561 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Peter Åstrand 2010-01-26 12:23:53 +00:00
parent f749dbfef4
commit 60e82d86ef
3 changed files with 11 additions and 0 deletions

View File

@ -314,6 +314,7 @@ void scard_lock(int lock);
void scard_unlock(int lock);
int scard_enum_devices(uint32 * id, char *optarg);
void scardSetInfo(uint32 device, uint32 id, uint32 bytes_out);
void scard_reset_state();
/* *INDENT-OFF* */
#ifdef __cplusplus

View File

@ -351,6 +351,7 @@ static void
rdesktop_reset_state(void)
{
rdp_reset_state();
scard_reset_state();
}
static RD_BOOL

View File

@ -2626,3 +2626,12 @@ scard_unlock(int lock)
{
pthread_mutex_unlock(scard_mutex[lock]);
}
void scard_reset_state()
{
curDevice = 0;
curId = 0;
curBytesOut = 0;
queueFirst = queueLast = NULL;
}