On 2015-02-04 12:18, Alex Bennée wrote:
> The old code assumed anything not Z_OK was a failure. However the
> zlib.h
> header says:
>
> Return codes for the compression/decompression functions. Negative
> values
> are errors, positive values are used for special but normal events.
>
> As a result mbsync reports and error when we receive Z_STREAM_END which
> is simply the correct result for the end of the stream. This changes
> the
> exit path so we handle any final bytes before closing the socket and
> returning.
>
This helps, but I also need to change the deflate handling like below:
- if (deflate( conn->out_z, Z_PARTIAL_FLUSH ) !=
Z_OK) {
+ int r;
+ r = deflate( conn->out_z, Z_PARTIAL_FLUSH );
+ if (r != Z_OK && r!= Z_BUF_ERROR) {
To be able to have a run without crashes.
Regards,
Mark
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel