diff options
Diffstat (limited to 'vchat-tls.c')
-rwxr-xr-x | vchat-tls.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/vchat-tls.c b/vchat-tls.c index a6e5e2d..8154521 100755 --- a/vchat-tls.c +++ b/vchat-tls.c | |||
@@ -464,7 +464,13 @@ ssize_t vc_tls_sendmessage(const void *buf, size_t size) { | |||
464 | } | 464 | } |
465 | 465 | ||
466 | ssize_t vc_tls_receivemessage(void *buf, size_t size) { | 466 | ssize_t vc_tls_receivemessage(void *buf, size_t size) { |
467 | return BIO_read (server_conn, buf, size); | 467 | ssize_t received = (ssize_t)BIO_read (server_conn, buf, size); |
468 | fprintf(stderr, "%zd\n", received); | ||
469 | if (received != 0) | ||
470 | return received; | ||
471 | if (BIO_should_retry(server_conn)) | ||
472 | return -2; | ||
473 | return 0; | ||
468 | } | 474 | } |
469 | 475 | ||
470 | void vc_tls_cleanup() { | 476 | void vc_tls_cleanup() { |