|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] Replace XendDomainInfo.setStoreChannel with XendDomainIn
# HG changeset patch
# User emellor@ewan
# Node ID 8462eff90433b0fbaaa6a15b1a151fdf7976e4cb
# Parent b75771a12f79bd6a9d65885b5a3fdb8e7e481f40
Replace XendDomainInfo.setStoreChannel with XendDomainInfo.closeStoreChannel.
setStoreChannel was only ever called with channel=None (implying that the
current channel would be closed) so the other code there was superfluous.
Signed-off-by: Ewan Mellor<ewan@xxxxxxxxxxxxx>
diff -r b75771a12f79 -r 8462eff90433 tools/python/xen/xend/XendCheckpoint.py
--- a/tools/python/xen/xend/XendCheckpoint.py Sat Sep 17 16:34:58 2005
+++ b/tools/python/xen/xend/XendCheckpoint.py Sat Sep 17 17:09:31 2005
@@ -83,7 +83,7 @@
if child.wait() != 0:
raise XendError("xc_save failed: %s" % lasterr)
- dominfo.setStoreChannel(None)
+ dominfo.closeStoreChannel()
xd.domain_destroy(dominfo.domid)
return None
diff -r b75771a12f79 -r 8462eff90433 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py Sat Sep 17 16:34:58 2005
+++ b/tools/python/xen/xend/XendDomainInfo.py Sat Sep 17 17:09:31 2005
@@ -348,15 +348,20 @@
self.store_mfn = ref
self.storeDom("store/ring-ref", ref)
- def setStoreChannel(self, channel):
- if self.store_channel and self.store_channel != channel:
- self.store_channel.close()
- self.store_channel = channel
- if channel:
- port = channel.port1
- else:
- port = None
- self.storeDom("store/port", None)
+
+ def closeStoreChannel(self):
+ """Close the store channel, if any. Nothrow guarantee."""
+
+ try:
+ if self.store_channel:
+ try:
+ self.store_channel.close()
+ self.removeDom("store/port")
+ finally:
+ self.store_channel = None
+ except Exception, exn:
+ log.exception(exn)
+
def setConsoleRef(self, ref):
self.console_mfn = ref
@@ -763,8 +768,7 @@
"""
self.state = STATE_VM_TERMINATED
self.release_devices()
- if self.store_channel:
- self.setStoreChannel(None)
+ self.closeStoreChannel()
if self.console_channel:
# notify processes using this console?
try:
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] Replace XendDomainInfo.setStoreChannel with XendDomainInfo.closeStoreChannel.,
Xen patchbot -unstable <=
|
Previous by Date: |
[Xen-changelog] Added getVCpuCount to XendDomainInfo and use that and getName, getDomain,, Xen patchbot -unstable |
Next by Date: |
[Xen-changelog] Remove unused restoreFromDB, saveToDB., Xen patchbot -unstable |
Previous by Thread: |
[Xen-changelog] Added getVCpuCount to XendDomainInfo and use that and getName, getDomain,, Xen patchbot -unstable |
Next by Thread: |
[Xen-changelog] Remove unused restoreFromDB, saveToDB., Xen patchbot -unstable |
Indexes: |
[Date]
[Thread]
[Top]
[All Lists] |
|
|
|
|