]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
esx: Fix build when libcurl debug is enabled
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>
Sat, 11 Aug 2018 14:39:29 +0000 (11:39 -0300)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 13 Aug 2018 19:44:33 +0000 (21:44 +0200)
When building libvirt with libcurl debug enabled (with
ESX_VI__CURL__ENABLE_DEBUG_OUTPUT set), the message bellow pops up:

make[3]: Entering directory '/mnt/data/gitroot/libvirt/src'
  CC       esx/libvirt_driver_esx_la-esx_vi.lo
esx/esx_vi.c: In function 'esxVI_CURL_Debug':
esx/esx_vi.c:191:5: error: enumeration value 'CURLINFO_SSL_DATA_IN' not handled in switch [-Werror=switch-enum]
     switch (type) {
     ^~~~~~
esx/esx_vi.c:191:5: error: enumeration value 'CURLINFO_SSL_DATA_OUT' not handled in switch [-Werror=switch-enum]
esx/esx_vi.c:191:5: error: enumeration value 'CURLINFO_END' not handled in switch [-Werror=switch-enum]

Our build requires at least libcurl 7.18.0, which is pretty stable since
it was release in 2008. Fix this problem by handling the mentioned enums
in the code.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/esx/esx_vi.c

index a816c3a4f98a4edbd3f188d665a790eb71619766..7e8a17431308269f3e9d42b8066b157776168038 100644 (file)
@@ -205,13 +205,19 @@ esxVI_CURL_Debug(CURL *curl ATTRIBUTE_UNUSED, curl_infotype type,
         break;
 
       case CURLINFO_DATA_IN:
+      case CURLINFO_SSL_DATA_IN:
         VIR_DEBUG("CURLINFO_DATA_IN [[[[%s]]]]", buffer);
         break;
 
       case CURLINFO_DATA_OUT:
+      case CURLINFO_SSL_DATA_OUT:
         VIR_DEBUG("CURLINFO_DATA_OUT [[[[%s]]]]", buffer);
         break;
 
+      case CURLINFO_END:
+        VIR_DEBUG("CURLINFO_END [[[[%s]]]]", buffer);
+        break;
+
       default:
         VIR_DEBUG("unknown");
         break;