[Libvirt-cim] [PATCH 09 of 12] Make SettingsDefineState use connect_by_classname()

Dan Smith danms at us.ibm.com
Mon Nov 19 16:53:00 UTC 2007


# HG changeset patch
# User Dan Smith <danms at us.ibm.com>
# Date 1195493466 28800
# Node ID ca32e4299b0944be44ec5bf9821a087857ca37a9
# Parent  c5a2fc3f7a6c13f19c06c528026d1dca2becba00
Make SettingsDefineState use connect_by_classname()

Signed-off-by: Dan Smith <danms at us.ibm.com>

diff -r c5a2fc3f7a6c -r ca32e4299b09 src/Virt_SettingsDefineState.c
--- a/src/Virt_SettingsDefineState.c	Mon Nov 19 09:28:21 2007 -0800
+++ b/src/Virt_SettingsDefineState.c	Mon Nov 19 09:31:06 2007 -0800
@@ -118,14 +118,14 @@ static CMPIStatus dev_to_rasd(const CMPI
 
 static CMPIInstance *_get_typed_device(char *id,
                                        int type,
-                                       const char *ns,
+                                       const CMPIObjectPath *ref,
                                        CMPIStatus *s)
 {
         virConnectPtr conn = NULL;
         CMPIInstance *dev = NULL;
         const char *typestr;
 
-        conn = lv_connect(_BROKER, s);
+        conn = connect_by_classname(_BROKER, CLASSNAME(ref), s);
         if (conn == NULL)
                 goto out;
 
@@ -147,7 +147,7 @@ static CMPIInstance *_get_typed_device(c
         dev = instance_from_devid(_BROKER,
                                   conn,
                                   id,
-                                  ns,
+                                  NAMESPACE(ref),
                                   device_type_from_classname(typestr));
  out:
         virConnectClose(conn);
@@ -181,7 +181,7 @@ static CMPIStatus rasd_to_dev(const CMPI
                 goto out;
         }
 
-        dev = _get_typed_device(id, type, NAMESPACE(ref), &s);
+        dev = _get_typed_device(id, type, ref, &s);
         if (dev == NULL)
                 goto out;
 
@@ -205,7 +205,7 @@ static CMPIStatus vs_to_vssd(const CMPIO
         CMPIInstance *vssd;
         CMPIStatus s;
 
-        conn = lv_connect(_BROKER, &s);
+        conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s);
         if (conn == NULL)
                 return s;
 
@@ -268,7 +268,7 @@ static CMPIStatus vssd_to_vs(const CMPIO
                 goto out;
         }
 
-        conn = lv_connect(_BROKER, &s);
+        conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s);
         if (conn == NULL)
                 goto out;
 




More information about the Libvirt-cim mailing list