From patchwork Mon Apr 25 18:46:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 66604 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1196517qge; Mon, 25 Apr 2016 11:49:40 -0700 (PDT) X-Received: by 10.140.87.116 with SMTP id q107mr31937559qgd.61.1461610180929; Mon, 25 Apr 2016 11:49:40 -0700 (PDT) Return-Path: Received: from mx6-phx2.redhat.com (mx6-phx2.redhat.com. [209.132.183.39]) by mx.google.com with ESMTPS id f203si11504222qhf.75.2016.04.25.11.49.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Apr 2016 11:49:40 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.39 as permitted sender) client-ip=209.132.183.39; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.39 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 mx6-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3PIkwOt028997; Mon, 25 Apr 2016 14:46:58 -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 u3PIkfoP022119 for ; Mon, 25 Apr 2016 14:46:41 -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 u3PIkclA012964; Mon, 25 Apr 2016 14:46:41 -0400 From: Cole Robinson To: libvirt-list@redhat.com Date: Mon, 25 Apr 2016 14:46:30 -0400 Message-Id: <32ddfc4d6707baa3c0098802aa3fdd23a7f9e37c.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 4/9] daemon: stream: Close stream on send failure 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 This is the only place in daemon/stream.c that sets 'stream->closed = true' but neglects to actually abort the stream and remove the callback, which seems wrong. --- daemon/stream.c | 3 +++ 1 file changed, 3 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 c892dcb..f072a17 100644 --- a/daemon/stream.c +++ b/daemon/stream.c @@ -539,6 +539,9 @@ daemonStreamHandleWriteData(virNetServerClientPtr client, VIR_INFO("Stream send failed"); stream->closed = true; + virStreamEventRemoveCallback(stream->st); + virStreamAbort(stream->st); + return virNetServerProgramSendReplyError(stream->prog, client, msg,