Jim Tcl
Check-in [5985f8c4d5]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:aio: Fall back to stdio error if no ssl error

Conditions such as ECONNRESET may result in a failed ssl connection with no ssl error, so return the stdio error in this case rather than just "unknown SSL error"

Signed-off-by: Steve Bennett <steveb@workware.net.au>

Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5985f8c4d538c243b4bfef2ca1a694295a28befd
User & Date: steveb@workware.net.au 2018-07-08 00:42:50
Context
2018-07-08
01:17
linenoise.c: Minor update to fix compiler warning

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 81c9a5ae01 user: steveb@workware.net.au tags: trunk

00:42
aio: Fall back to stdio error if no ssl error

Conditions such as ECONNRESET may result in a failed ssl connection with no ssl error, so return the stdio error in this case rather than just "unknown SSL error"

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 5985f8c4d5 user: steveb@workware.net.au tags: trunk

00:42
aio: Always set error message on I/O error

Some operations that failed (such as read) would leave an empty error result.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 35cbeebf78 user: steveb@workware.net.au tags: trunk

Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to jim-aio.c.

252
253
254
255
256
257
258


259
260
261
262
263
264
265
266
267
268
static const char *ssl_strerror(struct AioFile *af)
{
    int err = ERR_get_error();

    if (err) {
        return ERR_error_string(err, NULL);
    }



    /* should not happen */
    return "unknown SSL error";
}

static int ssl_verify(struct AioFile *af)
{
    X509 *cert;

    cert = SSL_get_peer_certificate(af->ssl);







>
>
|
<
<







252
253
254
255
256
257
258
259
260
261


262
263
264
265
266
267
268
static const char *ssl_strerror(struct AioFile *af)
{
    int err = ERR_get_error();

    if (err) {
        return ERR_error_string(err, NULL);
    }
	else {
		return stdio_strerror(af);
	}


}

static int ssl_verify(struct AioFile *af)
{
    X509 *cert;

    cert = SSL_get_peer_certificate(af->ssl);