summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2013-12-11 13:29:15 -0800
committerJay Sorg <jay.sorg@gmail.com>2013-12-11 13:29:15 -0800
commitcd2eca557347430b39111ef0a0e2a2742c16e1d1 (patch)
treed4d2123af461fb6adaa3debe42ee7bb2ad3cd0be
parente118463ebcc9fa71d0e5762b428e2f3a789a5b2b (diff)
downloadxrdp-proprietary-cd2eca557347430b39111ef0a0e2a2742c16e1d1.tar.gz
xrdp-proprietary-cd2eca557347430b39111ef0a0e2a2742c16e1d1.zip
chansrv: some minor smartcard changes
-rw-r--r--sesman/chansrv/smartcard.c2
-rw-r--r--sesman/chansrv/smartcard_pcsc.c11
2 files changed, 9 insertions, 4 deletions
diff --git a/sesman/chansrv/smartcard.c b/sesman/chansrv/smartcard.c
index e3eb52c1..e1bbbf78 100644
--- a/sesman/chansrv/smartcard.c
+++ b/sesman/chansrv/smartcard.c
@@ -1924,7 +1924,7 @@ scard_send_Transmit(IRP *irp, tui32 sc_handle, char *send_data,
{
/* map4 */
out_uint32_le(s, recv_ior->dwProtocol);
- out_uint32_le(s, recv_ior->cbPciLength - 8);
+ out_uint32_le(s, recv_ior->cbPciLength);
val = recv_ior->extra_bytes > 0 ? 1 : 0;
out_uint32_le(s, val); /* map6*/
if (val)
diff --git a/sesman/chansrv/smartcard_pcsc.c b/sesman/chansrv/smartcard_pcsc.c
index 8bdbe745..beccd4f9 100644
--- a/sesman/chansrv/smartcard_pcsc.c
+++ b/sesman/chansrv/smartcard_pcsc.c
@@ -481,7 +481,8 @@ scard_function_disconnect_return(struct trans *con,
in_uint32_le(in_s, dwActiveProtocol);
in_uint8s(in_s, 4);
in_uint32_le(in_s, hCard);
- LLOGLN(10, ("scard_function_connect_return: hCard %d dwActiveProtocol %d", hCard, dwActiveProtocol));
+ LLOGLN(10, ("scard_function_connect_return: hCard %d "
+ "dwActiveProtocol %d", hCard, dwActiveProtocol));
}
out_s = trans_get_out_s(con, 8192);
s_push_layer(out_s, iso_hdr, 8);
@@ -703,11 +704,15 @@ scard_function_transmit_return(struct trans *con,
in_uint8p(in_s, recv_ior.extra_data, recv_ior.extra_bytes);
}
}
- in_uint32_le(in_s, cbRecvLength);
- if (cbRecvLength > 0)
+
+ in_uint8s(in_s, 4);
+ in_uint32_le(in_s, val);
+ if (val != 0)
{
+ in_uint32_le(in_s, cbRecvLength);
in_uint8p(in_s, recvBuf, cbRecvLength);
}
+
}
LLOGLN(10, ("scard_function_transmit_return: cbRecvLength %d", cbRecvLength));
out_s = trans_get_out_s(con, 8192);