Ejemplo n.º 1
0
static int o_stream_zlib_send_gz_trailer(struct zlib_ostream *zstream)
{
	if (!zstream->gz)
		return 0;

	if (o_stream_zlib_lsb_uint32(zstream->output, zstream->crc) < 0 ||
	    o_stream_zlib_lsb_uint32(zstream->output, zstream->bytes32) < 0) {
		zstream_copy_error(zstream);
		return -1;
	}
	return 0;
}
Ejemplo n.º 2
0
static int o_stream_zlib_send_gz_trailer(struct zlib_ostream *zstream)
{
	struct ostream *output = zstream->ostream.parent;

	if (!zstream->gz)
		return 0;

	if (o_stream_zlib_lsb_uint32(output, zstream->crc) < 0 ||
	    o_stream_zlib_lsb_uint32(output, zstream->bytes32) < 0) {
		o_stream_copy_error_from_parent(&zstream->ostream);
		return -1;
	}
	return 0;
}