Undo change from 1.7 to 1.8:
Returning -1 for an attempt to read from an empty buffer is empty is not an error that should be signalled via the error queue, it's a 'retry read' condition and is signalled as such.
This commit is contained in:
parent
ccc265eaa7
commit
55ac522068
@ -163,11 +163,9 @@ static int mem_read(BIO *b, char *out, int outl)
|
|||||||
}
|
}
|
||||||
} else if (bm->length == 0)
|
} else if (bm->length == 0)
|
||||||
{
|
{
|
||||||
if (b->num != 0)
|
ret = b->num;
|
||||||
|
if (ret != 0)
|
||||||
BIO_set_retry_read(b);
|
BIO_set_retry_read(b);
|
||||||
ret= b->num;
|
|
||||||
if(ret < 0)
|
|
||||||
BIOerr(BIO_F_MEM_READ,BIO_R_EOF_ON_MEMORY_BIO);
|
|
||||||
}
|
}
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user