cxenstored: also fail if only 1 socket was given by systemd
authorLuis R. Rodriguez <mcgrof@suse.com>
Sat, 26 Jul 2014 02:14:15 +0000 (19:14 -0700)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 28 Jul 2014 12:44:18 +0000 (13:44 +0100)
Reported-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/xenstore/xenstored_core.c

index 7f72f68da91b36c767e37b56551c9a6af5c1e280..4eaff5752f0e5c6425860343e19578cae4f18de7 100644 (file)
@@ -1770,7 +1770,7 @@ static void xen_claim_active_sockets(int **psock, int **pro_sock)
                           strerror(errno),
                           errno);
                barf_perror("sd_listen_fds() failed\n");
-       } else if (n > 2) {
+       } else if (n != 2) {
                fprintf(stderr, SD_ERR "Expected 2 fds but given %d\n", n);
                sd_notifyf(0, "STATUS=Mismatch on number (2): %s\n"
                           "ERRNO=%d",