From patchwork Mon Apr 25 18:46:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 66605 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1196536qge; Mon, 25 Apr 2016 11:49:44 -0700 (PDT) X-Received: by 10.55.116.69 with SMTP id p66mr20234500qkc.129.1461610181734; Mon, 25 Apr 2016 11:49:41 -0700 (PDT) Return-Path: Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com. [209.132.183.24]) by mx.google.com with ESMTPS id f48si11521732qgd.76.2016.04.25.11.49.40 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 25 Apr 2016 11:49:41 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.24 as permitted sender) client-ip=209.132.183.24; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.24 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u3PIl01B025236; Mon, 25 Apr 2016 14:47:00 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u3PIkghs022129 for ; Mon, 25 Apr 2016 14:46:42 -0400 Received: from colepc.redhat.com (ovpn-113-101.phx2.redhat.com [10.3.113.101]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3PIkclC012964; Mon, 25 Apr 2016 14:46:42 -0400 From: Cole Robinson To: libvirt-list@redhat.com Date: Mon, 25 Apr 2016 14:46:32 -0400 Message-Id: <03d75b2dfe788a436774f161de15678e506eca4f.1461609759.git.crobinso@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 6/9] daemon: stream: set stream->closed on removal X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com These are the only places where we don't set stream->closed when aborting the stream. This leads to spurious errors when the client hangs up unexpectedly: error : virFDStreamUpdateCallback:127 : internal error: stream is not open --- daemon/stream.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.7.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/daemon/stream.c b/daemon/stream.c index 8a97260..fcec3d0 100644 --- a/daemon/stream.c +++ b/daemon/stream.c @@ -463,6 +463,7 @@ daemonRemoveClientStream(virNetServerClientPtr client, } if (!stream->closed) { + stream->closed = true; virStreamEventRemoveCallback(stream->st); virStreamAbort(stream->st); } @@ -493,6 +494,7 @@ daemonRemoveAllClientStreams(daemonClientStream *stream) tmp = stream->next; if (!stream->closed) { + stream->closed = true; virStreamEventRemoveCallback(stream->st); virStreamAbort(stream->st); }