help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] Re: ZLib streams


From: Paolo Bonzini
Subject: [Help-smalltalk] Re: ZLib streams
Date: Thu, 23 Aug 2007 16:45:23 +0200
User-agent: Thunderbird 2.0.0.6 (Macintosh/20070728)


Thanks okay. But what I mean was that nextHunk blocked even after it
received a SYNC_FLUSHed packet from the other end. See the rest of the
mail I wrote there.

Ah, I see now.  Could you try this further patch?

Paolo
--- orig/packages/zlib/ZLibReadStream.st
+++ mod/packages/zlib/ZLibReadStream.st
@@ -161,12 +161,10 @@ fillBuffer
     delta := delta + endPtr.
     ptr := 0.
     [
-        inBytes isNil ifTrue: [
-           inBytes := self stream atEnd
-               ifTrue: [ #[] ]
-               ifFalse: [ self stream nextHunk ] ].
+        (inBytes isNil and: [ self stream atEnd not ])
+           ifTrue: [ inBytes := self stream nextHunk ].
 
-       flush := self stream atEnd ifTrue: [ 4 ] ifFalse: [ 0 ].
+       flush := inBytes isNil ifTrue: [ 4 ] ifFalse: [ 0 ].
         endPtr := self processInput: flush size: inBytes size.
        endPtr = 0 ] whileTrue.
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]