From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41803) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhI8g-00066r-95 for qemu-devel@nongnu.org; Tue, 28 May 2013 07:32:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhI8b-0003xt-1r for qemu-devel@nongnu.org; Tue, 28 May 2013 07:32:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20058) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhI8a-0003xh-Os for qemu-devel@nongnu.org; Tue, 28 May 2013 07:32:20 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4SBWJVI000351 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 28 May 2013 07:32:20 -0400 Date: Tue, 28 May 2013 12:32:15 +0100 From: "Richard W.M. Jones" Message-ID: <20130528113215.GD5105@redhat.com> References: <1369373827-9152-1-git-send-email-famz@redhat.com> <20130528103520.GB5105@redhat.com> <20130528110155.GC5105@redhat.com> <20130528111401.GA11749@localhost.nay.redhat.com> <20130528112539.GH4515@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="CdrF4e02JqNVZeln" Content-Disposition: inline In-Reply-To: <20130528112539.GH4515@redhat.com> Subject: Re: [Qemu-devel] [PATCH v6 00/12] curl: fix curl read List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Fam Zheng --CdrF4e02JqNVZeln Content-Type: text/plain; charset=us-ascii Content-Disposition: inline This fixes the obvious bug. I wonder if it should be even larger? One use for curl is to install guests using ISOs from websites without having to download the ISO, and I imagine that even a 30 second timeout could be conservative for that task. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top --CdrF4e02JqNVZeln Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-curl-Increase-block-timeout.patch" >>From b53db35e299f1bf28daa82a322b999a3515a53b5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 28 May 2013 12:30:07 +0100 Subject: [PATCH] curl: Increase block timeout. Signed-off-by: Richard W.M. Jones --- block/curl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/curl.c b/block/curl.c index 3e330b6..759f7cb 100644 --- a/block/curl.c +++ b/block/curl.c @@ -332,7 +332,7 @@ static CURLState *curl_init_state(BDRVCURLState *s) goto out; } curl_easy_setopt(state->curl, CURLOPT_URL, s->url); - curl_easy_setopt(state->curl, CURLOPT_TIMEOUT, 5); + curl_easy_setopt(state->curl, CURLOPT_TIMEOUT, 30); curl_easy_setopt(state->curl, CURLOPT_WRITEFUNCTION, (void *)curl_read_cb); curl_easy_setopt(state->curl, CURLOPT_WRITEDATA, (void *)state); curl_easy_setopt(state->curl, CURLOPT_PRIVATE, (void *)state); -- 1.8.2.1 --CdrF4e02JqNVZeln--