diff options
Diffstat (limited to 'sesman/chansrv/smartcard.c')
-rw-r--r-- | sesman/chansrv/smartcard.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sesman/chansrv/smartcard.c b/sesman/chansrv/smartcard.c index d5ebea2c..9d55807d 100644 --- a/sesman/chansrv/smartcard.c +++ b/sesman/chansrv/smartcard.c @@ -1307,6 +1307,8 @@ scard_send_Connect(IRP* irp, tui32 context, int wide, READER_STATE* rs) /* insert reader name */ num_chars = g_mbstowcs(w_reader_name, rs->reader_name, 99); + xstream_wr_u32_le(s, 0); + xstream_wr_u32_le(s, 0); xstream_wr_u32_le(s, num_chars); if (wide) { @@ -1322,6 +1324,7 @@ scard_send_Connect(IRP* irp, tui32 context, int wide, READER_STATE* rs) xstream_wr_u8(s, w_reader_name[index]); } } + align_s(s, 4); /* insert context */ xstream_wr_u32_le(s, 4); @@ -2058,6 +2061,7 @@ scard_handle_Connect_Return(struct stream *s, IRP *irp, tui32 IoStatus) { tui32 len; + struct trans *con; log_debug("entered"); @@ -2077,7 +2081,9 @@ scard_handle_Connect_Return(struct stream *s, IRP *irp, /* get OutputBufferLen */ xstream_rd_u32_le(s, len); - + con = (struct trans *) (irp->user_data); + scard_function_connect_return(con, s, len); + devredir_irp_delete(irp); log_debug("leaving"); } |