WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xenstored: Fix socket-based connection te

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xenstored: Fix socket-based connection teardown. Reading zero bytes
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 27 Jul 2007 03:22:15 -0700
Delivery-date: Fri, 27 Jul 2007 03:20:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1185353474 -3600
# Node ID 3ec3e2840a29bb6d4c64b8094248381712370f17
# Parent  68260372b6da5dfb0e32dfe26cc4a8ddbf0b3df0
xenstored: Fix socket-based connection teardown. Reading zero bytes
*should* in fact cause the connection to be destroyed. Fix this with a
little extra code in the readfd() handler.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/xenstore/xenstored_core.c |    6 ++++++
 1 files changed, 6 insertions(+)

diff -r 68260372b6da -r 3ec3e2840a29 tools/xenstore/xenstored_core.c
--- a/tools/xenstore/xenstored_core.c   Tue Jul 24 18:28:48 2007 +0100
+++ b/tools/xenstore/xenstored_core.c   Wed Jul 25 09:51:14 2007 +0100
@@ -1366,6 +1366,12 @@ static int readfd(struct connection *con
                }
                if (errno != EINTR)
                        break;
+       }
+
+       /* Reading zero length means we're done with this connection. */
+       if ((rc == 0) && (len != 0)) {
+               errno = EBADF;
+               rc = -1;
        }
 
        return rc;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xenstored: Fix socket-based connection teardown. Reading zero bytes, Xen patchbot-unstable <=