]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virDriverFeatureIsGlobal: Handle VIR_DRV_FEATURE_PROGRAM_KEEPALIVE
authorPeter Krempa <pkrempa@redhat.com>
Wed, 16 Feb 2022 12:38:56 +0000 (13:38 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 17 Feb 2022 12:15:46 +0000 (13:15 +0100)
keepalive is a RPC feature, drivers must say that it's not supported.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
src/driver.c

index b45040008482d5c308ea1d7096a2ba423efccc1f..6bebfeba58477fbe56072317086fae7fad54708e 100644 (file)
@@ -342,6 +342,9 @@ virDriverFeatureIsGlobal(virDrvFeature feat,
      * implementation must return 0, so that the return value properly reflects
      * whether we are going through the remote driver */
     case VIR_DRV_FEATURE_REMOTE:
+    /* keepalive is handled at RPC level, driver implementations must always
+     * return 0, to signal that direct/embedded use doesn't use keepalive */
+    case VIR_DRV_FEATURE_PROGRAM_KEEPALIVE:
         *supported = 0;
         return true;
 
@@ -357,7 +360,6 @@ virDriverFeatureIsGlobal(virDrvFeature feat,
     case VIR_DRV_FEATURE_MIGRATION_PARAMS:
     case VIR_DRV_FEATURE_MIGRATION_DIRECT:
     case VIR_DRV_FEATURE_MIGRATION_V1:
-    case VIR_DRV_FEATURE_PROGRAM_KEEPALIVE:
     case VIR_DRV_FEATURE_REMOTE_CLOSE_CALLBACK:
     case VIR_DRV_FEATURE_REMOTE_EVENT_CALLBACK:
     default: