mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-29 01:16:20 -05:00
Fixed UDP bug (Congrats to Sehraf for finding this!)
This commit is contained in:
parent
6136ac08f5
commit
912f5de90b
@ -137,18 +137,18 @@ static int tou_socket_read(BIO *b, char *out, int outl)
|
|||||||
|
|
||||||
int ret=0;
|
int ret=0;
|
||||||
|
|
||||||
if (!out)
|
if (out)
|
||||||
{
|
{
|
||||||
clear_tou_socket_error(BIO_get_fd(b,NULL));
|
clear_tou_socket_error(BIO_get_fd(b,NULL));
|
||||||
/* call tou library */
|
/* call tou library */
|
||||||
ret=tou_read(BIO_get_fd(b,NULL),out,outl);
|
ret=tou_read(BIO_get_fd(b,NULL),out,outl);
|
||||||
BIO_clear_retry_flags(b);
|
BIO_clear_retry_flags(b);
|
||||||
if (ret <= 0)
|
if (ret <= 0)
|
||||||
{
|
{
|
||||||
if (BIO_tou_socket_should_retry(BIO_get_fd(b,NULL), ret))
|
if (BIO_tou_socket_should_retry(BIO_get_fd(b,NULL), ret))
|
||||||
BIO_set_retry_read(b);
|
BIO_set_retry_read(b);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#ifdef DEBUG_TOU_BIO
|
#ifdef DEBUG_TOU_BIO
|
||||||
fprintf(stderr, "tou_socket_read() = %d\n", ret);
|
fprintf(stderr, "tou_socket_read() = %d\n", ret);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user