2011/4/22 Eric Blake <eblake@xxxxxxxxxx>: > On 04/10/2011 07:39 AM, Matthias Bolte wrote: >> --- >> Âsrc/esx/esx_driver.c |  Â4 +- >> Âsrc/esx/esx_vi.c   | Â348 ++++++++++++++++++++++++++------------------------ >> Âsrc/esx/esx_vi.h   |  29 +++- >> Â3 files changed, 205 insertions(+), 176 deletions(-) >> >> +++ b/src/esx/esx_vi.h >> @@ -82,6 +82,7 @@ typedef enum _esxVI_APIVersion esxVI_APIVersion; >> Âtypedef enum _esxVI_ProductVersion esxVI_ProductVersion; >> Âtypedef enum _esxVI_Occurrence esxVI_Occurrence; >> Âtypedef struct _esxVI_ParsedHostCpuIdInfo esxVI_ParsedHostCpuIdInfo; >> +typedef struct _esxVI_CURL esxVI_CURL; >> Âtypedef struct _esxVI_Context esxVI_Context; >> Âtypedef struct _esxVI_Response esxVI_Response; >> Âtypedef struct _esxVI_Enumeration esxVI_Enumeration; >> @@ -142,16 +143,32 @@ struct _esxVI_ParsedHostCpuIdInfo { >> >> >> Â/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * >> + * CURL >> + */ >> + >> +struct _esxVI_CURL { >> +  ÂCURL *handle; >> +  ÂvirMutex lock; >> +  Âstruct curl_slist *headers; >> +  Âchar error[CURL_ERROR_SIZE]; >> +}; >> + >> +int esxVI_CURL_Alloc(esxVI_CURL **curl); >> +void esxVI_CURL_Free(esxVI_CURL **curl); >> +int esxVI_CURL_Connect(esxVI_CURL *curl, esxUtil_ParsedUri *parsedUri); >> +int esxVI_CURL_Download(esxVI_CURL *curl, const char *url, char **content); >> +int esxVI_CURL_Upload(esxVI_CURL *curl, const char *url, const char *content); > > A new type... > >> + >> + >> + >> +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * >>  * Context >>  */ >> >> Âstruct _esxVI_Context { >> +  ÂesxVI_CURL *curl; >>   Âchar *url; >>   Âchar *ipAddress; >> -  ÂCURL *curl_handle; >> -  Âstruct curl_slist *curl_headers; >> -  Âchar curl_error[CURL_ERROR_SIZE]; >> -  ÂvirMutex curl_lock; >>   Âchar *username; > > extracted from several fields of a larger type, and the rest of the > patch looks like mechanical fallout to the different naming to get to > the same fields. > > Looks like a reasonable refactoring, and nothing really caught my eye as > suspicious. > > ACK. > Thanks, pushed. Matthias -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list