Re: [Qemu-devel] [PATCH v5 05/11] curl: add timer to BDRVCURLState

2013-05-23 Thread Fam Zheng
On Thu, 05/23 15:55, Stefan Hajnoczi wrote: > On Thu, May 23, 2013 at 11:38:03AM +0800, Fam Zheng wrote: > > diff --git a/block/curl.c b/block/curl.c > > index fc464ad..4fd5bb9 100644 > > --- a/block/curl.c > > +++ b/block/curl.c > > @@ -89,6 +89,7 @@ typedef struct BDRVCURLState { > > QLIST_H

Re: [Qemu-devel] [PATCH v5 05/11] curl: add timer to BDRVCURLState

2013-05-23 Thread Stefan Hajnoczi
On Thu, May 23, 2013 at 11:38:03AM +0800, Fam Zheng wrote: > diff --git a/block/curl.c b/block/curl.c > index fc464ad..4fd5bb9 100644 > --- a/block/curl.c > +++ b/block/curl.c > @@ -89,6 +89,7 @@ typedef struct BDRVCURLState { > QLIST_HEAD(, CURLSockInfo) socks; > char *url; > size_t

[Qemu-devel] [PATCH v5 05/11] curl: add timer to BDRVCURLState

2013-05-22 Thread Fam Zheng
libcurl uses timer to manage ongoing sockets, it needs us to supply timer. This patch introduce QEMUTimer to BDRVCURLState and handles timeouts as libcurl expects (curl_multi_timer_cb sets given timeout value on the timer and curl_timer_cb calls curl_multi_socket_action on triggered). Signed-off-b