From: Stefan Hajnoczi <stefanha@gmail.com>
To: Fam Zheng <famz@redhat.com>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH] curl: fix curl read
Date: Thu, 9 May 2013 08:41:11 +0200 [thread overview]
Message-ID: <20130509064111.GC1074@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1367568009-4900-1-git-send-email-famz@redhat.com>
On Fri, May 03, 2013 at 04:00:09PM +0800, Fam Zheng wrote:
> @@ -391,7 +427,12 @@ static QemuOptsList runtime_opts = {
> .type = QEMU_OPT_SIZE,
> .help = "Readahead size",
> },
> - { /* end of list */ }
> + {
> + .name = "ssl_no_cert",
> + .type = QEMU_OPT_BOOL,
> + .help = "SSL certificate check",
> + },
This new option should be in a separate patch.
> + if (!strncmp(s->url, "http://", strlen("http://")) && !s->accept_range) {
> + strncpy(state->errmsg, "Server not supporting range.", CURL_ERROR_SIZE);
> + goto out;
> + }
This check is unrelated to the API change and should be in a separate
patch.
> s->multi = curl_multi_init();
> - curl_multi_setopt( s->multi, CURLMOPT_SOCKETDATA, s);
> - curl_multi_setopt( s->multi, CURLMOPT_SOCKETFUNCTION, curl_sock_cb );
> - curl_multi_do(s);
> + if (!s->multi) {
> + goto out_noclean;
> + }
> + curl_multi_setopt(s->multi, CURLMOPT_SOCKETDATA, s);
> + curl_multi_setopt(s->multi, CURLMOPT_SOCKETFUNCTION, curl_sock_cb);
> + curl_multi_setopt(s->multi, CURLMOPT_TIMERDATA, s);
> + curl_multi_setopt(s->multi, CURLMOPT_TIMERFUNCTION, curl_multi_timer_cb);
> + curl_multi_socket_action(s->multi, CURL_SOCKET_TIMEOUT, 0, &running);
The timeout should be added in a separate patch.
> + cache = curl_find_cache(s, aio_base, aio_bytes);
> + if (cache) {
> + curl_complete_io(s, acb, cache);
> + return;
> }
What is the point of the cache? Can you split it into a separate patch?
> + /* Try to release some cache */
> + while (0 && s->cache_quota <= 0) {
while 0?
next prev parent reply other threads:[~2013-05-09 6:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-03 8:00 [Qemu-devel] [PATCH] curl: fix curl read Fam Zheng
2013-05-03 11:09 ` Stefan Hajnoczi
2013-05-03 11:23 ` Fam Zheng
2013-05-09 5:47 ` Stefan Hajnoczi
2013-05-09 6:41 ` Stefan Hajnoczi [this message]
2013-05-09 6:56 ` Fam Zheng
2013-05-09 15:16 ` Stefan Hajnoczi
2013-05-15 3:29 ` Fam Zheng
2013-05-15 7:46 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130509064111.GC1074@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).