[FFmpeg-devel] [PATCH] TLS OPENSSL SSL_get_error

Michael Niedermayer michaelni at gmx.at
Wed Sep 4 16:18:35 CEST 2013


On Wed, Sep 04, 2013 at 08:46:46AM +0200, Mirko Puliafito wrote:
> >
> >
> > please dont mix unrelated changes in the same patch
> > (changing if/else to switch is unrelated)
> >
> > Feedbacks from other users were to change if/else to switch for a
> stylistic improvement. I can switch back if necessary.
> 
> 
> 
> >
> > > +    case SSL_ERROR_SYSCALL:
> > > +        return AVERROR(errno);
> >
> > can errno be 0 here ?
> >
> 
> No as per openssl doc

please quote the docs that you refer to


> 
> > also the code in tls_open() doesnt look like it handles EAGAIN that
> > this seems to be intended to return
> > the other callers look like they would busy loop
> >
> >
> tls_open correclty closes as the connection it isn't created. tls_read and
> tls_write tries again till the resource is available or close is called. To
> me seems correct, what do you think?

do_tls_poll() checks if data is available and if not
returns either EAGAIN or waits until data is available depending on
AVIO_FLAG_NONBLOCK, thats existing code.

The code you add does something else, i assume that is not intended


also in which cases does SSL_ERROR_SYSCALL + EAGAIN happen instead
of SSL_ERROR_WANT_READ/WRITE ?

Thanks

Any other commenst from anyone ? nicolas ? I think you worked more on
te non blocking network stuff than i did ...

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130904/e02cfa4f/attachment.asc>


More information about the ffmpeg-devel mailing list