Re: [Qemu-block] [PATCH 4/7] curl: split curl_find_state/curl_init_state

2017-05-12 Thread Jeff Cody
On Wed, May 10, 2017 at 04:32:02PM +0200, Paolo Bonzini wrote: > If curl_easy_init fails, a CURLState is left with s->in_use = 1. Split > curl_init_state in two, so that we can distinguish the two failures and > call curl_clean_state if needed. > > While at it, simplify curl_find_state, removing

Re: [Qemu-block] [PATCH 4/7] curl: split curl_find_state/curl_init_state

2017-05-11 Thread Paolo Bonzini
On 10/05/2017 19:26, Max Reitz wrote: >> +if (curl_init_state(s, state) < 0) { >> +curl_clean_state(state); > > We could also initialize state to NULL and call curl_clean_state() under > out: if state != NULL. Then again, it would only save us two > curl_clean_state() instances... >

Re: [Qemu-block] [PATCH 4/7] curl: split curl_find_state/curl_init_state

2017-05-10 Thread Max Reitz
On 10.05.2017 16:32, Paolo Bonzini wrote: > If curl_easy_init fails, a CURLState is left with s->in_use = 1. Split > curl_init_state in two, so that we can distinguish the two failures and > call curl_clean_state if needed. > > While at it, simplify curl_find_state, removing a dummy loop. The >

[Qemu-block] [PATCH 4/7] curl: split curl_find_state/curl_init_state

2017-05-10 Thread Paolo Bonzini
If curl_easy_init fails, a CURLState is left with s->in_use = 1. Split curl_init_state in two, so that we can distinguish the two failures and call curl_clean_state if needed. While at it, simplify curl_find_state, removing a dummy loop. The aio_poll loop is moved to the sole caller that needs