From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aB3Bl-0000a6-8T for qemu-devel@nongnu.org; Mon, 21 Dec 2015 11:19:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aB3Bi-00021M-1t for qemu-devel@nongnu.org; Mon, 21 Dec 2015 11:19:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43941) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aB3Bh-00020e-Tn for qemu-devel@nongnu.org; Mon, 21 Dec 2015 11:19:54 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 9EE67935D1 for ; Mon, 21 Dec 2015 16:19:53 +0000 (UTC) Date: Mon, 21 Dec 2015 16:19:50 +0000 From: "Daniel P. Berrange" Message-ID: <20151221161949.GH5316@redhat.com> References: <1450712543-11629-1-git-send-email-berrange@redhat.com> <1450712543-11629-4-git-send-email-berrange@redhat.com> <56782244.4090505@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <56782244.4090505@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 3/4] char: don't assume telnet initialization will not block Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On Mon, Dec 21, 2015 at 05:01:08PM +0100, Paolo Bonzini wrote: > > > 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? Opps yes. Well not quite that since 'buf' is an array rather than a pointer, but something equivalent. Anyway will fix it... Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|