# HG changeset patch
# User Chip Vincent <cvincent(a)us.ibm.com>
# Date 1292947301 18000
# Node ID 92459d48d4128e0b569eb1c0d489bc41485545c8
# Parent d7237a0fcc8a765d8a9a92bb64792837c9f33325
Update indication providers to the std_indication interface change
introduced in libcmpiutil f967d9432f31.
This fix is needed to build libvirt-cim with the latest
libcmpiutil-devel headers. There will be a small patch
coming for std_indication.h shortly to ensure 0 warnings.
Signed-off-by: Chip Vincent <cvincent(a)us.ibm.com>
diff -r d7237a0fcc8a -r 92459d48d412 src/Virt_ComputerSystemIndication.c
--- a/src/Virt_ComputerSystemIndication.c Tue Dec 21 11:00:57 2010
-0500
+++ b/src/Virt_ComputerSystemIndication.c Tue Dec 21 11:01:41 2010
-0500
@@ -787,12 +787,13 @@
static CMPIStatus raise_indication(const CMPIBroker *broker,
const CMPIContext *ctx,
+ CMPIObjectPath *ref,
const CMPIInstance *ind)
{
CMPIStatus s = {CMPI_RC_OK, NULL};
CMPIInstance *prev_inst;
CMPIInstance *src_inst;
- CMPIObjectPath *ref = NULL;
+ CMPIObjectPath *_ref = NULL;
struct std_indication_ctx *_ctx = NULL;
struct ind_args *args = NULL;
char *prefix = NULL;
@@ -809,7 +810,7 @@
if (s.rc != CMPI_RC_OK || CMIsNullObject(prev_inst))
goto out;
- ref = CMGetObjectPath(prev_inst, &s);
+ _ref = CMGetObjectPath(prev_inst, &s);
if (s.rc != CMPI_RC_OK) {
cu_statusf(broker, &s,
CMPI_RC_ERR_FAILED,
@@ -819,10 +820,10 @@
/* FIXME: This is a Pegasus work around. Pegsus loses the
namespace
when an ObjectPath is pulled from an instance */
- if (STREQ(NAMESPACE(ref), ""))
- CMSetNameSpace(ref, "root/virt");
+ if (STREQ(NAMESPACE(_ref), ""))
+ CMSetNameSpace(_ref, "root/virt");
- s = get_domain_by_ref(broker, ref, &src_inst);
+ s = get_domain_by_ref(broker, _ref, &src_inst);
if (s.rc != CMPI_RC_OK || CMIsNullObject(src_inst))
goto out;
@@ -847,8 +848,8 @@
goto out;
}
- args->ns = strdup(NAMESPACE(ref));
- args->classname = strdup(CLASSNAME(ref));
+ args->ns = strdup(NAMESPACE(_ref));
+ args->classname = strdup(CLASSNAME(_ref));
args->_ctx = _ctx;
prefix = class_prefix_name(args->classname);
diff -r d7237a0fcc8a -r 92459d48d412
src/Virt_ResourceAllocationSettingDataIndication.c
--- a/src/Virt_ResourceAllocationSettingDataIndication.c Tue Dec
21 11:00:57 2010 -0500
+++ b/src/Virt_ResourceAllocationSettingDataIndication.c Tue Dec
21 11:01:41 2010 -0500
@@ -68,12 +68,13 @@
static CMPIStatus raise_indication(const CMPIBroker *broker,
const CMPIContext *ctx,
+ CMPIObjectPath *ref,
const CMPIInstance *ind)
{
struct std_indication_ctx *_ctx = NULL;
CMPIStatus s = {CMPI_RC_OK, NULL};
struct ind_args *args = NULL;
- CMPIObjectPath *ref = NULL;
+ CMPIObjectPath *_ref = NULL;
_ctx = malloc(sizeof(struct std_indication_ctx));
if (_ctx == NULL) {
@@ -96,8 +97,8 @@
goto out;
}
- ref = CMGetObjectPath(ind, &s);
- if (ref == NULL) {
+ _ref = CMGetObjectPath(ind, &s);
+ if (_ref == NULL) {
cu_statusf(broker, &s,
CMPI_RC_ERR_FAILED,
"Got a null object path");
@@ -108,14 +109,14 @@
when an ObjectPath is pulled from an instance */
- CMSetNameSpace(ref, "root/virt");
- args->ns = strdup(NAMESPACE(ref));
- args->classname = strdup(CLASSNAME(ref));
+ CMSetNameSpace(_ref, "root/virt");
+ args->ns = strdup(NAMESPACE(_ref));
+ args->classname = strdup(CLASSNAME(_ref));
args->_ctx = _ctx;
/* This is a workaround for Pegasus, it loses its objectpath by
CMGetObjectPath. So set it back. */
- ind->ft->setObjectPath((CMPIInstance *)ind, ref);
+ ind->ft->setObjectPath((CMPIInstance *)ind, _ref);
s = stdi_deliver(broker, ctx, args, (CMPIInstance *)ind);
if (s.rc == CMPI_RC_OK) {
--
Chip Vincent
Open Virtualization, Linux Technology Center
IBM Systems & Technology Group
phone: 919-254-4482, T/L 444-4482
email: cvincent(a)us.ibm.com