Mooseyard Networking library: Cocoa utilities, including a generic TCP server/client, plus the reference implementation of the message-oriented BLIP protocol. (This is a mirror of the Mercurial repository at https://bitbucket.org/snej/mynetwork)
In BLIPMessage.m_receivedFrameWithFlags: body: line 365:
if( self.compressed && encodedLength>0 ) {
self.compressed refers to _flags which has not been updated with the flags passed into the method and therefore self.compressed will return NO even if the given flags suggest the body is compressed. This causes the body data to not be decompressed and confuses consumers of the message.
I'm not sure what the proper fix is since I don't quite understand the relationship between _flags and flags, but the method seems to use them in an inconsistent way throughout. It would seem _flags needs to be properly updated by the passed in flags parameter...
As a workaround (which reflects from previous revisions), one can replace line 365 with:
In
BLIPMessage.m
_receivedFrameWithFlags: body:
line 365:if( self.compressed && encodedLength>0 ) {
self.compressed
refers to_flags
which has not been updated with the flags passed into the method and thereforeself.compressed
will return NO even if the givenflags
suggest the body is compressed. This causes the body data to not be decompressed and confuses consumers of the message.I'm not sure what the proper fix is since I don't quite understand the relationship between
_flags
andflags
, but the method seems to use them in an inconsistent way throughout. It would seem_flags
needs to be properly updated by the passed inflags
parameter...As a workaround (which reflects from previous revisions), one can replace line 365 with:
if( flags & kBLIP_Compressed && encodedLength>0 ) {