mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 07:05:28 +00:00
qemu: domain: Don't overwrite job type in private data
The code overwrote the internal job type and then fixed it back. Since the job type is not accessed in the code this does not make much sense. Use the temporary value instead. Signed-off-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
d2cd7215e7
commit
d33adb9173
@ -2062,15 +2062,14 @@ qemuDomainObjPrivateXMLFormatJob(virBufferPtr buf,
|
|||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
qemuDomainObjPrivatePtr priv)
|
qemuDomainObjPrivatePtr priv)
|
||||||
{
|
{
|
||||||
qemuDomainJob job;
|
qemuDomainJob job = priv->job.active;
|
||||||
|
|
||||||
job = priv->job.active;
|
|
||||||
if (!qemuDomainTrackJob(job))
|
if (!qemuDomainTrackJob(job))
|
||||||
priv->job.active = QEMU_JOB_NONE;
|
job = QEMU_JOB_NONE;
|
||||||
|
|
||||||
if (priv->job.active || priv->job.asyncJob) {
|
if (job || priv->job.asyncJob) {
|
||||||
virBufferAsprintf(buf, "<job type='%s' async='%s'",
|
virBufferAsprintf(buf, "<job type='%s' async='%s'",
|
||||||
qemuDomainJobTypeToString(priv->job.active),
|
qemuDomainJobTypeToString(job),
|
||||||
qemuDomainAsyncJobTypeToString(priv->job.asyncJob));
|
qemuDomainAsyncJobTypeToString(priv->job.asyncJob));
|
||||||
if (priv->job.phase) {
|
if (priv->job.phase) {
|
||||||
virBufferAsprintf(buf, " phase='%s'",
|
virBufferAsprintf(buf, " phase='%s'",
|
||||||
@ -2099,7 +2098,6 @@ qemuDomainObjPrivateXMLFormatJob(virBufferPtr buf,
|
|||||||
virBufferAddLit(buf, "</job>\n");
|
virBufferAddLit(buf, "</job>\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
priv->job.active = job;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user