summaryrefslogtreecommitdiffstats
path: root/crypto/bio/bss_mem.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2000-09-01 12:29:14 +0000
committerBodo Möller <bodo@openssl.org>2000-09-01 12:29:14 +0000
commit55ac522068e616d8a4d1bd5590f3b2d08d4ba25c (patch)
tree04d2596eba4b67459307d4274ce2580eea592492 /crypto/bio/bss_mem.c
parentccc265eaa7a0af0e52aab6961ac3ddd9e5a22156 (diff)
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.
Diffstat (limited to 'crypto/bio/bss_mem.c')
-rw-r--r--crypto/bio/bss_mem.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/bio/bss_mem.c b/crypto/bio/bss_mem.c
index d4d956c619..28ff7582bf 100644
--- a/crypto/bio/bss_mem.c
+++ b/crypto/bio/bss_mem.c
@@ -163,11 +163,9 @@ static int mem_read(BIO *b, char *out, int outl)
}
} else if (bm->length == 0)
{
- if (b->num != 0)
+ ret = b->num;
+ if (ret != 0)
BIO_set_retry_read(b);
- ret= b->num;
- if(ret < 0)
- BIOerr(BIO_F_MEM_READ,BIO_R_EOF_ON_MEMORY_BIO);
}
return(ret);
}