]> xenbits.xensource.com Git - libvirt.git/commitdiff
libxl: conf: move default keepalive settings to libxlDriverConfigNew
authorJán Tomko <jtomko@redhat.com>
Sat, 22 Feb 2020 12:02:18 +0000 (13:02 +0100)
committerJán Tomko <jtomko@redhat.com>
Tue, 25 Feb 2020 11:05:00 +0000 (12:05 +0100)
These hardcoded defaults do not need to be read from
the file. Move them out of libxlDriverConfigLoadFile.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
src/libxl/libxl_conf.c

index 56deca7b7c69bb36ee26480400920211309cbdb2..9c722342ba6f9cc6729b956c74c4f68a045f94ab 100644 (file)
@@ -1763,6 +1763,10 @@ libxlDriverConfigNew(void)
         goto error;
     cfg->firmwares[cfg->nfirmwares - 1]->name = g_strdup(LIBXL_FIRMWARE_DIR "/hvmloader");
 
+    /* defaults for keepalive messages */
+    cfg->keepAliveInterval = 5;
+    cfg->keepAliveCount = 5;
+
     return cfg;
 
  error:
@@ -1786,10 +1790,6 @@ int libxlDriverConfigLoadFile(libxlDriverConfigPtr cfg,
 {
     g_autoptr(virConf) conf = NULL;
 
-    /* defaults for keepalive messages */
-    cfg->keepAliveInterval = 5;
-    cfg->keepAliveCount = 5;
-
     /* Check the file is readable before opening it, otherwise
      * libvirt emits an error.
      */