<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px">> From your description looks like the patch is reversed.<br clear="none"><br clear="none">Yes, it's reversed, sorry.<br clear="none"><br clear="none">> I'm not that familiar with usbredir code but looking at the code<br clear="none">> if usbredirparser_do_write returns 0 the server should just loop<br clear="none">> again.<br clear="none"><div id="yui_3_16_0_ym19_1_1476532684741_8213"><br></div><div id="yui_3_16_0_ym19_1_1476532684741_7004">You are right. I found this bug when I debugged the usbredir sources for RedHat/CentOS 7 SRPM package and it had this old code</div><div id="yui_3_16_0_ym19_1_1476532684741_8180"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1476532684741_8233"> w = parser->callb.write_func(parser->callb.priv,<br id="yui_3_16_0_ym19_1_1476532684741_8245"> wbuf->buf + wbuf->pos, w);<br id="yui_3_16_0_ym19_1_1476532684741_8246"> if (w <= 0) {<br id="yui_3_16_0_ym19_1_1476532684741_8247"> ret = -1;<br id="yui_3_16_0_ym19_1_1476532684741_8248"> break;<br id="yui_3_16_0_ym19_1_1476532684741_8249"> }</div><div id="yui_3_16_0_ym19_1_1476532684741_8250" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1476532684741_8420" dir="ltr">where "w == 0" was treated as an erroneous case.</div><div id="yui_3_16_0_ym19_1_1476532684741_8421" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1476532684741_8469" dir="ltr">So, my patch is for the old code. I overlooked that this error was already fixed in 2013 the current repository.</div><div id="yui_3_16_0_ym19_1_1476532684741_8620" dir="ltr">Sorry, my fault. Never mind.</div><div id="yui_3_16_0_ym19_1_1476532684741_8618" dir="ltr">(Redhat 7.x packages sometimes are very old, though. This is frustrating...)<br></div><div id="yui_3_16_0_ym19_1_1476532684741_8523"><br></div><div id="yui_3_16_0_ym19_1_1476532684741_8524">Regards,</div><div id="yui_3_16_0_ym19_1_1476532684741_9827"> Dmitriy<br></div><br></div></body></html>