X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Ftcpip.c;h=4f4fd481ebc882d283fb38c1f8ae2eb11c465cf5;hb=67791b7efdc55585d77c3889699c9fe155a9abe6;hp=bea92dfc6f4410425240f76ea8e153588c697372;hpb=20c28e99eaa71d4b73e8c03c8cfaf23653948da7;p=yaz-moved-to-github.git diff --git a/src/tcpip.c b/src/tcpip.c index bea92df..4f4fd48 100644 --- a/src/tcpip.c +++ b/src/tcpip.c @@ -1228,10 +1228,10 @@ int tcpip_get(COMSTACK h, char **buf, int *bufsize) h->cerrno = CSYSERR; return -1; } +#endif } else if (!res) return hasread; -#endif } hasread += res; if (hasread > h->max_recv_bytes) @@ -1289,6 +1289,7 @@ int tcpip_put(COMSTACK h, char *buf, int size) { state->towrite = size; state->written = 0; + state->altlen = 0; /* reset input buf in case of excess bytes YAZ-830 */ } else if (state->towrite != size) {