stacking istreams and ostreams

Philipp Brüll bruell at simiatech.com
Fri Dec 12 14:25:48 UTC 2014


Well, I've found the bug. I've got confused with the stream-stacking
function pointers. The encryption istream was stacked on top of the
parent and the ostream below the parent. That caused this very confusing
bug.

Best,
Philipp

Am 11.12.2014 um 12:16 schrieb Philipp Brüll:
> Hello,
> 
> I'm developing an encryption plugin for dovecot and ran into a problem
> with the stacking of i/o-streams.
> 
> The encryption i/o-streams are working fine on any kind of mail the test
> suite is passing through them. But as soon as the zlib plugin is enabled
> the logs show an cache error:
> 
> failed: Cached message size larger than expected (214 > 206, box=INBOX,
> UID=1)
> 
> I've already double-checked the return values of ostream's sendv and
> istream's read function. They seem correct (and equal).
> 
> If the order of the streams are changed (by changing the number in the
> lib-filename libxx_scrambler.so); meaning that the encryption is done
> before the compression (which isn't efficient) both streams are working
> correct without any errors.
> 
> Is there some way the zlib plugin changes the cached message size? Is
> there some behaviour of the zlib plugin that I'm missing? Any help would
> be very welcome.
> 
> Best regards,
> Philipp
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://dovecot.org/pipermail/dovecot/attachments/20141212/0f0b0c52/attachment.sig>


More information about the dovecot mailing list