From f9d036a874fe35993d16b79cae54c40f8e9efeab Mon Sep 17 00:00:00 2001 From: Christian Plattner Date: Wed, 18 Apr 2018 10:47:06 +0200 Subject: [PATCH] Fix #3602 by implementing BIO_get_fd correctly for RDG --- libfreerdp/core/gateway/rdg.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libfreerdp/core/gateway/rdg.c b/libfreerdp/core/gateway/rdg.c index 03bbe28..c1d95b9 100644 --- a/libfreerdp/core/gateway/rdg.c +++ b/libfreerdp/core/gateway/rdg.c @@ -1583,6 +1583,17 @@ static long rdg_bio_ctrl(BIO* bio, int cmd, long arg1, void* arg2) else status = 1; } + else if (cmd == BIO_C_GET_FD) + { + /* + * Even if two FDs are part of RDG, only one FD can be returned here. + * + * In FreeRDP, BIO FDs are only used for polling, so it is safe to use the outgoing FD only + * + * See issue #3602 + */ + return BIO_get_fd(tlsOut->bio, NULL); + } return status; } -- 2.7.4