From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aB2tg-0003a2-0O for qemu-devel@nongnu.org; Mon, 21 Dec 2015 11:01:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aB2tb-0005qM-Vt for qemu-devel@nongnu.org; Mon, 21 Dec 2015 11:01:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aB2tb-0005qH-Qo for qemu-devel@nongnu.org; Mon, 21 Dec 2015 11:01:11 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 60C6C8F294 for ; Mon, 21 Dec 2015 16:01:11 +0000 (UTC) References: <1450712543-11629-1-git-send-email-berrange@redhat.com> <1450712543-11629-4-git-send-email-berrange@redhat.com> From: Paolo Bonzini Message-ID: <56782244.4090505@redhat.com> Date: Mon, 21 Dec 2015 17:01:08 +0100 MIME-Version: 1.0 In-Reply-To: <1450712543-11629-4-git-send-email-berrange@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 3/4] char: don't assume telnet initialization will not block List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org On 21/12/2015 16:42, Daniel P. Berrange wrote: > + ret = qio_channel_write(ioc, init->buf, init->buflen, NULL); > + if (ret < 0) { > + if (ret == QIO_CHANNEL_ERR_BLOCK) { > + ret = 0; > + } else { > + tcp_chr_disconnect(init->chr); > + return FALSE; > + } > + } > + init->buflen -= ret; Isn't an "init->buf += ret" missing here? Paolo > +