libxl: conf: move default keepalive settings to libxlDriverConfigNew

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>
This commit is contained in:
Ján Tomko 2020-02-22 13:02:18 +01:00
parent 43773d48e6
commit af0d94468c
1 changed files with 4 additions and 4 deletions

View 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.
*/