Make sure virDomainSave/virDomainManagedSave reset id to -1

After successfull virDomainSave/virDomainManagedSave calls
the guest will no longer be active, so the domain ID must
be reset to -1

* daemon/remote_generator.pl: Special case virDomainSave &
  virDomainManagedSave for same reason as virDomainDestroy
This commit is contained in:
Daniel P. Berrange 2011-06-02 14:42:21 +01:00
parent 43917db3f9
commit 13488f55c5

View File

@ -1363,8 +1363,11 @@ elsif ($opt_k) {
print "\n"; print "\n";
} }
if ($call->{ProcName} eq "DomainDestroy") { if ($call->{ProcName} eq "DomainDestroy" ||
# SPECIAL: virDomainDestroy needs to reset the domain id explicitly $call->{ProcName} eq "DomainSave" ||
$call->{ProcName} eq "DomainManagedSave") {
# SPECIAL: virDomain{Destroy|Save|ManagedSave} need to reset
# the domain id explicitly on success
print " dom->id = -1;\n"; print " dom->id = -1;\n";
} }