Update of /cvsroot/sblim/sfcb
In directory vz-cvs-3.sog:/tmp/cvs-serv18367
Modified Files:
instance.c brokerUpc.c ChangeLog NEWS
Log Message:
[ 3582062 ] Various additional error checking
Index: NEWS
===================================================================
RCS file: /cvsroot/sblim/sfcb/NEWS,v
retrieving revision 1.719
retrieving revision 1.720
diff -u -d -r1.719 -r1.720
--- NEWS 24 Oct 2012 05:01:28 -0000 1.719
+++ NEWS 31 Oct 2012 01:40:09 -0000 1.720
@@ -20,6 +20,7 @@
- 3573507 CreateInstance for IndicationFilter doesn't accept DMTF:CQL
- 3574936 --disable-debug still allocates trace variables
- 3579637 SFCB should check ftok return code
+- 3582062 Various additional error checking
Changes in 1.3.15
=================
Index: brokerUpc.c
===================================================================
RCS file: /cvsroot/sblim/sfcb/brokerUpc.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- brokerUpc.c 19 Jul 2012 17:21:22 -0000 1.42
+++ brokerUpc.c 31 Oct 2012 01:40:09 -0000 1.43
@@ -148,7 +148,12 @@
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); /* 3497209 */
CMRelease(in);
}
Index: instance.c
===================================================================
RCS file: /cvsroot/sblim/sfcb/instance.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- instance.c 18 May 2012 22:57:47 -0000 1.55
+++ instance.c 31 Oct 2012 01:40:09 -0000 1.56
@@ -73,7 +73,7 @@
};
#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
@@ -485,6 +485,11 @@
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,
UtilHashTable_charKey | UtilHashTable_ignoreKeyCase);
@@ -860,7 +865,9 @@
#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
@@ -1019,7 +1026,7 @@
}
#ifdef HAVE_DEFAULT_PROPERTIES
-static void instFillDefaultProperties(struct native_instance *inst,
+static int instFillDefaultProperties(struct native_instance *inst,
const char * ns, const char * cn)
{
static CMPI_MUTEX_TYPE * mtx = NULL;
@@ -1035,6 +1042,9 @@
mtx = malloc(sizeof(CMPI_MUTEX_TYPE));
*mtx = Broker->xft->newMutex(0);
}
+ if (!*mtx) {
+ return -1;
+ }
Broker->xft->lockMutex(*mtx);
if (clt == NULL) clt =
UtilFactory->newHashTable(61,
@@ -1075,6 +1085,8 @@
}
}
}
+
+ return 0;
}
#endif
Index: ChangeLog
===================================================================
RCS file: /cvsroot/sblim/sfcb/ChangeLog,v
retrieving revision 1.804
retrieving revision 1.805
diff -u -d -r1.804 -r1.805
--- ChangeLog 24 Oct 2012 05:01:28 -0000 1.804
+++ ChangeLog 31 Oct 2012 01:40:09 -0000 1.805
@@ -1,3 +1,8 @@
+2012-10-30 Chris Buccella <buc...@li...>
+
+ * instance.c, brokerUpc.c:
+ [ 3582062 ] Various additional error checking
+
2012-10-24 Dave Heller <hel...@us...>
* msgqueue.c
|