emacs-devel
[Top][All Lists]
Advanced

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

Re: url-retrieve-synchronously randomly fails on https URLs (patch inclu


From: Riccardo Murri
Subject: Re: url-retrieve-synchronously randomly fails on https URLs (patch included)
Date: Mon, 29 Oct 2007 21:48:46 +0100

> Besides, the code can be simpler.
>

Thanks for your suggestions; simplified patch to tls.el attached.


A few questions below:

>     +          ;; advance point to after all informational messages that
>     +          ;; `openssl s_client' and `gnutls' print
>     +          (lexical-let ((attempts tls-end-of-info-match-attempts)
>     +                        (start-of-data nil))
>
> Why not ordinary let?

Out of curiosity: why would ordinary `let' be better here?


>     +                    (not (= 0 (if (> attempts 0) (decf attempts) -1)))
>
> I think there should not be a limit -- it should just keep looping
> until it finds what it is looking for.
>

Yes, but this will result in a endless loop if the regex does not
match the program output for some reason (for instance, a new version
of `gnutls' changes the wording of the messages).

I understand that this problem may occur in many places, and that
tls.el would already loop forever if `tls-success' does not match;
but I would rather add more "watchdog" counters instead...

Anyway, I removed the `attempts' counter and related code, as per your
suggestion.

-- 
Riccardo Murri, via Galeazzo Alessi 61, 00176 Roma

Attachment: tls.el.diff
Description: Text document


reply via email to

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