[PATCH] EC seg faults due to wrong CMPIBroker used in get_vsm_cap()
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1203733266 28800
# Node ID b950586612cfddcc119e0c0d2a53faaf06a1d8c9
# Parent 743b306e9bc680cab97c2afb60dfe9547e1d182c
EC seg faults due to wrong CMPIBroker used in get_vsm_cap().
Also, make sure function returns in case of error, and shorten error meesage since it spans a line.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 743b306e9bc6 -r b950586612cf src/Virt_VirtualSystemManagementCapabilities.c
--- a/src/Virt_VirtualSystemManagementCapabilities.c Fri Feb 22 09:51:07 2008 -0800
+++ b/src/Virt_VirtualSystemManagementCapabilities.c Fri Feb 22 18:21:06 2008 -0800
@@ -95,14 +95,16 @@ CMPIStatus get_vsm_cap(const CMPIBroker
goto out;
}
- inst = get_typed_instance(_BROKER,
+ inst = get_typed_instance(broker,
pfx_from_conn(conn),
"VirtualSystemManagementCapabilities",
NAMESPACE(ref));
- if (inst == NULL)
- cu_statusf(_BROKER, &s,
+ if (inst == NULL) {
+ cu_statusf(broker, &s,
CMPI_RC_ERR_FAILED,
- "Can't create VirtualSystemManagementCapabilities instance");
+ "Can't create instance for %s", CLASSNAME(ref));
+ goto out;
+ }
s = set_inst_properties(broker, inst);
16 years, 8 months
[PATCH] Enhance default setting of property CreationClassName
by Heidi Eckhart
# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1203673820 -3600
# Node ID e6f0c8edd6bf2fff9681195e3edc8c1d601fe78f
# Parent b9cbac659a845feda6f170fe23663ea7f187bf21
Enhance default setting of property CreationClassName
Not all CIM classes define the property CreationClassName.
This patch adds a check if CreationClassName is property of
the class and sets it only if there.
Signed-off-by: Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
diff -r b9cbac659a84 -r e6f0c8edd6bf libxkutil/misc_util.c
--- a/libxkutil/misc_util.c Fri Feb 22 10:34:21 2008 +0100
+++ b/libxkutil/misc_util.c Fri Feb 22 10:50:20 2008 +0100
@@ -236,6 +236,7 @@ CMPIInstance *get_typed_instance(const C
CMPIObjectPath *op;
CMPIInstance *inst = NULL;
CMPIStatus s;
+ CMPIData data;
new_cn = get_typed_class(refcn, base);
if (new_cn == NULL)
@@ -248,9 +249,11 @@ CMPIInstance *get_typed_instance(const C
inst = CMNewInstance(broker, op, &s);
if ((s.rc != CMPI_RC_OK) || CMIsNullObject(inst))
goto out;
-
- CMSetProperty(inst, "CreationClassName",
- (CMPIValue *)new_cn, CMPI_chars);
+
+ data = CMGetProperty(inst, "CreationClassName", &s);
+ if (s.rc == CMPI_RC_OK)
+ CMSetProperty(inst, "CreationClassName",
+ (CMPIValue *)new_cn, CMPI_chars);
out:
free(new_cn);
16 years, 8 months
Got indication on sfcb successfully, but still in watching status on Pegasus
by Guo Lian Yun
Hi,
I can get indication of Xen_ComputerSystemCreatedIndication successfully
after define a new domain,
which done by "python indication_tester.py
Xen_ComputerSystemCreateddIndication" on sfcb.
On Pegasus, we have to pass three arguments at least, right? Below is the
execution command:
"python indication_tester.py -u localhost:5988 -U root -P password
Xen_ComputerSystemDeletedIndication".
However, it's still in watching status, and I can't get any info for
several minutes.
Who knows why it is? Is there some mistake in my operation on Pegasus?
Thanks!
Best,
Regards
Daisy Guo Lian Yun
E-mail: yunguol(a)cn.ibm.com
IBM China Development Lab, Shanghai, China
TEL: (86)-21-61008057
16 years, 8 months
[PATCH] Enhance default setting of property CreationClassName
by Heidi Eckhart
# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1203595620 -3600
# Node ID 3c39412cd297e3ea3d152f6a2ca2119236290093
# Parent 6fffc34df9c9b5cd1915f1fdd9f196b1f12a2477
Enhance default setting of property CreationClassName
Not all CIM classes define the property CreationClassName.
This patch adds a check if CreationClassName is property of
the class and sets it only if there.
Signed-off-by: Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
diff -r 6fffc34df9c9 -r 3c39412cd297 libxkutil/misc_util.c
--- a/libxkutil/misc_util.c Thu Feb 21 12:55:13 2008 +0100
+++ b/libxkutil/misc_util.c Thu Feb 21 13:07:00 2008 +0100
@@ -236,6 +236,7 @@ CMPIInstance *get_typed_instance(const C
CMPIObjectPath *op;
CMPIInstance *inst = NULL;
CMPIStatus s;
+ CMPIData data;
new_cn = get_typed_class(refcn, base);
if (new_cn == NULL)
@@ -248,9 +249,11 @@ CMPIInstance *get_typed_instance(const C
inst = CMNewInstance(broker, op, &s);
if ((s.rc != CMPI_RC_OK) || CMIsNullObject(inst))
goto out;
-
- CMSetProperty(inst, "CreationClassName",
- (CMPIValue *)new_cn, CMPI_chars);
+
+ data = CMGetProperty(inst, "CreationClassName", &s);
+ if (s.rc ==CMPI_RC_OK)
+ CMSetProperty(inst, "CreationClassName",
+ (CMPIValue *)new_cn, CMPI_chars);
out:
free(new_cn);
16 years, 8 months
[PATCH] Make sure to set status in eo_parser_xml to avoid crash
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1203608641 28800
# Node ID 393e3ca977954e41883756bc8c1093ed20f2e601
# Parent c19e321766902af6dba29025be964d8d45537c51
Make sure to set status in eo_parser_xml to avoid crash
if the caller tries to print the error message.
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r c19e32176690 -r 393e3ca97795 eo_parser_xml.c
--- a/eo_parser_xml.c Wed Feb 13 07:45:33 2008 -0800
+++ b/eo_parser_xml.c Thu Feb 21 07:44:01 2008 -0800
@@ -327,7 +327,7 @@ static CMPIStatus parse_instance(const C
{
char *class = NULL;
xmlNode *child;
- CMPIStatus s;
+ CMPIStatus s = {CMPI_RC_OK, NULL};
CMPIObjectPath *op;
if (root->type != XML_ELEMENT_NODE) {
@@ -360,12 +360,18 @@ static CMPIStatus parse_instance(const C
op = CMNewObjectPath(broker, ns, class, &s);
if ((op == NULL) || (s.rc != CMPI_RC_OK)) {
CU_DEBUG("Unable to create path for %s:%s", ns, class);
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ "Unable to create path for %s:%s", ns, class);
goto out;
}
*inst = CMNewInstance(broker, op, &s);
if ((*inst == NULL) || (s.rc != CMPI_RC_OK)) {
CU_DEBUG("Unable to create inst for %s:%s", ns, class);
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ "Unable to create instance for %s:%s", ns, class);
goto out;
}
16 years, 8 months
[PATCH] Make sure to set status in eo_parser_xml to avoid crash
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1203540299 28800
# Node ID ff79f3c78309209c682bad229cde371ebeef2576
# Parent c19e321766902af6dba29025be964d8d45537c51
Make sure to set status in eo_parser_xml to avoid crash
if the caller tries to print the error message.
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r c19e32176690 -r ff79f3c78309 eo_parser_xml.c
--- a/eo_parser_xml.c Wed Feb 13 07:45:33 2008 -0800
+++ b/eo_parser_xml.c Wed Feb 20 12:44:59 2008 -0800
@@ -360,12 +360,18 @@ static CMPIStatus parse_instance(const C
op = CMNewObjectPath(broker, ns, class, &s);
if ((op == NULL) || (s.rc != CMPI_RC_OK)) {
CU_DEBUG("Unable to create path for %s:%s", ns, class);
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ "Unable to create path for %s:%s", ns, class);
goto out;
}
*inst = CMNewInstance(broker, op, &s);
if ((*inst == NULL) || (s.rc != CMPI_RC_OK)) {
CU_DEBUG("Unable to create inst for %s:%s", ns, class);
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ "Unable to create instance for %s:%s", ns, class);
goto out;
}
@@ -380,6 +386,10 @@ static CMPIStatus parse_instance(const C
CU_DEBUG("Unexpected node: %s\n", child->name);
}
}
+
+ cu_statusf(broker, &s,
+ CMPI_RC_OK,
+ "");
out:
free(class);
16 years, 8 months
arguments issue in indication_tester.py
by Guo Lian Yun
Hi,
There are four parameters in define xml of filter, handler and
subscription,
but only there are passes to them, that *sysname* is missed. On the former
version of libcmpiutil, only three parameters in their define method.
So I don't know what's the
original idea of it, three or four arguments?
Or it's just a minor mistake.
Below are some parts of code.
...
def filter_xml(name, type, ns, sysname):
...
def handler_xml(name, port, sysname):
...
def subscription_xml(name, sysname):
...
def dump_xml(name, typ, ns):
filter_str = filter_xml(name, typ, ns)
handler_str = handler_xml(name, 8000)
subscript_str = subscription_xml(name)
...
Also, I'm not sure of instances deletion order, which including filter,
handler
and subscription instance. They are created by filter, handler and
subscription order, and then deletion order it the same as created in
coding.
I'm not sure whether the subscription instance have to be deleted firstly.
Thanks!
Best,
Regards
Daisy Guo Lian Yun
E-mail: yunguol(a)cn.ibm.com
IBM China Development Lab, Shanghai, China
TEL: (86)-21-61008057
16 years, 8 months