[glib-networking/wip/openssl] bio: return 0 if we have nothing to read or to write
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking/wip/openssl] bio: return 0 if we have nothing to read or to write
- Date: Wed, 28 Oct 2015 22:11:01 +0000 (UTC)
commit 69405c6cc4e691c6a7ef0a8f23c444c74aa3a22f
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Wed Oct 28 23:10:39 2015 +0100
bio: return 0 if we have nothing to read or to write
tls/openssl/gtlsbio.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/tls/openssl/gtlsbio.c b/tls/openssl/gtlsbio.c
index a8b317d..24dd48f 100644
--- a/tls/openssl/gtlsbio.c
+++ b/tls/openssl/gtlsbio.c
@@ -112,6 +112,9 @@ gtls_bio_write (BIO *bio,
{
GTlsBio *gbio;
+ if (in == NULL || inl == 0)
+ return 0;
+
gbio = (GTlsBio *)bio->ptr;
return g_pollable_stream_write (g_io_stream_get_output_stream (gbio->io_stream),
@@ -128,6 +131,9 @@ gtls_bio_read (BIO *bio,
{
GTlsBio *gbio;
+ if (out == NULL || outl == 0)
+ return 0;
+
gbio = (GTlsBio *)bio->ptr;
return g_pollable_stream_read (g_io_stream_get_input_stream (gbio->io_stream),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]