summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2016-09-27 09:53:02 +0100
committerFrediano Ziglio <freddy77@gmail.com>2021-06-14 11:54:09 +0100
commit97b354bcbe9b26a3743c1a83afca8c89f5541008 (patch)
treeef546d6708c2b9b28b800d26ba1f424f7ad25701
parent34bf20144b18d6f3573d73059f7d384e823ed373 (diff)
OT NETWORK
-rw-r--r--server/reds.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/server/reds.cpp b/server/reds.cpp
index c4ae443b..f2a2fcc6 100644
--- a/server/reds.cpp
+++ b/server/reds.cpp
@@ -2338,6 +2338,13 @@ static RedLinkInfo *reds_init_client_connection(RedsState *reds, int socket)
return nullptr;
}
+#if 0
+ flags = 10 * 1024;
+ if (setsockopt(socket, SOL_SOCKET, SO_SNDBUF, &flags, sizeof(flags))) {
+ spice_assert("should not fail");
+ }
+#endif
+
red_socket_set_keepalive(socket, TRUE, KEEPALIVE_TIMEOUT);
red_socket_set_nosigpipe(socket, true);
@@ -2622,9 +2629,8 @@ static int reds_init_net(RedsState *reds)
}
}
- if (reds->config->spice_listen_socket_fd != -1 ) {
- reds->listen_socket = reds->config->spice_listen_socket_fd;
- reds->listen_watch = reds_core_watch_add(reds, reds->listen_socket,
+ if (reds->config->spice_listen_socket_fd != -1) {
+ reds->listen_watch = reds_core_watch_add(reds, reds->config->spice_listen_socket_fd,
SPICE_WATCH_EVENT_READ,
reds_accept, reds);
if (reds->listen_watch == nullptr) {