From: Michael Chase-S. <mc...@us...> - 2011-11-23 18:22:18
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv22470 Modified Files: ChangeLog NEWS indCIMXMLHandler.c instance.c instance.h interopProvider.c Log Message: [ 3433733 ] CreationClassNames should be supplied Index: instance.c =================================================================== RCS file: /cvsroot/sblim/sfcb/instance.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- instance.c 16 Jun 2010 22:48:21 -0000 1.52 +++ instance.c 23 Nov 2011 18:22:16 -0000 1.53 @@ -956,6 +956,23 @@ } #endif +/* + Set the CreationClassName and SystemCreationClassName + According to DSP1001, these need not be specified by the client + and should be ignored if provided. +*/ +void +setCCN(CMPIObjectPath * cop, + CMPIInstance *ci, + const char * sccn) +{ + CMPIString* ccn = CMGetClassName(cop, NULL); + CMAddKey(cop, "creationclassname", CMGetCharPtr(ccn), CMPI_chars); + CMSetProperty(ci,"creationclassname", CMGetCharPtr(ccn), CMPI_chars); + CMAddKey(cop, "systemcreationclassname", sccn, CMPI_chars); + CMSetProperty(ci,"systemcreationclassname", sccn, CMPI_chars); +} + /****************************************************************************/ /*** Local Variables: ***/ Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.700 retrieving revision 1.701 diff -u -d -r1.700 -r1.701 --- ChangeLog 23 Nov 2011 03:24:00 -0000 1.700 +++ ChangeLog 23 Nov 2011 18:22:16 -0000 1.701 @@ -1,3 +1,8 @@ +2011-11-23 Michael Chase-Salerno <br...@li...> + + * interopProvider.c, indCIMXMLHandler.c, instance.c, instance.h: + [ 3433733 ] CreationClassNames should be supplied + 2011-11-22 Michael Chase-Salerno <br...@li...> * cimXmlParser.c, control.c, httpAdapter.c, sfcb.cfg.pre.in: Index: interopProvider.c =================================================================== RCS file: /cvsroot/sblim/sfcb/interopProvider.c,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- interopProvider.c 26 Aug 2011 02:02:18 -0000 1.47 +++ interopProvider.c 23 Nov 2011 18:22:16 -0000 1.48 @@ -843,20 +843,7 @@ } else if (isa(nss, cns, "cim_indicationfilter")) { - CMPIString *ccn = ciLocal->ft->getProperty(ciLocal, "creationclassname", - &st).value.string; - if (CMIsNullObject(ccn)) { - setStatus(&st, CMPI_RC_ERR_FAILED, - "CreationClassName property not found"); - _SFCB_RETURN(st); - } - CMPIString *sccn = ciLocal->ft->getProperty(ciLocal, "systemcreationclassname", - &st).value.string; - if (CMIsNullObject(sccn)) { - setStatus(&st, CMPI_RC_ERR_FAILED, - "SystemCreationClassName property not found"); - _SFCB_RETURN(st); - } + setCCN(copLocal,ciLocal,"CIM_ComputerSystem"); QLStatement *qs=NULL; int rc,i,n,m; Index: instance.h =================================================================== RCS file: /cvsroot/sblim/sfcb/instance.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- instance.h 11 May 2010 21:34:55 -0000 1.3 +++ instance.h 23 Nov 2011 18:22:16 -0000 1.4 @@ -25,5 +25,6 @@ const char *instGetClassName(CMPIInstance * ci); const char *instGetNameSpace(CMPIInstance * ci); CMPIStatus filterFlagProperty(CMPIInstance* ci, const char* id); +void setCCN(CMPIObjectPath * cop, CMPIInstance *ci, const char * sccn); #endif Index: indCIMXMLHandler.c =================================================================== RCS file: /cvsroot/sblim/sfcb/indCIMXMLHandler.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- indCIMXMLHandler.c 23 Aug 2011 00:08:21 -0000 1.39 +++ indCIMXMLHandler.c 23 Nov 2011 18:22:16 -0000 1.40 @@ -318,20 +318,7 @@ CMPIObjectPath* copLocal = CMClone(cop, NULL); memLinkObjectPath(copLocal); - CMPIString *ccn = ciLocal->ft->getProperty(ciLocal, "creationclassname", - &st).value.string; - if (CMIsNullObject(ccn)) { - setStatus(&st, CMPI_RC_ERR_FAILED, - "CreationClassName property not found"); - _SFCB_RETURN(st); - } - CMPIString *sccn = ciLocal->ft->getProperty(ciLocal, "systemcreationclassname", - &st).value.string; - if (CMIsNullObject(sccn)) { - setStatus(&st, CMPI_RC_ERR_FAILED, - "SystemCreationClassName property not found"); - _SFCB_RETURN(st); - } + setCCN(copLocal,ciLocal,"CIM_ComputerSystem"); CMPIString *sysname=ciLocal->ft->getProperty(ciLocal,"SystemName",&st).value.string; if (sysname == NULL || sysname->hdl == NULL) { Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.624 retrieving revision 1.625 diff -u -d -r1.624 -r1.625 --- NEWS 23 Nov 2011 03:24:00 -0000 1.624 +++ NEWS 23 Nov 2011 18:22:16 -0000 1.625 @@ -6,6 +6,7 @@ - 3367333 New entry point for authentication library - 3367332 RHOST Support for PAM - 3435778 Preserve leading/trailing whitespace in values +- 3433733 CreationClassNames should be supplied Bugs fixed: |