Re: [Qemu-devel] [PATCH v5 01/11] curl: introduce CURLSockInfo to BDRVCURLState.

2013-05-23 Thread Stefan Hajnoczi
On Thu, May 23, 2013 at 11:37:59AM +0800, Fam Zheng wrote: > @@ -90,7 +98,16 @@ static int curl_aio_flush(void *opaque); > static int curl_sock_cb(CURL *curl, curl_socket_t fd, int action, > void *s, void *sp) > { > +BDRVCURLState *bs = s; bs is used for BlockDriverS

[Qemu-devel] [PATCH v5 01/11] curl: introduce CURLSockInfo to BDRVCURLState.

2013-05-22 Thread Fam Zheng
We use socket provided by curl in the driver. Libcurl multi interface has option CURLMOPT_SOCKETFUNCTION for socket. Per man 3 curl_multi_setopt: ... CURLMOPT_SOCKETFUNCTION Pass a pointer to a function matching the curl_socket_callback prototype. The curl_multi_socket_action(3)