chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] OpenSSL egg option defaults poll


From: Andy Bennett
Subject: Re: [Chicken-users] OpenSSL egg option defaults poll
Date: Tue, 25 Nov 2014 15:54:49 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.8.1

On 23/11/14 18:38, Florian Zumbiehl wrote:
> Hi,
> 
>>       ;; close
>>       (lambda ()
>>         (when (startup #t)
>>           (if outbuf
>> -             (begin
>> -               (output outbuf)
>> -               (set! outbuf "")))
>> +           (begin
>> +             (unbuffered-write outbuf 0 outbufsize)
>> +             (set! outbufsize 0)))
>>           (set! out-open? #f)
>>           (shutdown)))
> 
> AFAICS, this makes it impossible to close the file descriptors behind ports
> where the remote end has closed the connection while there is still data
> queued for transmission.

Find a new version of the patch attached. This is version (3) and is
against v1.6.4. A diff against versiion (2) is here:

-----
diff -upr v1.6.4-andyjpb-fix-2/openssl.scm v1.6.4-andyjpb-fix-3/openssl.scm
--- v1.6.4-andyjpb-fix-2/openssl.scm    2014-11-23 13:10:43.801483458 +0000
+++ v1.6.4-andyjpb-fix-3/openssl.scm    2014-11-25 15:53:35.035152667 +0000
@@ -481,13 +481,17 @@ EOF
             (unbuffered-write buffer)))
         ;; close
         (lambda ()
-          (when (startup #t)
-            (if outbuf
-              (begin
-                (unbuffered-write outbuf 0 outbufsize)
-                (set! outbufsize 0)))
-            (set! out-open? #f)
-            (shutdown)))
+          (dynamic-wind
+            void
+            (lambda ()
+              (when (startup #t)
+                (if outbuf
+                  (begin
+                    (unbuffered-write outbuf 0 outbufsize)
+                    (set! outbufsize 0)))))
+            (lambda ()
+              (set! out-open? #f)
+              (shutdown))))
         ;; flush
         (lambda ()
           (when outbuf
-----


Regards,
@ndy

-- 
address@hidden
http://www.ashurst.eu.org/
0x7EBA75FF

Attachment: openssl-egg-andyjpb-fix-2014-11-25-3.patch
Description: Text Data


reply via email to

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