---------- Forwarded message ----------
From: <[EMAIL PROTECTED]>
Date: Mon, Jun 23, 2008 at 2:48 PM
Subject: Re: avoid ssl_eof error on SSL_WANT_READ and friends
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]


Dear bradfitz,

New code review comments by Jacob have been published.
Please go to http://codereview.appspot.com/2341 to read them.

Message:
I've uploaded a new patch

Details:

http://codereview.appspot.com/2341/diff/1/2
File lib/DJabberd/Stanza/StartTLS.pm (right):

http://codereview.appspot.com/2341/diff/1/2#newcode74
Line 74: my $err = Net::SSLeay::get_error($ssl,-1);
On 2008/06/19 20:45:39, bradfitz wrote:

> space after comma
>

Done.

http://codereview.appspot.com/2341/diff/1/2#newcode85
Line 85: return $err;
On 2008/06/19 20:45:39, bradfitz wrote:
> Does this function return a boolean or an error code?  The name suggests a

> boolean, but the return value suggests an error code.
>
>
Both! It returns an error code or zero, and the return value is used as if
it
were a boolean in the if check in Connection to decide if we should close or
not
close.  If we should close, we want to log the error code, so we log the
value
returned.... I've changed the function name to actual_error_on_empty_read,
is
that better?  Open to suggestions.


Issue Description:
Incrementing a counter on empty SSL reads is not the correct way to
determine
ssl_eof
(http://code.sixapart.com/trac/djabberd/changeset/758)

Instead we should check the error code to see if it is one of the SSL errors
for
which we are supposed to retry(
http://www.openssl.org/docs/ssl/SSL_get_error.html)



Sincerely,

 Your friendly code review daemon (http://codereview.appspot.com/).

Reply via email to