<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2015-11-13 15:35 GMT+01:00 Marcin Cieslak <span dir="ltr"><<a href="mailto:saper@saper.info" target="_blank">saper@saper.info</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, 13 Nov 2015, Ludovic Rousseau wrote:<br>
<br>
</span><span class="">> > The problem turns out is that the receive buffer size<br>
> > is now 65548 bytes on my platform,<br>
> > and my configuration seem to return only<br>
> > 12 bytes with such a large buffer.<br>
> ><br>
><br>
> I don't know how a bigger buffer could have a truncation as effect.<br>
><br>
> Where exactly does the truncation occurs?<br>
<br>
</span>This happens when passing data to CT API:<br>
<br>
        char CT_data(unsigned short ctn,        /* Terminal Number */<br>
                     unsigned char *dad,        /* Destination */<br>
                     unsigned char *sad,        /* Source */<br>
                     unsigned short lc, /* Length of command */<br>
                     unsigned char *cmd,        /* Command/Data Buffer */<br>
                     unsigned short *lr,        /* Length of Response */<br>
                     unsigned char *rsp /* Response */<br>
<br>
The supplied buffer length on my system, 65548 (hex 0x1000c) gets<br>
downcast to (unsigned short), which is 12.<br>
<br>
CT-API will not accept a buffer longer than 64KB. (No wonder given its<br>
origins).<br></blockquote><div><br></div><div>Maybe you can fix CT-API API to use "unsigned int" for a buffer size instead of "unsigned short".<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I wish I wouldn't need to use that but my CCID PCMCIA reader is otherwise<br>
not supported.<br></blockquote><div><br></div><div>I don't think it is a CCID reader if it uses PCMCIA.<br></div><div>CCID is for USB (or USB over ExpressCard).<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
(By the way, for some broken application I have to "#define DISABLE_ON_DEMAND_POWER_ON"<br>
but that's another story).<br></blockquote><div><br></div><div>Yes, another story.<br></div><div>Please do not mix bug reports :-)<br></div></div><br></div><div class="gmail_extra">Bye<br clear="all"><br>-- <br><div class="gmail_signature"> Dr. Ludovic Rousseau</div>
</div></div>