WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Merge

# HG changeset patch
# User Stefano Stabellini <sstabellini@xxxxxxxxxxxxx>
# Date 1277219399 -3600
# Node ID ce4e60aa1281883bf759e259081fd807a997c9b6
# Parent  02f26e24e9ab72cae9025f026230f259518413d2
# Parent  9da3abe88c90bd8ec48963a9ec537a8871e266db
Merge
---
 tools/python/xen/lowlevel/xc/xc.c       |    3 ++-
 tools/python/xen/xend/XendDomainInfo.py |   10 +++++-----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff -r 02f26e24e9ab -r ce4e60aa1281 tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Tue Jun 22 16:05:56 2010 +0100
+++ b/tools/python/xen/lowlevel/xc/xc.c Tue Jun 22 16:09:59 2010 +0100
@@ -72,7 +72,8 @@ static PyObject *pyxc_error_to_exception
     else
         pyerr = Py_BuildValue("(is)", err->code, desc);
 
-    xc_clear_last_error(xch);
+    if (xch)
+        xc_clear_last_error(xch);
 
     if ( pyerr != NULL )
     {
diff -r 02f26e24e9ab -r ce4e60aa1281 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Tue Jun 22 16:05:56 2010 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py   Tue Jun 22 16:09:59 2010 +0100
@@ -833,17 +833,17 @@ class XendDomainInfo:
         @type  dev_config: SXP object (parsed config)
         """
         log.debug("XendDomainInfo.device_create: %s" % 
scrub_password(dev_config))
-        dev_type = sxp.name(dev_config)
-        dev_uuid = self.info.device_add(dev_type, cfg_sxp = dev_config)
-        dev_config_dict = self.info['devices'][dev_uuid][1]
-        log.debug("XendDomainInfo.device_create: %s" % 
scrub_password(dev_config_dict))
-
         if dev_type == 'vif':
             for x in dev_config:
                 if x != 'vif' and x[0] == 'mac':
                     if not re.match('^([0-9a-f]{2}:){5}[0-9a-f]{2}$', x[1], 
re.I):
                         log.error("Virtual network interface creation error - 
invalid MAC Address entered: %s", x[1])
                         raise VmError("Cannot create a new virtual network 
interface - MAC address is not valid!");
+
+        dev_type = sxp.name(dev_config)
+        dev_uuid = self.info.device_add(dev_type, cfg_sxp = dev_config)
+        dev_config_dict = self.info['devices'][dev_uuid][1]
+        log.debug("XendDomainInfo.device_create: %s" % 
scrub_password(dev_config_dict))
 
         if self.domid is not None:
             try:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>