X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=rnetclient.c;h=6f44767b4323bc623441cfcb7f51bdcb50bcc72a;hb=5f124a78b9b2f7e98cad8d851bb5835001b86846;hp=53c1fbf896ea13c176c26a90bce2a24888aab99a;hpb=2459755a51dfddf1217c270efe87074e669a35e7;p=cascardo%2Flibreceita.git diff --git a/rnetclient.c b/rnetclient.c index 53c1fbf..6f44767 100644 --- a/rnetclient.c +++ b/rnetclient.c @@ -74,10 +74,10 @@ static int deflateRecord(char *buffer, size_t len, char **out, size_t *olen) free(*out); return -1; } - *olen = zstrm.avail_out + 6; + *olen = zstrm.total_out + 6; (*out)[0] = 0x1; - (*out)[1] = (zstrm.avail_out >> 8); - (*out)[2] = (zstrm.avail_out & 0xff); + (*out)[1] = (zstrm.total_out >> 8); + (*out)[2] = (zstrm.total_out & 0xff); (*out)[3] = (len >> 8); (*out)[4] = (len & 0xff); (*out)[5] = 0x1;