# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1195812346 -3600
# Node ID 50b0c2bad1e31abff47a9c3a98f9e14b5e29efe9
# Parent a479cec9721a58c537929206bc5190b22f709fc1
Adoption of changes to RegisteredProfile
Signed-off-by: Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
diff -r a479cec9721a -r 50b0c2bad1e3 src/Virt_ElementConformsToProfile.c
--- a/src/Virt_ElementConformsToProfile.c Fri Nov 23 11:05:44 2007 +0100
+++ b/src/Virt_ElementConformsToProfile.c Fri Nov 23 11:05:46 2007 +0100
@@ -133,9 +133,14 @@ static CMPIStatus elem_to_prof(const CMP
{
CMPIStatus s = {CMPI_RC_OK, NULL};
CMPIInstance *instance;
+ virConnectPtr conn = NULL;
+ struct reg_prof *candidate;
char *classname;
- struct reg_prof *candidate;
int i;
+
+ conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s);
+ if (conn == NULL)
+ goto out;
classname = class_base_name(CLASSNAME(ref));
if (classname == NULL) {
@@ -151,10 +156,12 @@ static CMPIStatus elem_to_prof(const CMP
instance = reg_prof_instance(_BROKER,
"/root/interop",
- NULL,
+ NULL,
+ conn,
candidate);
if (instance == NULL) {
- CMSetStatusWithChars(_BROKER, &s, CMPI_RC_ERR_FAILED,
+ CMSetStatusWithChars(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
"Can't create profile
instance.");
goto error;
}