[Spice-devel] [PATCH 1/2] server: don't fail on ENOSUP from setsockopt calls

Nahum Shalman nshalman at elys.com
Fri Mar 9 07:39:21 PST 2012


These are the only instances in the code base where functions fail as a
result of setsockopt calls returning ENOSUP.
Those calls will always return ENOSUP when we are listening on a UNIX
socket rather than a TCP port.
We'd prefer not to fail.
---
 server/inputs_channel.c |    1 -
 server/spicevmc.c       |    1 -
 2 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/server/inputs_channel.c b/server/inputs_channel.c
index a3f26c0..3cae408 100644
--- a/server/inputs_channel.c
+++ b/server/inputs_channel.c
@@ -472,7 +472,6 @@ static int inputs_channel_config_socket(RedChannelClient *rcc)
             &delay_val, sizeof(delay_val)) == -1) {
         if (errno != ENOTSUP) {
             red_printf("setsockopt failed, %s", strerror(errno));
-            return FALSE;
         }
     }
 
diff --git a/server/spicevmc.c b/server/spicevmc.c
index 30aaf2f..2967bcd 100644
--- a/server/spicevmc.c
+++ b/server/spicevmc.c
@@ -94,7 +94,6 @@ static int spicevmc_red_channel_client_config_socket(RedChannelClient *rcc)
                 &delay_val, sizeof(delay_val)) != 0) {
             if (errno != ENOTSUP) {
                 red_printf("setsockopt failed, %s", strerror(errno));
-                return FALSE;
             }
         }
     }
-- 
1.7.7.6



More information about the Spice-devel mailing list