[Spice-devel] [PATCH] Use fd parameter instead of reading file descriptor from reds

Frediano Ziglio fziglio at redhat.com
Wed Jul 13 07:58:35 UTC 2016


Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/reds.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/reds.c b/server/reds.c
index 56138e1..6d625de 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -2521,7 +2521,7 @@ static void reds_accept_ssl_connection(int fd, int event, void *data)
     RedLinkInfo *link;
     int socket;
 
-    if ((socket = accept(reds->secure_listen_socket, NULL, 0)) == -1) {
+    if ((socket = accept(fd, NULL, 0)) == -1) {
         spice_warning("accept failed, %s", strerror(errno));
         return;
     }
@@ -2538,7 +2538,7 @@ static void reds_accept(int fd, int event, void *data)
     RedsState *reds = data;
     int socket;
 
-    if ((socket = accept(reds->listen_socket, NULL, 0)) == -1) {
+    if ((socket = accept(fd, NULL, 0)) == -1) {
         spice_warning("accept failed, %s", strerror(errno));
         return;
     }
-- 
2.7.4



More information about the Spice-devel mailing list