mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
ch_driver: Pass virCHDriverConfig to virCHMonitorNew
Pass virCHDriverConfig to VirCHMonitorNew instead of just stateDir so that the cfg can be used for any additional purposes. Signed-off-by: Purna Pavan Chandra Aekkaladevi <paekkaladevi@linux.microsoft.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
6ea6208f35
commit
13f964a2ef
@ -529,10 +529,11 @@ chMonitorCreateSocket(const char *socket_path)
|
||||
}
|
||||
|
||||
virCHMonitor *
|
||||
virCHMonitorNew(virDomainObj *vm, const char *socketdir)
|
||||
virCHMonitorNew(virDomainObj *vm, virCHDriverConfig *cfg)
|
||||
{
|
||||
g_autoptr(virCHMonitor) mon = NULL;
|
||||
g_autoptr(virCommand) cmd = NULL;
|
||||
const char *socketdir = cfg->stateDir;
|
||||
int socket_fd = 0;
|
||||
|
||||
if (virCHMonitorInitialize() < 0)
|
||||
|
@ -101,7 +101,7 @@ struct _virCHMonitor {
|
||||
virCHMonitorThreadInfo *threads;
|
||||
};
|
||||
|
||||
virCHMonitor *virCHMonitorNew(virDomainObj *vm, const char *socketdir);
|
||||
virCHMonitor *virCHMonitorNew(virDomainObj *vm, virCHDriverConfig *cfg);
|
||||
void virCHMonitorClose(virCHMonitor *mon);
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virCHMonitor, virCHMonitorClose);
|
||||
|
||||
|
@ -52,7 +52,7 @@ virCHProcessConnectMonitor(virCHDriver *driver,
|
||||
virCHMonitor *monitor = NULL;
|
||||
virCHDriverConfig *cfg = virCHDriverGetConfig(driver);
|
||||
|
||||
monitor = virCHMonitorNew(vm, cfg->stateDir);
|
||||
monitor = virCHMonitorNew(vm, cfg);
|
||||
|
||||
virObjectUnref(cfg);
|
||||
return monitor;
|
||||
|
Loading…
Reference in New Issue
Block a user