From 912f5de90b90e46f5592642f5c0bc7148b0c1bf7 Mon Sep 17 00:00:00 2001 From: csoler Date: Sun, 19 Jan 2020 20:08:58 +0100 Subject: [PATCH] Fixed UDP bug (Congrats to Sehraf for finding this!) --- libretroshare/src/tcponudp/bss_tou.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libretroshare/src/tcponudp/bss_tou.cc b/libretroshare/src/tcponudp/bss_tou.cc index b5b4693aa..286201f53 100644 --- a/libretroshare/src/tcponudp/bss_tou.cc +++ b/libretroshare/src/tcponudp/bss_tou.cc @@ -137,18 +137,18 @@ static int tou_socket_read(BIO *b, char *out, int outl) int ret=0; - if (!out) - { + if (out) + { clear_tou_socket_error(BIO_get_fd(b,NULL)); /* call tou library */ ret=tou_read(BIO_get_fd(b,NULL),out,outl); BIO_clear_retry_flags(b); if (ret <= 0) - { + { if (BIO_tou_socket_should_retry(BIO_get_fd(b,NULL), ret)) BIO_set_retry_read(b); - } } + } #ifdef DEBUG_TOU_BIO fprintf(stderr, "tou_socket_read() = %d\n", ret); #endif