[XEND] Prevent invalid arguments for destroy event channels.

Signed-off-by: Alastair Tse <atse@xensource.com>
This commit is contained in:
Alastair Tse committed 2007-01-24 13:54:37 +00:00
1 parent ffe6776819
commit 697a75a8dd
1 file changed
+7 -4
+7 -4
View File
@@ -1577,18 +1577,21 @@ class XendDomainInfo:
"""Create an event channel to the domain.
"""
try:
return xc.evtchn_alloc_unbound(domid=self.domid, remote_dom=0)
if self.domid != None:
return xc.evtchn_alloc_unbound(domid = self.domid,
remote_dom = 0)
except:
log.exception("Exception in alloc_unbound(%d)", self.domid)
log.exception("Exception in alloc_unbound(%s)", str(self.domid))
raise
def _resetChannels(self):
"""Reset all event channels in the domain.
"""
try:
return xc.evtchn_reset(dom=self.domid)
if self.domid != None:
return xc.evtchn_reset(dom = self.domid)
except:
log.exception("Exception in evtcnh_reset(%d)", self.domid)
log.exception("Exception in evtcnh_reset(%s)", str(self.domid))
raise
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.