diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index a62714e782..c769a517a9 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -570,7 +570,7 @@ vboxDomainSave(virDomainPtr dom, const char *path G_GNUC_UNUSED) if (openSessionForMachine(data, dom->uuid, &iid, &machine) < 0) goto cleanup; - rc = gVBoxAPI.UISession.OpenExisting(data, &iid, machine); + rc = gVBoxAPI.UISession.OpenExisting(data, machine); if (NS_FAILED(rc)) goto cleanup; @@ -2436,7 +2436,7 @@ static int vboxDomainSuspend(virDomainPtr dom) if (gVBoxAPI.machineStateChecker.Running(state)) { /* set state pause */ - gVBoxAPI.UISession.OpenExisting(data, &iid, machine); + gVBoxAPI.UISession.OpenExisting(data, machine); gVBoxAPI.UISession.GetConsole(data->vboxSession, &console); if (console) { gVBoxAPI.UIConsole.Pause(console); @@ -2487,7 +2487,7 @@ static int vboxDomainResume(virDomainPtr dom) if (gVBoxAPI.machineStateChecker.Paused(state)) { /* resume the machine here */ - gVBoxAPI.UISession.OpenExisting(data, &iid, machine); + gVBoxAPI.UISession.OpenExisting(data, machine); gVBoxAPI.UISession.GetConsole(data->vboxSession, &console); if (console) { gVBoxAPI.UIConsole.Resume(console); @@ -2548,7 +2548,7 @@ static int vboxDomainShutdownFlags(virDomainPtr dom, unsigned int flags) goto cleanup; } - gVBoxAPI.UISession.OpenExisting(data, &iid, machine); + gVBoxAPI.UISession.OpenExisting(data, machine); gVBoxAPI.UISession.GetConsole(data->vboxSession, &console); if (console) { gVBoxAPI.UIConsole.PowerButton(console); @@ -2596,7 +2596,7 @@ static int vboxDomainReboot(virDomainPtr dom, unsigned int flags) gVBoxAPI.UIMachine.GetState(machine, &state); if (gVBoxAPI.machineStateChecker.Running(state)) { - gVBoxAPI.UISession.OpenExisting(data, &iid, machine); + gVBoxAPI.UISession.OpenExisting(data, machine); gVBoxAPI.UISession.GetConsole(data->vboxSession, &console); if (console) { gVBoxAPI.UIConsole.Reset(console); @@ -2649,7 +2649,7 @@ static int vboxDomainDestroyFlags(virDomainPtr dom, unsigned int flags) goto cleanup; } - gVBoxAPI.UISession.OpenExisting(data, &iid, machine); + gVBoxAPI.UISession.OpenExisting(data, machine); gVBoxAPI.UISession.GetConsole(data->vboxSession, &console); if (console) { gVBoxAPI.UIConsole.PowerDown(console); @@ -4234,7 +4234,7 @@ vboxDomainAttachDeviceImpl(virDomainPtr dom, if (gVBoxAPI.machineStateChecker.Running(state) || gVBoxAPI.machineStateChecker.Paused(state)) { - rc = gVBoxAPI.UISession.OpenExisting(data, &iid, machine); + rc = gVBoxAPI.UISession.OpenExisting(data, machine); } else { rc = gVBoxAPI.UISession.Open(data, machine); } @@ -4353,7 +4353,7 @@ static int vboxDomainDetachDevice(virDomainPtr dom, const char *xml) if (gVBoxAPI.machineStateChecker.Running(state) || gVBoxAPI.machineStateChecker.Paused(state)) { - rc = gVBoxAPI.UISession.OpenExisting(data, &iid, machine); + rc = gVBoxAPI.UISession.OpenExisting(data, machine); } else { rc = gVBoxAPI.UISession.Open(data, machine); } @@ -5404,7 +5404,7 @@ vboxDomainSnapshotCreateXML(virDomainPtr dom, } if (gVBoxAPI.machineStateChecker.Online(state)) { - rc = gVBoxAPI.UISession.OpenExisting(data, &domiid, machine); + rc = gVBoxAPI.UISession.OpenExisting(data, machine); } else { rc = gVBoxAPI.UISession.Open(data, machine); } @@ -7305,7 +7305,7 @@ vboxDomainScreenshot(virDomainPtr dom, } - rc = gVBoxAPI.UISession.OpenExisting(data, &iid, machine); + rc = gVBoxAPI.UISession.OpenExisting(data, machine); if (NS_SUCCEEDED(rc)) { rc = gVBoxAPI.UISession.GetConsole(data->vboxSession, &console); if (NS_SUCCEEDED(rc) && console) { @@ -7722,7 +7722,7 @@ vboxDomainSendKey(virDomainPtr dom, if (openSessionForMachine(data, dom->uuid, &iid, &machine) < 0) goto cleanup; - rc = gVBoxAPI.UISession.OpenExisting(data, &iid, machine); + rc = gVBoxAPI.UISession.OpenExisting(data, machine); if (NS_FAILED(rc)) { virReportError(VIR_ERR_OPERATION_FAILED, diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index 3fbdf80aba..7d3431208b 100644 --- a/src/vbox/vbox_tmpl.c +++ b/src/vbox/vbox_tmpl.c @@ -1067,7 +1067,7 @@ _sessionOpen(struct _vboxDriver *data, IMachine *machine) } static nsresult -_sessionOpenExisting(struct _vboxDriver *data, vboxIID *iid G_GNUC_UNUSED, IMachine *machine) +_sessionOpenExisting(struct _vboxDriver *data, IMachine *machine) { return machine->vtbl->LockMachine(machine, data->vboxSession, LockType_Shared); } diff --git a/src/vbox/vbox_uniformed_api.h b/src/vbox/vbox_uniformed_api.h index 10f58a2fe7..b5a71a338c 100644 --- a/src/vbox/vbox_uniformed_api.h +++ b/src/vbox/vbox_uniformed_api.h @@ -228,7 +228,7 @@ typedef struct { /* Functions for ISession */ typedef struct { nsresult (*Open)(struct _vboxDriver *driver, IMachine *machine); - nsresult (*OpenExisting)(struct _vboxDriver *driver, vboxIID *iid, IMachine *machine); + nsresult (*OpenExisting)(struct _vboxDriver *driver, IMachine *machine); nsresult (*GetConsole)(ISession *session, IConsole **console); nsresult (*GetMachine)(ISession *session, IMachine **machine); nsresult (*Close)(ISession *session);