From: Daniel P. Berrange Date: Thu, 2 Jun 2011 13:42:21 +0000 (+0100) Subject: Make sure virDomainSave/virDomainManagedSave reset id to -1 X-Git-Tag: v0.9.2~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13488f55c5f440580aaff312cbb4e5100494ac90;p=thirdparty%2Flibvirt.git 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 --- diff --git a/daemon/remote_generator.pl b/daemon/remote_generator.pl index e204b76699..632972c40a 100755 --- a/daemon/remote_generator.pl +++ b/daemon/remote_generator.pl @@ -1363,8 +1363,11 @@ elsif ($opt_k) { print "\n"; } - if ($call->{ProcName} eq "DomainDestroy") { - # SPECIAL: virDomainDestroy needs to reset the domain id explicitly + if ($call->{ProcName} eq "DomainDestroy" || + $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"; }