|
From: Chris B. <buc...@us...> - 2012-11-01 15:56:01
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "SFCB - Small Footprint CIM Broker".
The branch, master has been updated
via 2440f3bb0a6faa9772d596c34d36328abad662fe (commit)
from 1023f4ec4b3049b2bf895c5bf88a410eeff23973 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2440f3bb0a6faa9772d596c34d36328abad662fe
Author: buccella <buc...@li...>
Date: Thu Nov 1 11:55:13 2012 -0400
[ 3582062 ] Various additional error checking
-----------------------------------------------------------------------
Summary of changes:
diff --git a/NEWS b/NEWS
index b5099bb..5630194 100644
--- a/NEWS
+++ b/NEWS
@@ -118,6 +118,7 @@ Bugs fixed:
- 3539569 Leaks in interopProvider
- 3574169 revert interop2 stageschema
- 3574936 --disable-debug still allocates trace variables
+- 3582062 Various additional error checking
Changes in 1.3.15
=================
diff --git a/brokerUpc.c b/brokerUpc.c
index 6e5fba1..2f95867 100644
--- a/brokerUpc.c
+++ b/brokerUpc.c
@@ -154,7 +154,12 @@ deliverIndication(const CMPIBroker * mb, const CMPIContext *ctx,
CMPI_uint64
#endif
);
- CBInvokeMethod(mb, ctx, op, "_deliver", in, NULL, &st);
+ /* 85507 filterId was NULL on interopProvider side; check it here */
+ if (&se->filterId)
+ CBInvokeMethod(mb,ctx,op,"_deliver",in,NULL,&st);
+ else
+ mlogf(M_ERROR,M_SHOW,"--- Failed to queue indication for delivery: missing filter\n");
+
CMRelease(op);
CMRelease(in);
}
diff --git a/instance.c b/instance.c
index 953fea4..c347b40 100644
--- a/instance.c
+++ b/instance.c
@@ -76,7 +76,7 @@ struct native_instance {
};
#ifdef HAVE_DEFAULT_PROPERTIES
-static void instFillDefaultProperties(struct native_instance *inst,
+static int instFillDefaultProperties(struct native_instance *inst,
const char *ns, const char *cn);
#endif
@@ -522,6 +522,12 @@ __ift_getObjectPath(const CMPIInstance *instance, CMPIStatus *rc)
mtx = memAlloc(MEM_TRACKED, sizeof(CMPI_MUTEX_TYPE), &dummy);
*mtx = Broker->xft->newMutex(0);
}
+ if (! *mtx) {
+ mlogf(M_ERROR, M_SHOW, "--- Could not get op for instance of %s; mutex creation failure\n", cn);
+ CMSetStatus(rc, CMPI_RC_ERR_FAILED);
+ return NULL;
+ }
+
Broker->xft->lockMutex(*mtx);
if (klt == NULL)
klt = UtilFactory->newHashTable(61,
@@ -931,7 +937,9 @@ internal_new_CMPIInstance(int mode, const CMPIObjectPath * cop,
#ifdef HAVE_DEFAULT_PROPERTIES
if (!override) {
- instFillDefaultProperties(&instance, ns, cn);
+ if (instFillDefaultProperties(&instance,ns,cn)) {
+ mlogf(M_ERROR, M_SHOW, "--- Could not fill default properties for instance of %ss; mutex creation failure\n", cn);
+ }
}
#endif
@@ -1120,7 +1128,7 @@ setInstanceLocalMode(int mode)
}
#ifdef HAVE_DEFAULT_PROPERTIES
-static void
+static int
instFillDefaultProperties(struct native_instance *inst,
const char *ns, const char *cn)
{
@@ -1137,6 +1145,9 @@ instFillDefaultProperties(struct native_instance *inst,
mtx = malloc(sizeof(CMPI_MUTEX_TYPE));
*mtx = Broker->xft->newMutex(0);
}
+ if (!*mtx) {
+ return -1;
+ }
Broker->xft->lockMutex(*mtx);
if (clt == NULL)
clt =
@@ -1181,6 +1192,7 @@ instFillDefaultProperties(struct native_instance *inst,
}
}
}
+ return 0;
}
#endif
hooks/post-receive
--
SFCB - Small Footprint CIM Broker
|