You can subscribe to this list here.
2005 |
Jan
|
Feb
(1) |
Mar
(45) |
Apr
(150) |
May
(145) |
Jun
(150) |
Jul
(79) |
Aug
(313) |
Sep
(160) |
Oct
(309) |
Nov
(115) |
Dec
(60) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(160) |
Feb
(144) |
Mar
(127) |
Apr
(48) |
May
(102) |
Jun
(54) |
Jul
(245) |
Aug
(94) |
Sep
(152) |
Oct
(162) |
Nov
(166) |
Dec
(740) |
2007 |
Jan
(752) |
Feb
(437) |
Mar
(328) |
Apr
(373) |
May
(569) |
Jun
(399) |
Jul
(369) |
Aug
(627) |
Sep
(100) |
Oct
(306) |
Nov
(166) |
Dec
(282) |
2008 |
Jan
(68) |
Feb
(145) |
Mar
(180) |
Apr
(160) |
May
(277) |
Jun
(229) |
Jul
(1188) |
Aug
(51) |
Sep
(97) |
Oct
(99) |
Nov
(95) |
Dec
(170) |
2009 |
Jan
(39) |
Feb
(73) |
Mar
(120) |
Apr
(121) |
May
(104) |
Jun
(262) |
Jul
(57) |
Aug
(171) |
Sep
(131) |
Oct
(88) |
Nov
(64) |
Dec
(83) |
2010 |
Jan
(55) |
Feb
(67) |
Mar
(124) |
Apr
(64) |
May
(130) |
Jun
(75) |
Jul
(164) |
Aug
(64) |
Sep
(44) |
Oct
(17) |
Nov
(43) |
Dec
(31) |
2011 |
Jan
(21) |
Feb
(10) |
Mar
(43) |
Apr
(46) |
May
(52) |
Jun
(71) |
Jul
(7) |
Aug
(16) |
Sep
(51) |
Oct
(14) |
Nov
(33) |
Dec
(15) |
2012 |
Jan
(12) |
Feb
(61) |
Mar
(129) |
Apr
(76) |
May
(70) |
Jun
(52) |
Jul
(29) |
Aug
(41) |
Sep
(32) |
Oct
(23) |
Nov
(38) |
Dec
(26) |
2013 |
Jan
(35) |
Feb
(37) |
Mar
(51) |
Apr
(15) |
May
(52) |
Jun
(15) |
Jul
(23) |
Aug
(21) |
Sep
(46) |
Oct
(69) |
Nov
(57) |
Dec
(26) |
2014 |
Jan
(5) |
Feb
(13) |
Mar
(17) |
Apr
(1) |
May
(5) |
Jun
|
Jul
(2) |
Aug
(2) |
Sep
(1) |
Oct
(16) |
Nov
(8) |
Dec
(4) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
(4) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Dave H. <hel...@us...> - 2013-02-20 15:48:32
|
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 72f7aae5e0a1a5935f1015bbb14dca46df0e6637 (commit) from 06f04db7d5038d81bc73c67ffa0e9e603410bb0e (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 72f7aae5e0a1a5935f1015bbb14dca46df0e6637 Author: Dave Heller <hel...@us...> Date: Wed Feb 20 10:44:22 2013 -0500 [#2463] getClass does not expose method information for localconnect ----------------------------------------------------------------------- Summary of changes: NEWS | 1 + constClass.c | 231 ++++++++++++++++++++++++++++++++++++++++++++++++ constClass.h | 26 ++++++ test/localtests/show.c | 122 +++++++++++++++++++++++++- 4 files changed, 379 insertions(+), 1 deletions(-) diff --git a/NEWS b/NEWS index c2ae03f..3782ea7 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,7 @@ New features: - 3599160 Add sfcbproc utility - 3601943 ObjectImpl unit test - 2766931 Property filters for interop and interopserver providers +- 2463 getClass does not expose method information for localconnect Bugs fixed: - 3599526 segfault during ecn with classProviderSf diff --git a/constClass.c b/constClass.c index d195bfc..a483255 100644 --- a/constClass.c +++ b/constClass.c @@ -259,6 +259,72 @@ getQualifierCount(CMPIConstClass * cc, CMPIStatus *rc) } CMPIData +internalGetMethQualAt(CMPIConstClass * cc, CMPICount m, CMPICount i, + CMPIString **name, CMPIStatus *rc) +{ + ClClass *cls = (ClClass *) cc->hdl; + char *n; + CMPIData rv = { 0, CMPI_notFound, {0} }; + + ClMethod *mthd = (ClMethod *) ClObjectGetClSection(&cls->hdr, &cls->methods); + if (m > cls->methods.used) + return rv; + mthd = mthd + m; + + if (ClClassGetMethQualifierAt(cls, mthd, i, &rv, name ? &n : NULL)) { + if (rc) + CMSetStatus(rc, CMPI_RC_ERR_NOT_FOUND); + if (name) + *name = sfcb_native_new_CMPIString(NULL, NULL, 0); + return rv; + } + if (rv.type == CMPI_chars) { + rv.value.string = sfcb_native_new_CMPIString(ClObjectGetClString + (&cls->hdr, + (ClString *) & rv.value. + chars), NULL, 0); + rv.type = CMPI_string; + } + if (name) { + *name = sfcb_native_new_CMPIString(n, NULL, 0); + } + if (rc) + CMSetStatus(rc, CMPI_RC_OK); + + return rv; +} + +CMPIData +internalGetMethParamAt(CMPIConstClass * cc, CMPICount m, CMPICount i, + CMPIString **name, CMPIStatus *rc) +{ + ClClass *cls = (ClClass *) cc->hdl; + char *n; + CMPIData rv = { 0, CMPI_notFound, {0} }; + CMPIParameter p; + + ClMethod *mthd = (ClMethod *) ClObjectGetClSection(&cls->hdr, &cls->methods); + if (m > cls->methods.used) + return rv; + mthd = mthd + m; + + if (ClClassGetMethParameterAt(cls, mthd, i, &p, name ? &n : NULL)) { + if (rc) + CMSetStatus(rc, CMPI_RC_ERR_NOT_FOUND); + if (name) + *name = sfcb_native_new_CMPIString(NULL, NULL, 0); + return rv; + } + rv.type = p.type; + if (name) { + *name = sfcb_native_new_CMPIString(n, NULL, 0); + } + if (rc) + CMSetStatus(rc, CMPI_RC_OK); + return rv; +} + +CMPIData internalGetPropQualAt(CMPIConstClass * cc, CMPICount p, CMPICount i, CMPIString **name, CMPIStatus *rc) { @@ -444,6 +510,162 @@ getKeyList(CMPIConstClass * cc) return kar; } +static CMPIData +getMethod(CMPIConstClass * cc, const char *name, CMPIStatus *rc) +{ + ClClass *cls = (ClClass *) cc->hdl; + CMPIData rv_notfound = { 0, CMPI_notFound, {0} }; + CMPIData rv; + char *mname; + CMPICount cnt = ClClassGetMethodCount(cls), + i; + unsigned long quals; + + for (i = 0; i < cnt; i++) { + if (ClClassGetMethodAt(cls, i, &rv.type, &mname, &quals)) { + if (rc) + CMSetStatus(rc, CMPI_RC_ERR_NOT_FOUND); + return rv_notfound; + } + if (strcasecmp(name, mname) == 0) { + if (rc) + CMSetStatus(rc, CMPI_RC_OK); + return rv; + }; + } + if (rc) + CMSetStatus(rc, CMPI_RC_ERR_NOT_FOUND); + return rv_notfound; +} + +static CMPIData +getMethodAt(CMPIConstClass * cc, CMPICount i, CMPIString **name, + CMPIStatus *rc) +{ + ClClass *cls = (ClClass *) cc->hdl; + char *n; + CMPIData rv = { 0, CMPI_notFound, {0} }; + unsigned long quals; + if (ClClassGetMethodAt(cls, i, &rv.type, &n, &quals)) { + if (rc) + CMSetStatus(rc, CMPI_RC_ERR_NOT_FOUND); + return rv; + } + if (name) { + *name = sfcb_native_new_CMPIString(n, NULL, 0); + } + if (rc) + CMSetStatus(rc, CMPI_RC_OK); + return rv; +} + +static CMPICount +getMethodCount(CMPIConstClass * cc, CMPIStatus *rc) +{ + ClClass *cls = (ClClass *) cc->hdl; + if (rc) + CMSetStatus(rc, CMPI_RC_OK); + return (CMPICount) ClClassGetMethodCount(cls); +} + +static CMPIData +getMethodQualifier(CMPIConstClass * cc, const char *meth, const char *cmq, + CMPIStatus *rc) +{ + ClClass *cls = (ClClass *) cc->hdl; + ClSection *mths = &cls->methods; + CMPIData rv_notFound = { 0, CMPI_notFound, {0} }; + CMPIData rv; + CMPICount m = ClClassLocateMethod(&cls->hdr, mths, meth); + CMPICount num = ClClassGetMethQualifierCount(cls, m - 1); + CMPICount i; + CMPIString *name; + + for (i = 0; i < num; i++) { + rv = internalGetMethQualAt(cc, m - 1, i, &name, rc); + + if (strcasecmp(cmq, (char*)name->hdl) == 0) { + if (rc) + CMSetStatus(rc, CMPI_RC_OK); + return rv; + } + } + if (rc) + CMSetStatus(rc, CMPI_RC_ERR_NOT_FOUND); + return rv_notFound; +} + +static CMPIData +getMethodQualifierAt(CMPIConstClass * cc, const char *meth, CMPICount i, + CMPIString **name, CMPIStatus *rc) +{ + ClClass *cls = (ClClass *) cc->hdl; + ClSection *mths = &cls->methods; + CMPICount m = ClClassLocateMethod(&cls->hdr, mths, meth); + return internalGetMethQualAt(cc, m - 1, i, name, rc); +} + +static CMPICount +getMethodQualifierCount(CMPIConstClass * cc, const char *meth, + CMPIStatus *rc) +{ + ClClass *cls = (ClClass *) cc->hdl; + ClSection *mths = &cls->methods; + CMPICount m = ClClassLocateMethod(&cls->hdr, mths, meth); + if (rc) + CMSetStatus(rc, CMPI_RC_OK); + return ClClassGetMethQualifierCount(cls, m - 1); +} + +static CMPIData +getMethodParameter(CMPIConstClass * cc, const char *meth, const char *cmq, + CMPIStatus *rc) +{ + ClClass *cls = (ClClass *) cc->hdl; + ClSection *mths = &cls->methods; + CMPIData rv_notFound = { 0, CMPI_notFound, {0} }; + CMPIData rv; + CMPICount m = ClClassLocateMethod(&cls->hdr, mths, meth); + CMPICount num = ClClassGetMethParameterCount(cls, m - 1); + CMPICount i; + CMPIString *name; + + for (i = 0; i < num; i++) { + rv = internalGetMethParamAt(cc, m - 1, i, &name, rc); + + if (strcasecmp(cmq, (char*)name->hdl) == 0) { + if (rc) + CMSetStatus(rc, CMPI_RC_OK); + return rv; + } + } + if (rc) + CMSetStatus(rc, CMPI_RC_ERR_NOT_FOUND); + return rv_notFound; +} + +static CMPIData +getMethodParameterAt(CMPIConstClass * cc, const char *meth, CMPICount i, + CMPIString **name, CMPIStatus *rc) +{ + ClClass *cls = (ClClass *) cc->hdl; + ClSection *mths = &cls->methods; + CMPICount m = ClClassLocateMethod(&cls->hdr, mths, meth); + return internalGetMethParamAt(cc, m - 1, i, name, rc); +} + +static CMPICount +getMethodParameterCount(CMPIConstClass * cc, const char *meth, + CMPIStatus *rc) +{ + ClClass *cls = (ClClass *) cc->hdl; + ClSection *mths = &cls->methods; + CMPICount m = ClClassLocateMethod(&cls->hdr, mths, meth); + if (rc) + CMSetStatus(rc, CMPI_RC_OK); + return ClClassGetMethParameterCount(cls, m - 1); +} + struct _CMPIConstClass_FT ift = { 1, release, @@ -458,6 +680,15 @@ struct _CMPIConstClass_FT ift = { getPropQualifier, getPropQualifierAt, getPropQualifierCount, + getMethod, + getMethodAt, + getMethodCount, + getMethodParameter, + getMethodParameterAt, + getMethodParameterCount, + getMethodQualifier, + getMethodQualifierAt, + getMethodQualifierCount, getSuperClassName, getKeyList, toString, diff --git a/constClass.h b/constClass.h index 3924fa9..a8933ab 100644 --- a/constClass.h +++ b/constClass.h @@ -77,6 +77,32 @@ struct _CMPIConstClass_FT { const char *prop, CMPIStatus *rc); + CMPIData (*getMethod) (CMPIConstClass * cc, const char *name, + CMPIStatus* rc); + CMPIData (*getMethodAt) (CMPIConstClass * cc, CMPICount i, + CMPIString** name, CMPIStatus* rc); + CMPICount (*getMethodCount) (CMPIConstClass * cc, CMPIStatus* rc); + + CMPIData (*getMethodParameter) (CMPIConstClass * cc, const char *mname, + const char *pname, CMPIStatus* rc); + CMPIData (*getMethodParameterAt) (CMPIConstClass * cc, + const char *mname, + unsigned int index, + CMPIString** name, CMPIStatus* rc); + CMPICount (*getMethodParameterCount) (CMPIConstClass * cc, + const char *mname, + CMPIStatus* rc); + + CMPIData (*getMethodQualifier) (CMPIConstClass * cc, const char *mname, + const char *qname, CMPIStatus* rc); + CMPIData (*getMethodQualifierAt) (CMPIConstClass * cc, + const char *mname, + unsigned int index, + CMPIString** name, CMPIStatus* rc); + CMPICount (*getMethodQualifierCount) (CMPIConstClass * cc, + const char *mname, + CMPIStatus* rc); + /* * local functions for sfcb */ diff --git a/test/localtests/show.c b/test/localtests/show.c index 6c51a64..04acb14 100644 --- a/test/localtests/show.c +++ b/test/localtests/show.c @@ -1,6 +1,7 @@ #include "CimClientLib/cmci.h" #include "CimClientLib/native.h" #include <unistd.h> +#include <stdlib.h> #include <string.h> #include "show.h" @@ -177,12 +178,41 @@ showInstance(CMPIInstance *instance) CMRelease(objectpath); } +char *type2Chars(CMPIType type) +{ + if (type == CMPI_boolean) return "boolean"; + if (type == CMPI_dateTime) return "datetime"; + if (type == CMPI_uint8) return "uint8"; + if (type == CMPI_uint16) return "uint16"; + if (type == CMPI_uint32) return "uint32"; + if (type == CMPI_uint64) return "uint64"; + if (type == CMPI_sint8) return "sint8"; + if (type == CMPI_sint16) return "sint16"; + if (type == CMPI_sint32) return "sint32"; + if (type == CMPI_sint64) return "sint64"; + if (type == CMPI_real32) return "real32"; + if (type == CMPI_real64) return "real64"; + if (type == (CMPI_ARRAY | CMPI_chars)) return "ARRAY of chars"; + if (type == (CMPI_ARRAY | CMPI_string)) return "ARRAY of strings"; + if (type & (CMPI_INTEGER | CMPI_REAL)) return "numeric"; + if (type & CMPI_chars) return "chars"; + if (type & CMPI_string) return "string"; + // TODO: handle remaining types +#define SBUFLEN 32 + char str[SBUFLEN]; + snprintf(str, SBUFLEN, "unknown [CMPIType=%d]", (unsigned short) type); + return strdup(str); +} + void showClass(CMPIConstClass * class) { CMPIString *classname = class->ft->getClassName(class, NULL); int numproperties = class->ft->getPropertyCount(class, NULL); - int i; + int numqualifiers = class->ft->getQualifierCount(class, NULL); + int nummethods = class->ft->getMethodCount(class, NULL); + int numparameters; + int i, j; char *cv; if (classname && classname->hdl) { @@ -218,6 +248,96 @@ showClass(CMPIConstClass * class) } } + if (numqualifiers) + { + printf("qualifiers:\n"); + for (i=0; i<numqualifiers; i++) + { + CMPIString * qualifiername; + CMPIData data = class->ft->getQualifierAt(class, i, &qualifiername, NULL); + + if (data.state==0) + { + cv = value2Chars(data.type, &data.value); + printf("\t%s=\"%.60s%s\n", (char *) qualifiername->hdl, cv, + (strlen(cv) > 60) ? "...\"" : "\""); + if(cv) free(cv); + } + else + printf("\t%s=NIL\n", (char *)qualifiername->hdl); + + if (qualifiername) CMRelease(qualifiername); + } + } + + if (nummethods) + { + printf("methods:\n"); + for (i=0; i<nummethods; i++) + { + CMPIString * methodname; + CMPIData data = class->ft->getMethodAt(class, i, &methodname, NULL); + + printf("\tMethod=%s (%s)\n", (char *) methodname->hdl, + type2Chars(data.type)); + + numparameters = class->ft->getMethodParameterCount(class, + (char *) methodname->hdl, NULL ); + + if (numparameters) + { + printf("\tmethod parameters:\n"); + for (j=0; j<numparameters; j++) + { + CMPIString * parametername; + CMPIData data = class->ft->getMethodParameterAt(class, + (char *) methodname->hdl, j, ¶metername, NULL ); + + printf("\t\t%s (%s)\n", (char *) parametername->hdl, + type2Chars(data.type)); + + if (parametername) CMRelease(parametername); + } + } + + numqualifiers = class->ft->getMethodQualifierCount(class, + (char *) methodname->hdl, NULL ); + + if (numqualifiers) + { + printf("\tmethod qualifiers:\n"); + for (j=0; j<numqualifiers; j++) + { + CMPIString * qualifiername; + CMPIData data = class->ft->getMethodQualifierAt(class, + (char *) methodname->hdl, j, &qualifiername, NULL ); + + if (data.state==0) + { + if (data.type & CMPI_ARRAY) { + // TODO: properly print array values here + printf("\t\t%s (%s)\n", (char *) qualifiername->hdl, + type2Chars(data.type)); + } + else { + cv = value2Chars(data.type, &data.value); + printf("\t\t%s (%s)=\"%.60s%s\n", (char *) qualifiername->hdl, + type2Chars(data.type), cv, + (strlen(cv) > 60) ? "...\"" : "\""); + if(cv) free(cv); + } + } + else + printf("\t\t%s=NIL\n", (char *)qualifiername->hdl); + + if (qualifiername) CMRelease(qualifiername); + } + } + + if (methodname) CMRelease(methodname); + } + } + if (classname) CMRelease(classname); } hooks/post-receive -- sfcb - Small Footprint CIM Broker |
From: Tyrel D. <ty...@us...> - 2013-02-16 00:33:28
|
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 "gather - Metric Data Gatherer". The branch, master has been updated via ba11c046eb07a53a71d5a998e805b9d1b29c83a7 (commit) from 2145b69caac7213c9fdbb69b9632ac74fc51f848 (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 ba11c046eb07a53a71d5a998e805b9d1b29c83a7 Author: Tyrel Datwyler <ty...@li...> Date: Fri Feb 15 16:32:47 2013 -0800 Updated changelog with recent fixes ----------------------------------------------------------------------- Summary of changes: ChangeLog | 37 ++++++++++++++++++++++++++++++++++++- 1 files changed, 36 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3e0bf70..7bdb31d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,41 @@ +2013-02-14 Tyrel Datwyler <ty...@li...> + + * NEWS, comms/mcclt_unix.c, comms/mcserv_unix.c, comms/rcclt_ip.c, + comms/rcserv_ip.c, gather.c, marshal.c, mreg.c, mreposl.c, mretr.c, + plugin/hyptest.c, plugin/lparutil.c, plugin/metricKvm.c, + plugin/metricProcessor.c, plugin/metricStorage.c, + plugin/metricVirt.c, plugin/metricVirt.h, plugin/metricXenV2.c, + plugin/metriczCEC.c, provider/OSBase_MetricIndicationProvider.c, + provider/OSBase_MetricLifeCycleProvider.c, + provider/OSBase_MetricServiceCapabilitiesProvider.c, + provider/OSBase_MetricServiceProvider.c, + provider/OSBase_MetricUtil.c, repos.c, rreg.c, util/commutil.c, + util/merrno.c, util/mtrace.c: + + Fixed #2023: clean up compile warnings + +2013-02-07 Tyrel Datwyler <ty...@li...> + + * NEWS: + + steal time feature will be part of 2.2.8 release not 2.2.7 + +2013-02-07 Tyrel Datwyler <ty...@li...> + + * Makefile.am, NEWS: + + Fixed 3196679: remove sysfs dependency when not building z plugins + +2013-02-07 Tyrel Datwyler <ty...@li...> + + * Makefile.am, NEWS, configure.ac, provider/Makefile.am: + + Fixed 3603719: Clean up configuration toolchain and fix DSO linking + + 2013-02-06 Michael Chase-Salerno <br...@li...> - * plugin/repositoryOperatingSystem.c: + * ChangeLog, NEWS, plugin/repositoryOperatingSystem.c: 2284848 CPU utilization should account for steal-time hooks/post-receive -- gather - Metric Data Gatherer |
From: Dave B. <bla...@us...> - 2013-02-14 23:10:44
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20861/src/org/sblim/cimclient/internal/cimxml/sax/node Modified Files: SimpleExpRspNode.java ValueRefArrayNode.java LocalClassPathNode.java KeyValueNode.java MethodNode.java Node.java ReturnValueNode.java ValueObjectNode.java ClassPathNode.java KeyBindingNode.java Log Message: 3602604 Clean up SAXException messages Index: Node.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/Node.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Node.java 13 Apr 2012 13:47:34 -0000 1.12 +++ Node.java 14 Feb 2013 23:10:41 -0000 1.13 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2012 + * (C) Copyright IBM Corp. 2006, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -23,6 +23,7 @@ * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) * 2531371 2009-02-10 raman_arora Upgrade client to JDK 1.5 (Phase 2) * 3513353 2012-03-30 blaschke-oss TCK: CIMDataType arrays must have length >= 1 + * 3602604 2013-01-29 blaschke-oss Clean up SAXException messages */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -220,7 +221,7 @@ String arraySizeStr = pAttribs.getValue("ARRAYSIZE"); // 0 - unbounded size int size = arraySizeStr == null ? 0 : Integer.parseInt(arraySizeStr); - if (size < 0) throw new IllegalArgumentException("ARRAYSIZE cannot be " + size + " !"); + if (size < 0) throw new IllegalArgumentException("ARRAYSIZE cannot be " + size + "!"); return size; } Index: ReturnValueNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/ReturnValueNode.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- ReturnValueNode.java 14 Mar 2011 13:17:38 -0000 1.11 +++ ReturnValueNode.java 14 Feb 2013 23:10:41 -0000 1.12 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2011 + * (C) Copyright IBM Corp. 2006, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -21,6 +21,7 @@ * 2003590 2008-06-30 blaschke-oss Change licensing from CPL to EPL * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) * 3194700 2011-03-01 blaschke-oss Exception thrown on extrinsic methods + * 3602604 2013-01-29 blaschke-oss Clean up SAXException messages */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -90,7 +91,7 @@ if (valNode instanceof ValueReferenceNode) { if (this.iType != null && this.iType.getType() != CIMDataType.REFERENCE) throw new SAXException( getNodeName() + " node's child node is VALUE.REFERENCE " - + "but it's type based on PARAMTYPE attribute is " + this.iType + " !"); + + "but its type based on PARAMTYPE attribute is " + this.iType + "!"); ValueReferenceNode valRefNode = (ValueReferenceNode) valNode; this.iValue = valRefNode.getCIMObjectPath(); this.iType = valRefNode.getType(); Index: ValueObjectNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/ValueObjectNode.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ValueObjectNode.java 10 Mar 2009 17:05:32 -0000 1.8 +++ ValueObjectNode.java 14 Feb 2013 23:10:41 -0000 1.9 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2009 + * (C) Copyright IBM Corp. 2006, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -19,7 +19,8 @@ * 1720707 2007-05-17 ebak Conventional Node factory for CIM-XML SAX parser * 2003590 2008-06-30 blaschke-oss Change licensing from CPL to EPL * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) - * 2531371 2009-02-10 raman_arora Upgrade client to JDK 1.5 (Phase 2) + * 2531371 2009-02-10 raman_arora Upgrade client to JDK 1.5 (Phase 2) + * 3602604 2013-01-29 blaschke-oss Clean up SAXException messages */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -83,7 +84,7 @@ @Override public void testCompletness() throws SAXException { if (this.iCIMObject == null) throw new SAXException( - "VALUE.OBJECT node must have a CLASS or INSTANCE node child!"); + "VALUE.OBJECT node must have a CLASS or INSTANCE child node!"); } /** Index: SimpleExpRspNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/SimpleExpRspNode.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- SimpleExpRspNode.java 13 Apr 2012 12:59:51 -0000 1.8 +++ SimpleExpRspNode.java 14 Feb 2013 23:10:41 -0000 1.9 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2012 + * (C) Copyright IBM Corp. 2006, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -20,6 +20,7 @@ * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) * 2797550 2009-06-01 raman_arora JSR48 compliance - add Java Generics * 3511454 2012-03-27 blaschke-oss SAX nodes not reinitialized properly + * 3602604 2013-01-29 blaschke-oss Clean up SAXException messages */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -75,7 +76,7 @@ if (this.iExpMethodRspNode != null) throw new SAXException(getNodeName() + " node can have only one child node!"); if (pNodeNameEnum != EXPMETHODRESPONSE) throw new SAXException(getNodeName() - + " node child node can be EXPMETHODRESPONSE only! " + pNodeNameEnum + + " node's child node can be EXPMETHODRESPONSE only! " + pNodeNameEnum + " is invalid!"); } Index: LocalClassPathNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/LocalClassPathNode.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- LocalClassPathNode.java 13 May 2010 10:46:55 -0000 1.9 +++ LocalClassPathNode.java 14 Feb 2013 23:10:41 -0000 1.10 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2010 + * (C) Copyright IBM Corp. 2006, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -21,6 +21,7 @@ * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) * 2531371 2009-02-10 raman_arora Upgrade client to JDK 1.5 (Phase 2) * 2974884 2010-04-20 blaschke-oss Exception when attaching 2 CDRoms with invoke method + * 3602604 2013-01-29 blaschke-oss Clean up SAXException messages */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -83,7 +84,8 @@ if (this.iHasClassName) throw new SAXException( "LOCALCLASSPATH node already has a CLASSNAME child node!"); } else throw new SAXException("LOCALCLASSPATH node cannot have " + pNodeNameEnum - + " child node!" + "It can have LOCALNAMESPACEPATH and CLASSNAME child nodes only!"); + + " child node!" + + " It can have LOCALNAMESPACEPATH and CLASSNAME child nodes only!"); } @Override Index: ValueRefArrayNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/ValueRefArrayNode.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- ValueRefArrayNode.java 16 Apr 2012 12:44:38 -0000 1.10 +++ ValueRefArrayNode.java 14 Feb 2013 23:10:41 -0000 1.11 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2012 + * (C) Copyright IBM Corp. 2006, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -22,6 +22,7 @@ * 2750520 2009-04-10 blaschke-oss Code cleanup from empty statement et al * 3511454 2012-03-27 blaschke-oss SAX nodes not reinitialized properly * 3513349 2012-03-31 blaschke-oss TCK: CIMDataType must not accept null string + * 3602604 2013-01-29 blaschke-oss Clean up SAXException messages */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -71,7 +72,7 @@ @Override public void testChild(String pNodeNameEnum) throws SAXException { if (pNodeNameEnum != VALUE_REFERENCE) throw new SAXException( - "Child node can be VALUE_REFERENCE only while it is " + pNodeNameEnum + " !"); + "Child node can be VALUE_REFERENCE only while it is " + pNodeNameEnum + "!"); } @Override Index: MethodNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/MethodNode.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- MethodNode.java 12 Jun 2009 02:33:23 -0000 1.10 +++ MethodNode.java 14 Feb 2013 23:10:41 -0000 1.11 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2009 + * (C) Copyright IBM Corp. 2006, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -22,6 +22,7 @@ * 2531371 2009-02-10 raman_arora Upgrade client to JDK 1.5 (Phase 2) * 2763216 2009-04-14 blaschke-oss Code cleanup: visible spelling/grammar errors * 2797550 2009-06-01 raman_arora JSR48 compliance - add Java Generics + * 3602604 2013-01-29 blaschke-oss Clean up SAXException messages */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -89,7 +90,7 @@ this.iType = getCIMType(pAttribs, false); if (this.iType != null && this.iType.isArray()) throw new SAXException( - "METHOD's node TYPE cannot be an array!"); + "METHOD node's TYPE cannot be an array!"); this.iClassOrigin = getClassOrigin(pAttribs); this.iPropagated = getPropagated(pAttribs); } Index: KeyBindingNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/KeyBindingNode.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- KeyBindingNode.java 12 Jun 2009 02:33:23 -0000 1.7 +++ KeyBindingNode.java 14 Feb 2013 23:10:41 -0000 1.8 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2009 + * (C) Copyright IBM Corp. 2006, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -19,6 +19,7 @@ * 2003590 2008-06-30 blaschke-oss Change licensing from CPL to EPL * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) * 2797550 2009-06-01 raman_arora JSR48 compliance - add Java Generics + * 3602604 2013-01-29 blaschke-oss Clean up SAXException messages */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -71,7 +72,7 @@ @Override public void testChild(String pNodeNameEnum) throws SAXException { - if (this.iHasChild) throw new SAXException("KEYBINDING node can only one child node!"); + if (this.iHasChild) throw new SAXException("KEYBINDING node can only have one child node!"); if (pNodeNameEnum != KEYVALUE && pNodeNameEnum != VALUE_REFERENCE) throw new SAXException( "KEYBINDING node's child node can be KEYVALUE or VALUE_REFERENCE but not " + pNodeNameEnum); Index: ClassPathNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/ClassPathNode.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ClassPathNode.java 13 Apr 2012 12:59:51 -0000 1.9 +++ ClassPathNode.java 14 Feb 2013 23:10:41 -0000 1.10 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2012 + * (C) Copyright IBM Corp. 2006, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -20,6 +20,7 @@ * 2003590 2008-06-30 blaschke-oss Change licensing from CPL to EPL * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) * 3511454 2012-03-27 blaschke-oss SAX nodes not reinitialized properly + * 3602604 2013-01-29 blaschke-oss Clean up SAXException messages */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -81,7 +82,7 @@ if (this.iHasClassName) throw new SAXException( "CLASSPATH node already has a CLASSNAME child node!"); } else throw new SAXException("CLASSPATH node cannot have " + pNodeNameEnum - + " child node!" + "It can have NAMESPACEPATH and CLASSNAME child nodes only!"); + + " child node!" + " It can have NAMESPACEPATH and CLASSNAME child nodes only!"); } @Override Index: KeyValueNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/KeyValueNode.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- KeyValueNode.java 15 Nov 2012 14:46:04 -0000 1.12 +++ KeyValueNode.java 14 Feb 2013 23:10:41 -0000 1.13 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2012 + * (C) Copyright IBM Corp. 2006, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -23,6 +23,7 @@ * 2763216 2009-04-14 blaschke-oss Code cleanup: visible spelling/grammar errors * 2823494 2009-08-03 rgummada Change Boolean constructor to static * 3572993 2012-10-01 blaschke-oss parseDouble("2.2250738585072012e-308") DoS vulnerability + * 3602604 2013-01-29 blaschke-oss Clean up SAXException messages */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -124,7 +125,7 @@ if (this.iValueTypeStr.equals("numeric")) { if (!setUInt64(pValue) && !setSInt64(pValue) && !setReal64(pValue)) throw new SAXException( - "Unparseable \"number\" value: " + pValue + " !"); + "Unparseable \"number\" value: " + pValue + "!"); } else if (this.iValueTypeStr.equals(MOF.DT_STR)) { if (!setDTAbsolute(pValue) && !setDTInterval(pValue)) { this.iValue = pValue; @@ -132,7 +133,7 @@ } } else if (this.iValueTypeStr.equals(MOF.DT_BOOL)) { if (!setBoolean(pValue)) throw new SAXException("Unparseable \"boolean\" value: " - + pValue + " !"); + + pValue + "!"); } else { throw new SAXException("KEYVALUE node's VALUETYPE attribute must be " + MOF.DT_STR + ", " + MOF.DT_BOOL + " or numeric! " + pValue + " is not allowed!"); |
From: Tyrel D. <ty...@us...> - 2013-02-08 21:44:02
|
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 "gather - Metric Data Gatherer". The branch, master has been updated via 85e312e97f9aa76a758e468f32726f928194bc27 (commit) from 941baf1c501f75c330b0c7d39b1bbb7c5354cab5 (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 85e312e97f9aa76a758e468f32726f928194bc27 Author: Tyrel Datwyler <ty...@li...> Date: Thu Feb 7 16:41:37 2013 -0800 steal time feature will be part of 2.2.8 release not 2.2.7 ----------------------------------------------------------------------- Summary of changes: NEWS | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/NEWS b/NEWS index c0c3646..c68e417 100644 --- a/NEWS +++ b/NEWS @@ -20,7 +20,6 @@ Bugs fixed: Features added: - 3019058 add man pages/help for gatherd and reposd - 3590926 add man page for reposdump utility -- 2284848 CPU utilization should account for steal-time Changes in Version 2.2.6 ======================== hooks/post-receive -- gather - Metric Data Gatherer |
From: Tyrel D. <ty...@us...> - 2013-02-08 00:32:13
|
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 "gather - Metric Data Gatherer". The branch, master has been updated via 941baf1c501f75c330b0c7d39b1bbb7c5354cab5 (commit) from a0bba6b993f1249961e54211ef4a0387ffc38d9b (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 941baf1c501f75c330b0c7d39b1bbb7c5354cab5 Author: Tyrel Datwyler <ty...@li...> Date: Thu Feb 7 16:28:28 2013 -0800 Fixed 3196679: remove sysfs dependency when not building z plugins ----------------------------------------------------------------------- Summary of changes: diff --git a/Makefile.am b/Makefile.am index 8001360..f5ffa21 100644 --- a/Makefile.am +++ b/Makefile.am @@ -102,6 +102,14 @@ Z_REPOS_LIBS=librepositoryzECKD.la \ librepositoryzCEC.la \ librepositoryzLPAR.la \ librepositoryzCH.la + +Z_LTLIBS=libsysfswrapper.la \ + libhypfs.la \ + liblparutil.la \ + libchannelutil.la + +Z_PROGS=hyptest \ + channelclt endif # ADD EXTRA DOC FILES IF PRESENT @@ -140,7 +148,7 @@ noinst_HEADERS = gatherc.h marshal.h mlist.h mplugmgr.h \ # Gather support utility libraries lib_LTLIBRARIES = libgatherutil.la libmcserv.la librcserv.la \ librrepos.la librepos.la libgather.la librgather.la \ - libsysfswrapper.la libhypfs.la liblparutil.la libchannelutil.la + $(Z_LTLIBS) libgatherutil_la_SOURCES = util/mrwlock.c util/commheap.c util/commutil.c \ util/gatherutil.c util/mcfg.c util/gathercfg.c util/reposcfg.c \ @@ -180,7 +188,7 @@ liblparutil_la_LIBADD = libhypfs.la libchannelutil_la_SOURCES = plugin/channelutil.c plugin/channelutil.h libchannelutil_la_LIBADD = libsysfswrapper.la -libchannelutil_la_LDFLAGS = -lsysfs +libchannelutil_la_LDFLAGS = $(ZHYPLIBS) # Gather daemons sbin_PROGRAMS = gatherd reposd @@ -314,7 +322,7 @@ librepositoryStorage_la_LDFLAGS=$(PLUG_FLAGS) # Gather utility test programs (not installed) noinst_PROGRAMS = mcfgtest mtracetest merrnotest mcstest mcctest \ rcstest rcctest \ - hyptest channelclt + $(Z_PROGS) mcfgtest_SOURCES = util/mcfgtest.c mcfgtest_LDADD = libgatherutil.la diff --git a/NEWS b/NEWS index 35b3c3a..c0c3646 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ Changes in Version 2.2.8 Bugs fixed: - 3603719 Clean up configuration toolchain and fix DSO linking +- 3196679 remove sysfs dependency when not building z plugins Features added: - 2284848 CPU utilization should account for steal-time hooks/post-receive -- gather - Metric Data Gatherer |
From: Tyrel D. <ty...@us...> - 2013-02-07 23:48: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 "gather - Metric Data Gatherer". The branch, master has been updated via a0bba6b993f1249961e54211ef4a0387ffc38d9b (commit) from ee243db78f020f4e4047108fea2f63844ef81c40 (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 a0bba6b993f1249961e54211ef4a0387ffc38d9b Author: Tyrel Datwyler <ty...@li...> Date: Thu Feb 7 15:45:28 2013 -0800 Fixed 3603719: Clean up configuration toolchain and fix DSO linking ----------------------------------------------------------------------- Summary of changes: :100644 100644 60fb061d4e903e436ab34f573c5bb0ffebdbc5f0 80013607c1fd9737b9296563b9632b7f33c16401 M Makefile.am :100644 100644 2f30450383c9fd806c2538d01a4b141b211d8a80 35b3c3aea03f224b87e4ce3f462dd5318b186079 M NEWS :100644 100644 6fd1bb3107eb8f61303e46617ce00b6a138d44f9 67d64e3a663a97a533563df7667507d8eceee911 M configure.ac :040000 040000 9638129cb418327f5154633fec445df5d06a869f 595ea852016387e0d695ad8b349cca18e3fc898d M provider hooks/post-receive -- gather - Metric Data Gatherer |
From: Dave H. <hel...@us...> - 2013-02-07 23:28:04
|
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 "SFCC - Small Footprint CIM Client". The branch, master has been updated via 1f82c33791fe33739a57cfcd511845918ac415bc (commit) from 2e796d9319081edd29e8553107b932e133e6a9fc (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 1f82c33791fe33739a57cfcd511845918ac415bc Author: Dave Heller <hel...@us...> Date: Thu Feb 7 18:04:53 2013 -0500 [ 3529678 ] getClass does not expose method information ----------------------------------------------------------------------- Summary of changes: diff --git a/Makefile.am b/Makefile.am index dbb4977..e6ab239 100644 --- a/Makefile.am +++ b/Makefile.am @@ -89,7 +89,9 @@ libcimcClientXML_la_SOURCES = \ backend/cimxml/instance.c \ backend/cimxml/indicationlistener.c \ backend/cimxml/constClass.c \ + backend/cimxml/method.c \ backend/cimxml/objectpath.c \ + backend/cimxml/parameter.c \ backend/cimxml/property.c \ backend/cimxml/qualifier.c \ backend/cimxml/string.c \ diff --git a/NEWS b/NEWS index 3736862..e833da5 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,9 @@ Small Footprint CIM Client Library NEWS Changes in 2.2.6 ================ +New Features: +- 3529678 getClass does not expose method information + Bugs: Changes in 2.2.5 diff --git a/TEST/show.c b/TEST/show.c index 0621133..6deb23d 100755 --- a/TEST/show.c +++ b/TEST/show.c @@ -199,12 +199,37 @@ void showInstance( CMPIInstance *instance ) if (objectpath) CMRelease(objectpath); } +char *type2Chars(CMPIType type) +{ + if (type == CMPI_boolean) return "boolean"; + if (type == CMPI_dateTime) return "datetime"; + if (type == CMPI_uint8) return "uint8"; + if (type == CMPI_uint16) return "uint16"; + if (type == CMPI_uint32) return "uint32"; + if (type == CMPI_uint64) return "uint64"; + if (type == CMPI_sint8) return "sint8"; + if (type == CMPI_sint16) return "sint16"; + if (type == CMPI_sint32) return "sint32"; + if (type == CMPI_sint64) return "sint64"; + if (type == CMPI_real32) return "real32"; + if (type == CMPI_real64) return "real64"; + if (type & (CMPI_INTEGER | CMPI_REAL)) return "numeric"; + if (type & (CMPI_chars | CMPI_string)) return "string"; + // TODO: handle remaining types +#define SBUFLEN 32 + char str[SBUFLEN]; + snprintf(str, SBUFLEN, "unknown [CMPIType=%d]", (unsigned short) type); + return strdup(str); +} void showClass( CMPIConstClass * class ) { CMPIString * classname = class->ft->getClassName(class, NULL); int numproperties = class->ft->getPropertyCount(class, NULL); - int i; + int numqualifiers = class->ft->getQualifierCount(class, NULL); + int nummethods = class->ft->getMethodCount(class, NULL); + int numparameters; + int i, j; char *cv; if (classname && classname->hdl) @@ -239,6 +264,88 @@ void showClass( CMPIConstClass * class ) } } + if (numqualifiers) + { + printf("qualifiers:\n"); + for (i=0; i<numqualifiers; i++) + { + CMPIString * qualifiername; + CMPIData data = class->ft->getQualifierAt(class, i, &qualifiername, NULL); + + if (data.state==0) + { + cv = value2Chars(data.type, &data.value); + printf("\t%s=\"%.60s%s\n", (char *) qualifiername->hdl, cv, + (strlen(cv) > 60) ? "...\"" : "\""); + if(cv) free(cv); + } + else + printf("\t%s=NIL\n", (char *)qualifiername->hdl); + + if (qualifiername) CMRelease(qualifiername); + } + } + + if (nummethods) + { + printf("methods:\n"); + for (i=0; i<nummethods; i++) + { + CMPIString * methodname; + CMPIData data = class->ft->getMethodAt(class, i, &methodname, NULL); + + printf("\tMethod=%s (%s)\n", (char *)methodname->hdl, type2Chars(data.type)); + + numparameters = class->ft->getMethodParameterCount(class, (char *)methodname->hdl, NULL); + + if (numparameters) + { + printf("\tmethod parameters:\n"); + for (j=0; j<numparameters; j++) + { + CMPIString * parametername; + CMPIData data = class->ft->getMethodParameterAt(class, (char *)methodname->hdl, j, ¶metername, NULL); + + printf("\t\t%s (%s)\n", (char *)parametername->hdl, type2Chars(data.type)); + + if (parametername) CMRelease(parametername); + } + } + + numqualifiers = class->ft->getMethodQualifierCount(class, (char *)methodname->hdl, NULL); + + if (numqualifiers) + { + printf("\tmethod qualifiers:\n"); + for (j=0; j<numqualifiers; j++) + { + CMPIString * qualifiername; + CMPIData data = class->ft->getMethodQualifierAt(class, (char *)methodname->hdl, j, &qualifiername, NULL); + + if (data.state==0) + { + if (data.type & CMPI_ARRAY) { + // TODO: properly print array values here + printf("\t\t%s=ARRAY\n", (char *)qualifiername->hdl); + } + else { + cv = value2Chars(data.type, &data.value); + printf("\t\t%s=\"%.60s%s\n", (char *) qualifiername->hdl, cv, + (strlen(cv) > 60) ? "...\"" : "\""); + if(cv) free(cv); + } + } + else + printf("\t\t%s=NIL\n", (char *)qualifiername->hdl); + + if (qualifiername) CMRelease(qualifiername); + } + } + + if (methodname) CMRelease(methodname); + } + } + if (classname) CMRelease(classname); } diff --git a/backend/cimxml/constClass.c b/backend/cimxml/constClass.c index c149fdf..9cd04ad 100644 --- a/backend/cimxml/constClass.c +++ b/backend/cimxml/constClass.c @@ -36,14 +36,6 @@ /****************************************************************************/ -extern CMPIConstClass * native_new_CMPIConstClass ( char *cn, - CMPIStatus * rc ); -extern int addClassProperty( CMPIConstClass * ccls, char * name, - CMPIValue * value, CMPIType type, - CMPIValueState state); - -/****************************************************************************/ - static CMPIStatus __ccft_release ( CMPIConstClass * ccls ) { @@ -54,6 +46,7 @@ static CMPIStatus __ccft_release ( CMPIConstClass * ccls ) free ( cc->classname ); propertyFT.release ( cc->props ); qualifierFT.release ( cc->qualifiers ); + methodFT.release ( cc->methods ); free ( cc ); CMReturn ( CMPI_RC_OK ); @@ -73,6 +66,7 @@ static CMPIConstClass * __ccft_clone ( CMPIConstClass * ccls, CMPIStatus * rc ) new->classname = strdup ( cc->classname ); new->qualifiers= qualifierFT.clone ( cc->qualifiers, rc ); new->props = propertyFT.clone ( cc->props, rc ); + new->methods = methodFT.clone ( cc->methods, rc ); return (CMPIConstClass *) new; } @@ -183,7 +177,112 @@ static unsigned int __ccft_getPropertyQualifierCount ( CMPIConstClass * ccls, return 0; } +static CMPIData __ccft_getMethod ( CMPIConstClass * ccls, + const char * name, + CMPIStatus * rc ) +{ + struct native_constClass * c = (struct native_constClass *) ccls; + + return methodFT.getDataMethod ( c->methods, name, rc ); +} + +static CMPIData __ccft_getMethodAt ( CMPIConstClass * ccls, + unsigned int index, + CMPIString ** name, + CMPIStatus * rc ) +{ + struct native_constClass * c = (struct native_constClass *) ccls; + + return methodFT.getDataMethodAt ( c->methods, index, name, rc ); +} + +static unsigned int __ccft_getMethodCount ( CMPIConstClass * ccls, + CMPIStatus * rc ) +{ + struct native_constClass * c = (struct native_constClass *) ccls; + + return methodFT.getMethodCount ( c->methods, rc ); +} + +static CMPIData __ccft_getMethodQualifier ( CMPIConstClass * ccls, + const char * mname, const char *qname, + CMPIStatus * rc ) +{ + struct native_constClass * c = (struct native_constClass *) ccls; + struct native_method *m=methodFT.getMethod ( c->methods, mname ); + + if (m) return qualifierFT.getDataQualifier ( m->qualifiers, qname, rc ); + CMSetStatus ( rc, CMPI_RC_ERR_METHOD_NOT_FOUND ); + CMPIData ret = { 0, CMPI_nullValue, {0} }; + return ret; +} + +static CMPIData __ccft_getMethodQualifierAt ( CMPIConstClass * ccls, + const char * mname, + unsigned int index, + CMPIString ** name, + CMPIStatus * rc ) +{ + struct native_constClass * c = (struct native_constClass *) ccls; + struct native_method *m=methodFT.getMethod ( c->methods, mname ); + if (m) return qualifierFT.getDataQualifierAt ( m->qualifiers, index, name, rc ); + CMSetStatus ( rc, CMPI_RC_ERR_METHOD_NOT_FOUND ); + CMPIData ret= { 0, CMPI_nullValue, {0} }; + return ret; +} + +static unsigned int __ccft_getMethodQualifierCount ( CMPIConstClass * ccls, + const char * mname, + CMPIStatus * rc ) +{ + struct native_constClass * c = (struct native_constClass *) ccls; + struct native_method *m=methodFT.getMethod ( c->methods, mname ); + + if (m) return qualifierFT.getQualifierCount ( m->qualifiers, rc ); + CMSetStatus ( rc, CMPI_RC_ERR_METHOD_NOT_FOUND ); + return 0; +} + +static CMPIData __ccft_getMethodParameter ( CMPIConstClass * ccls, + const char * mname, const char *pname, + CMPIStatus * rc ) +{ + struct native_constClass * c = (struct native_constClass *) ccls; + struct native_method *m=methodFT.getMethod ( c->methods, mname ); + + if (m) return parameterFT.getDataParameter ( m->parameters, pname, rc ); + CMSetStatus ( rc, CMPI_RC_ERR_METHOD_NOT_FOUND ); + CMPIData ret = { 0, CMPI_nullValue, {0} }; + return ret; +} + +static CMPIData __ccft_getMethodParameterAt ( CMPIConstClass * ccls, + const char * mname, + unsigned int index, + CMPIString ** name, + CMPIStatus * rc ) +{ + struct native_constClass * c = (struct native_constClass *) ccls; + struct native_method *m=methodFT.getMethod ( c->methods, mname ); + + if (m) return parameterFT.getDataParameterAt ( m->parameters, index, name, rc ); + CMSetStatus ( rc, CMPI_RC_ERR_METHOD_NOT_FOUND ); + CMPIData ret= { 0, CMPI_nullValue, {0} }; + return ret; +} + +static unsigned int __ccft_getMethodParameterCount ( CMPIConstClass * ccls, + const char * mname, + CMPIStatus * rc ) +{ + struct native_constClass * c = (struct native_constClass *) ccls; + struct native_method *m=methodFT.getMethod ( c->methods, mname ); + + if (m) return parameterFT.getParameterCount ( m->parameters, rc ); + CMSetStatus ( rc, CMPI_RC_ERR_METHOD_NOT_FOUND ); + return 0; +} @@ -197,12 +296,21 @@ CMPIConstClass * native_new_CMPIConstClass ( char *cn, CMPIStatus * rc ) __ccft_getProperty, __ccft_getPropertyAt, __ccft_getPropertyCount, - __ccft_getQualifier, - __ccft_getQualifierAt, - __ccft_getQualifierCount, - __ccft_getPropertyQualifier, - __ccft_getPropertyQualifierAt, - __ccft_getPropertyQualifierCount + __ccft_getQualifier, + __ccft_getQualifierAt, + __ccft_getQualifierCount, + __ccft_getPropertyQualifier, + __ccft_getPropertyQualifierAt, + __ccft_getPropertyQualifierCount, + __ccft_getMethod, + __ccft_getMethodAt, + __ccft_getMethodCount, + __ccft_getMethodParameter, + __ccft_getMethodParameterAt, + __ccft_getMethodParameterCount, + __ccft_getMethodQualifier, + __ccft_getMethodQualifierAt, + __ccft_getMethodQualifierCount }; static CMPIConstClass cc = { "CMPIConstClass", @@ -286,8 +394,71 @@ int addClassPropertyQualifier( CMPIConstClass* cc, char * pname, char *qname, return ( CMPI_RC_OK ); } return CMPI_RC_ERR_NO_SUCH_PROPERTY; -} - +} + +int addClassMethod( CMPIConstClass * cc, + char * name, + CMPIValue * value, + CMPIType type, + CMPIValueState state) +{ + struct native_constClass * c = (struct native_constClass *) cc; + + if ( methodFT.setMethod ( c->methods, + name, + type, + value ) ) { + methodFT.addMethod ( &c->methods, + name, + type, + state, + value ); + } + return ( CMPI_RC_OK ); +} + +int addClassMethodQualifier( CMPIConstClass* cc, char * mname, char *qname, + CMPIValue * value, + CMPIType type) +{ + struct native_constClass * c = (struct native_constClass *) cc; + struct native_method *m=methodFT.getMethod ( c->methods, mname ); + + if (m) { + if ( qualifierFT.setQualifier ( m->qualifiers, + qname, + type, + value ) ) { + qualifierFT.addQualifier ( &m->qualifiers, + qname, + type, + 0, + value ); + } + return ( CMPI_RC_OK ); + } + return CMPI_RC_ERR_METHOD_NOT_FOUND; +} + +int addClassMethodParameter( CMPIConstClass* cc, char * mname, char *pname, + CMPIType type) +{ + struct native_constClass * c = (struct native_constClass *) cc; + struct native_method *m=methodFT.getMethod ( c->methods, mname ); + + if (m) { + if ( parameterFT.setParameter ( m->parameters, + pname, + type ) ) { + parameterFT.addParameter ( &m->parameters, + pname, + type ); + } + return ( CMPI_RC_OK ); + } + return CMPI_RC_ERR_METHOD_NOT_FOUND; +} + /****************************************************************************/ /*** Local Variables: ***/ diff --git a/backend/cimxml/grammar.c b/backend/cimxml/grammar.c index d109421..9e543c9 100644 --- a/backend/cimxml/grammar.c +++ b/backend/cimxml/grammar.c @@ -431,6 +431,7 @@ static void iReturnValueContent(ParserControl *parm, parseUnion *stateUnion) cls = native_new_CMPIConstClass(lvalp.xtokClass.className,NULL); setClassQualifiers(cls, &lvalp.xtokClass.qualifiers); setClassProperties(cls, &lvalp.xtokClass.properties); + setClassMethods(cls, &lvalp.xtokClass.methods); simpleArrayAdd(parm->respHdr.rvArray,(CMPIValue*)&cls,CMPI_class); ct = localLex(&lvalp, parm); } @@ -701,6 +702,7 @@ static void method(ParserControl *parm, parseUnion *stateUnion) do { dontLex = 1; methodData(parm, (parseUnion*)&lvalp.xtokMethodData); + addParam(parm,&stateUnion->xtokMethod.params,&lvalp.xtokParam); ct = localLex(&lvalp, parm); } while(ct == XTOK_PARAM || ct == XTOK_PARAMREF || ct == XTOK_PARAMARRAY || ct == XTOK_PARAMREFARRAY); diff --git a/backend/cimxml/method.c b/backend/cimxml/method.c new file mode 100644 index 0000000..3a3199c --- /dev/null +++ b/backend/cimxml/method.c @@ -0,0 +1,254 @@ +/*! + \file method.c + \brief Native method implementation. + + This module implements a native method, which is not public to any + provider programmer. It is used to implement various other data types + natively, such as instances, object-paths and args. + + It provides means to maintain linked lists of named methods including + functionality to add, remove, clone and release them. + + (C) Copyright IBM Corp. 2013 + + THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE + ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE + CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. + + You can obtain a current copy of the Eclipse Public License from + http://www.opensource.org/licenses/eclipse-1.0.php + + \author Frank Scheffler + $Revision: 1.3 $ +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include "cmcidt.h" +#include "cmcift.h" +#include "cmcimacs.h" +#include "native.h" + +#ifdef DMALLOC +#include "dmalloc.h" +#endif + +//! Storage container for commonly needed data within native CMPI data types. +/*! + This structure is used to build linked lists of data containers as needed + for various native data types. +*/ +// struct native_method {} // defined in frontend/sfcc/native.h + +/****************************************************************************/ + +static CMPIData __convert2CMPIData(struct native_method * meth, + CMPIString ** methname) { + + CMPIData result = { 0, CMPI_nullValue, { 0 } }; + + if (meth != NULL) { + result.type = meth->type; + result.state = meth->state; + result.value = meth->value; + + if (methname) { + *methname = native_new_CMPIString(meth->name, NULL); + } + } + return result; +} + + +/** + * returns non-zero if already existent + */ +static int __addMethod(struct native_method ** meth, const char * name, + CMPIType type, CMPIValueState state, + CMPIValue * value) { + + CMPIStatus rc; + + if (*meth == NULL) { + struct native_method * tmp = *meth = (struct native_method *) calloc(1, + sizeof(struct native_method)); + + tmp->name = strdup(name); + tmp->type = type; + tmp->state = state; + + if (type != CMPI_null && state != CMPI_nullValue) { + if (type == CMPI_chars) { + tmp->type = CMPI_string; + tmp->value.string = native_new_CMPIString((char *) value, &rc); + } else + tmp->value = native_clone_CMPIValue(type, value, &rc); + } else { + tmp->state = CMPI_nullValue; + tmp->value.uint64 = 0; + } + return 0; + } + return (strcasecmp((*meth)->name, name) == 0 + || __addMethod(&((*meth)->next), name, type, state, value)); +} + + +/** + * returns -1 if non-existent + */ +static int __setMethod(struct native_method * meth, const char * name, + CMPIType type, CMPIValue * value) { + + CMPIStatus rc; + + if (meth == NULL) + return -1; + + if (strcasecmp(meth->name, name) == 0) { + + if (!(meth->state & CMPI_nullValue)) + native_release_CMPIValue(meth->type, &meth->value); + + meth->type = type; + if (type == CMPI_chars) { + meth->type = CMPI_string; + meth->value.string = native_new_CMPIString((char *) value, &rc); + } else { + if (type != CMPI_null) + meth->value = native_clone_CMPIValue(type, value, &rc); + else + meth->state = CMPI_nullValue; + } + return 0; + } + return __setMethod(meth->next, name, type, value); +} + + +static struct native_method * __getMethod(struct native_method * meth, + const char * name) { + + if (!meth || !name) { + return NULL; + } + + return + (strcasecmp(meth->name, name) == 0) ? meth : __getMethod(meth->next, name); +} + + +static CMPIData __getDataMethod(struct native_method * meth, const char * name, + CMPIStatus * rc) { + + struct native_method * m = __getMethod(meth, name); + + CMSetStatus( rc, ( m ) ? CMPI_RC_OK : CMPI_RC_ERR_FAILED); + + return __convert2CMPIData(m, NULL); +} + + +static struct native_method * __getMethodAt(struct native_method * meth, + unsigned int pos) { + + if (!meth) + return NULL; + + return (pos == 0) ? meth : __getMethodAt(meth->next, --pos); +} + + +static CMPIData __getDataMethodAt(struct native_method * meth, unsigned int pos, + CMPIString ** methname, CMPIStatus * rc) { + + struct native_method * m = __getMethodAt(meth, pos); + + CMSetStatus( rc, ( m ) ? CMPI_RC_OK : CMPI_RC_ERR_METHOD_NOT_FOUND); + + return __convert2CMPIData(m, methname); +} + + +static CMPICount __getMethodCount(struct native_method * meth, CMPIStatus * rc) { + CMPICount c = 0; + + CMSetStatus(rc, CMPI_RC_OK); + + while (meth != NULL) { + c++; + meth = meth->next; + } + return c; +} + + +static void __release(struct native_method * meth) { + + struct native_method *next; + + for (; meth; meth = next) { + free(meth->name); + if(meth->state != CMPI_nullValue) + native_release_CMPIValue (meth->type, &meth->value); + parameterFT.release(meth->parameters); + qualifierFT.release(meth->qualifiers); + next = meth->next; + free(meth); + } +} + + +static struct native_method * __clone(struct native_method * meth, + CMPIStatus * rc) { + + struct native_method * result; + CMPIStatus tmp; + + if (meth == NULL) { + CMSetStatus( rc, CMPI_RC_OK); + return NULL; + } + + result = (struct native_method *) calloc(1, sizeof(struct native_method)); + + result->name = strdup(meth->name); + result->type = meth->type; + result->state = meth->state; + result->value = native_clone_CMPIValue(meth->type, &meth->value, &tmp); + + if (tmp.rc != CMPI_RC_OK) + result->state = CMPI_nullValue; + + result->parameters = parameterFT.clone ( meth->parameters, rc ); + result->qualifiers = qualifierFT.clone ( meth->qualifiers, rc ); + + result->next = __clone(meth->next, rc); + return result; +} + + +/** + * Global function table to access native_method helper functions. + */ +struct native_methodFT const methodFT = { + NATIVE_FT_VERSION, + __release, + __clone, + __getMethod, + __addMethod, + __setMethod, + __getDataMethod, + __getDataMethodAt, + __getMethodCount +}; + + + +/****************************************************************************/ + +/*** Local Variables: ***/ +/*** mode: C ***/ +/*** c-basic-offset: 8 ***/ +/*** End: ***/ diff --git a/backend/cimxml/parameter.c b/backend/cimxml/parameter.c new file mode 100644 index 0000000..6fb49f6 --- /dev/null +++ b/backend/cimxml/parameter.c @@ -0,0 +1,229 @@ +/*! + \file parameter.c + \brief Native parameter implementation. + + This module implements a native parameter, which is not public to any + provider programmer. It is used to implement various other data types + natively, such as instances, object-paths and args. + + It provides means to maintain linked lists of named parameters including + functionality to add, remove, clone and release them. + + (C) Copyright IBM Corp. 2013 + + THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE + ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE + CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. + + You can obtain a current copy of the Eclipse Public License from + http://www.opensource.org/licenses/eclipse-1.0.php + + \author Frank Scheffler + $Revision: 1.3 $ +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include "cmcidt.h" +#include "cmcift.h" +#include "cmcimacs.h" +#include "native.h" + +#ifdef DMALLOC +#include "dmalloc.h" +#endif + +//! Storage container for commonly needed data within native CMPI data types. +/*! + This structure is used to build linked lists of data containers as needed + for various native data types. +*/ +// struct native_parameter {} // defined in frontend/sfcc/native.h + +/****************************************************************************/ + +static CMPIData __convert2CMPIData(struct native_parameter * param, + CMPIString ** paramname) { + + CMPIData result = { 0, CMPI_nullValue, { 0 } }; + + if (param != NULL) { + result.type = param->type; + result.state = param->state; + result.value = param->value; + + if (paramname) { + *paramname = native_new_CMPIString(param->name, NULL); + } + } + return result; +} + + +/** + * returns non-zero if already existent + */ +static int __addParameter(struct native_parameter ** param, const char * name, + CMPIType type) { + + CMPIStatus rc; + + if (*param == NULL) { + struct native_parameter * tmp = *param = (struct native_parameter *) calloc(1, + sizeof(struct native_parameter)); + + tmp->name = strdup(name); + tmp->type = type; + + return 0; + } + return (strcasecmp((*param)->name, name) == 0 + || __addParameter(&((*param)->next), name, type)); +} + + +/** + * returns -1 if non-existent + */ +static int __setParameter(struct native_parameter * param, const char * name, + CMPIType type) { + + CMPIStatus rc; + + if (param == NULL) + return -1; + + if (strcasecmp(param->name, name) == 0) { + + if (!(param->state & CMPI_nullValue)) + native_release_CMPIValue(param->type, ¶m->value); + + param->type = type; + + return 0; + } + return __setParameter(param->next, name, type); +} + + +static struct native_parameter * __getParameter(struct native_parameter * param, + const char * name) { + + if (!param || !name) { + return NULL; + } + + return + (strcasecmp(param->name, name) == 0) ? param : __getParameter(param->next, name); +} + + +static CMPIData __getDataParameter(struct native_parameter * param, const char * name, + CMPIStatus * rc) { + + struct native_parameter * p = __getParameter(param, name); + + CMSetStatus( rc, ( p ) ? CMPI_RC_OK : CMPI_RC_ERR_FAILED); + + return __convert2CMPIData(p, NULL); +} + + +static struct native_parameter * __getParameterAt(struct native_parameter * param, + unsigned int pos) { + + if (!param) + return NULL; + + return (pos == 0) ? param : __getParameterAt(param->next, --pos); +} + + +static CMPIData __getDataParameterAt(struct native_parameter * param, unsigned int pos, + CMPIString ** paramname, CMPIStatus * rc) { + + struct native_parameter * p = __getParameterAt(param, pos); + + CMSetStatus( rc, ( p ) ? CMPI_RC_OK : CMPI_RC_ERR_NOT_FOUND); + + return __convert2CMPIData(p, paramname); +} + + +static CMPICount __getParameterCount(struct native_parameter * param, CMPIStatus * rc) { + CMPICount c = 0; + + CMSetStatus(rc, CMPI_RC_OK); + + while (param != NULL) { + c++; + param = param->next; + } + return c; +} + + +static void __release(struct native_parameter * param) { + + struct native_parameter *next; + + for (; param; param = next) { + free(param->name); + if(param->state != CMPI_nullValue) + native_release_CMPIValue(param->type, ¶m->value); + next = param->next; + free(param); + } +} + + +static struct native_parameter * __clone(struct native_parameter * param, + CMPIStatus * rc) { + + struct native_parameter * result; + CMPIStatus tmp; + + if (param == NULL) { + CMSetStatus( rc, CMPI_RC_OK); + return NULL; + } + + result = (struct native_parameter *) calloc(1, sizeof(struct native_parameter)); + + result->name = strdup(param->name); + result->type = param->type; + result->state = param->state; + result->value = native_clone_CMPIValue(param->type, ¶m->value, &tmp); + + if (tmp.rc != CMPI_RC_OK) + result->state = CMPI_nullValue; + + result->next = __clone(param->next, rc); + return result; +} + + +/** + * Global function table to access native_parameter helper functions. + */ +struct native_parameterFT const parameterFT = { + NATIVE_FT_VERSION, + __release, + __clone, + __getParameter, // added this... need it, or just use the getDataParameterX funcs...? + __addParameter, + __setParameter, + __getDataParameter, + __getDataParameterAt, + __getParameterCount +}; + + + +/****************************************************************************/ + +/*** Local Variables: ***/ +/*** mode: C ***/ +/*** c-basic-offset: 8 ***/ +/*** End: ***/ diff --git a/backend/cimxml/parserUtil.c b/backend/cimxml/parserUtil.c index cee43b0..7d1e314 100644 --- a/backend/cimxml/parserUtil.c +++ b/backend/cimxml/parserUtil.c @@ -1,7 +1,7 @@ /* * $id$ * - * © Copyright IBM Corp. 2007 + * © Copyright IBM Corp. 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -44,6 +44,15 @@ extern int addClassPropertyQualifier( CMPIConstClass* cc, char * pname, extern int addClassQualifier( CMPIConstClass* cc, char * name, CMPIValue * value, CMPIType type); +extern int addClassMethod( CMPIConstClass* cc, char * mname, + CMPIValue * value, CMPIType type, + CMPIValueState state); +extern int addClassMethodQualifier( CMPIConstClass* cc, char * mname, + char *qname, CMPIValue * value, + CMPIType type); +extern int addClassMethodParameter( CMPIConstClass* cc, char * mname, + char *pname, + CMPIType type); extern char *XmlToAsciiStr(char *XmlStr); #if DEBUG @@ -221,6 +230,64 @@ void setInstQualifiers(CMPIInstance *ci, XtokQualifiers *qs) } } +void setClassMethods(CMPIConstClass *cls, XtokMethods *ms) +{ + XtokMethod *nm = NULL,*m = ms ? ms->first : NULL; + CMPIValue val; + CMPIArray *arr = NULL; + XtokQualifier *nq,*q; + XtokQualifiers *qs; + XtokParam *np,*p; + XtokParams *ps; + int rc, n; + + val.uint64=0l; + while (m) { + addClassMethod(cls, m->name, &val, m->type, CMPI_nullValue); + + qs=&m->qualifiers; + q=qs ? qs->first : NULL; + n=0; + while (q) { + if (q->type & CMPI_ARRAY) { + CMPIType type=q->type&~CMPI_ARRAY; + arr = newCMPIArray(0, type, NULL); + int i; + if (q->data.array.max) { + for (i = 0; i < q->data.array.next; ++i) { + val = str2CMPIValue(type, q->data.array.values[i], NULL); + CMSetArrayElementAt(arr, i, &val, type); + native_release_CMPIValue(type,&val); + } + } + val.array = arr; + rc = addClassMethodQualifier(cls, m->name, q->name, &val, q->type); + native_release_CMPIValue(q->type,(CMPIValue*)&arr); + } + else { + val = str2CMPIValue(q->type, q->data.value.data.value, NULL); + rc= addClassMethodQualifier(cls, m->name, q->name, &val, q->type); + native_release_CMPIValue(q->type,&val); + } + nq = q->next; + q = nq; + } + + ps=&m->params; + p=ps ? ps->first : NULL; + n=0; + while (p) { + rc= addClassMethodParameter(cls, m->name, p->name, p->type); + np = p->next; + p = np; + } + + nm = m->next; + m = nm; + } + if (ms) ms->first = ms->last = NULL; +} + void setClassProperties(CMPIConstClass *cls, XtokProperties *ps) { XtokProperty *np = NULL,*p = ps ? ps->first : NULL; diff --git a/backend/cimxml/qualifier.c b/backend/cimxml/qualifier.c index b5ea8bb..92cc298 100644 --- a/backend/cimxml/qualifier.c +++ b/backend/cimxml/qualifier.c @@ -39,14 +39,7 @@ This structure is used to build linked lists of data containers as needed for various native data types. */ -struct native_qualifier { - char * name; //!< Qualifier identifier. - CMPIType type; //!< Associated CMPIType. - CMPIValueState state; //!< Current value state. - CMPIValue value; //!< Current value. - struct native_qualifier * next; //!< Pointer to next qualifier. -}; - +// struct native_qualifier {} // defined in frontend/sfcc/native.h /****************************************************************************/ diff --git a/frontend/sfcc/cmcift.h b/frontend/sfcc/cmcift.h index a3ffc63..84cb68c 100644 --- a/frontend/sfcc/cmcift.h +++ b/frontend/sfcc/cmcift.h @@ -117,6 +117,33 @@ typedef struct _CMPIConstClassFT { unsigned int (*getPropertyQualifierCount) (CMPIConstClass * ccls,const char *pname, CMPIStatus* rc); + + CMPIData (*getMethod) + (CMPIConstClass * ccls, const char *name, CMPIStatus* rc); + CMPIData (*getMethodAt) + (CMPIConstClass * ccls, unsigned int index, CMPIString** name, + CMPIStatus* rc); + unsigned int (*getMethodCount) + (CMPIConstClass * ccls, CMPIStatus* rc); + + + CMPIData (*getMethodParameter) + (CMPIConstClass * ccls, const char *mname, const char *pname, CMPIStatus* rc); + CMPIData (*getMethodParameterAt) + (CMPIConstClass * ccls, const char *mname, unsigned int index, CMPIString** name, + CMPIStatus* rc); + unsigned int (*getMethodParameterCount) + (CMPIConstClass * ccls, const char *mname, CMPIStatus* rc); + + + CMPIData (*getMethodQualifier) + (CMPIConstClass * ccls, const char *mname, const char *qname, CMPIStatus* rc); + CMPIData (*getMethodQualifierAt) + (CMPIConstClass * ccls, const char *mname, unsigned int index, CMPIString** name, + CMPIStatus* rc); + unsigned int (*getMethodQualifierCount) + (CMPIConstClass * ccls, const char *mname, CMPIStatus* rc); + } CMPIConstClassFT; diff --git a/frontend/sfcc/native.h b/frontend/sfcc/native.h index 2b14ab9..354bbd1 100644 --- a/frontend/sfcc/native.h +++ b/frontend/sfcc/native.h @@ -62,6 +62,7 @@ struct native_enum { //! Forward declaration for anonymous struct. struct native_property; struct native_qualifier; +struct native_method; struct native_constClass { CMPIConstClass ccls; @@ -69,7 +70,8 @@ struct native_constClass { char * classname; struct native_property * props; - struct native_qualifier *qualifiers; + struct native_qualifier *qualifiers; + struct native_method *methods; }; struct native_instance { @@ -83,9 +85,28 @@ struct native_instance { char ** key_list; struct native_property * props; - struct native_qualifier *qualifiers; + struct native_qualifier *qualifiers; }; +struct native_method { + char * name; //!< Method identifier. + CMPIType type; //!< Associated CMPIType. + CMPIValueState state; //!< Current value state. + CMPIValue value; //!< Current value. + struct native_parameter *parameters; //!< Methods have Parameters + struct native_qualifier *qualifiers; //!< Methods have Qualifiers. + struct native_method *next; //!< Pointer to next method. +}; + +struct native_parameter { + char * name; //!< Parameter identifier. + CMPIType type; //!< Associated CMPIType. + CMPIValueState state; //!< Current value state. + CMPIValue value; //!< Current value. + struct native_parameter *next; //!< Pointer to next parameter. +}; +// TODO: add support for parameter qualifiers, references, reference arrays + struct native_property { char * name; //!< Property identifier. CMPIType type; //!< Associated CMPIType. @@ -95,6 +116,14 @@ struct native_property { struct native_property * next; //!< Pointer to next property. }; +struct native_qualifier { + char * name; //!< Qualifier identifier. + CMPIType type; //!< Associated CMPIType. + CMPIValueState state; //!< Current value state. + CMPIValue value; //!< Current value. + struct native_qualifier * next; //!< Pointer to next qualifier. +}; + //! Function table for native_property handling functions. /*! @@ -196,6 +225,93 @@ struct native_qualifierFT CMPIStatus * ); }; +struct native_methodFT +{ + //! Function table version + int ftVersion; + + //! Releases a complete list of native_method items. + void (* release) ( struct native_method * ); + + //! Clones a complete list of native_method items. + struct native_method * (* clone) ( struct native_method *, + CMPIStatus * ); + + //! Gets a native_property by name + struct native_method* (* getMethod) ( struct native_method *, + const char *); + + //! Adds a new native_method to a list. + int (* addMethod) ( struct native_method **, + const char *, + CMPIType, + CMPIValueState, + CMPIValue * ); + + //! Resets the values of an existing native_method, if existent. + int (* setMethod) ( struct native_method *, + const char *, + CMPIType, + CMPIValue * ); + + //! Looks up a specific native_method in CMPIData format. + CMPIData (* getDataMethod) ( struct native_method *, + const char *, + CMPIStatus * ); + + //! Extract an indexed native_method in CMPIData format. + CMPIData (* getDataMethodAt) ( struct native_method *, + unsigned int, + CMPIString **, + CMPIStatus * ); + + //! Yields the number of native_method items in a list. + CMPICount (* getMethodCount) ( struct native_method *, + CMPIStatus * ); +}; + +struct native_parameterFT +{ + //! Function table version + int ftVersion; + + //! Releases a complete list of native_parameter items. + void (* release) ( struct native_parameter * ); + + //! Clones a complete list of native_parameter items. + struct native_parameter * (* clone) ( struct native_parameter *, + CMPIStatus * ); + + //! Gets a native_property by name + struct native_parameter* (* getParameter) ( struct native_parameter *, + const char *); + + //! Adds a new native_parameter to a list. + int (* addParameter) ( struct native_parameter **, + const char *, + CMPIType ); + + //! Resets the values of an existing native_parameter, if existent. + int (* setParameter) ( struct native_parameter *, + const char *, + CMPIType ); + + //! Looks up a specific native_parameter in CMPIData format. + CMPIData (* getDataParameter) ( struct native_parameter *, + const char *, + CMPIStatus * ); + + //! Extract an indexed native_parameter in CMPIData format. + CMPIData (* getDataParameterAt) ( struct native_parameter *, + unsigned int, + CMPIString **, + CMPIStatus * ); + + //! Yields the number of native_parameter items in a list. + CMPICount (* getParameterCount) ( struct native_parameter *, + CMPIStatus * ); +}; + extern int addInstQualifier( CMPIInstance* ci, char * name, CMPIValue * value, CMPIType type); @@ -239,6 +355,8 @@ CMPIValue *getKeyValueTypePtr(char *type, char *value, struct xtokValueReference #define newCMPIArgs native_new_CMPIArgs /****************************************************************************/ +extern struct native_methodFT const methodFT; +extern struct native_parameterFT const parameterFT; extern struct native_propertyFT const propertyFT; extern struct native_qualifierFT const qualifierFT; hooks/post-receive -- SFCC - Small Footprint CIM Client |
From: Chris B. <buc...@us...> - 2013-02-07 20:39:31
|
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 83d264194c00334f8a04c69a412ddd5c0f132b26 (commit) via 8887efc44e6b00e371747e8c7010b1504bb02b23 (commit) via b2e911de6a717de388d7971d8d7a5ee652da9be3 (commit) via 1b5ad920c5d19d82adbc2318a3e8a0c83a9e28da (commit) from 81f5b790162d0fd6d40ff4f2781d9506418c59d2 (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 83d264194c00334f8a04c69a412ddd5c0f132b26 Author: buccella <buc...@li...> Date: Thu Feb 7 15:38:46 2013 -0500 [ 3603454 ] control should do type conversions on startup commit 8887efc44e6b00e371747e8c7010b1504bb02b23 Merge: b2e911d 81f5b79 Author: buccella <buc...@li...> Date: Thu Feb 7 15:33:59 2013 -0500 Merge branch 'master' of ssh://sblim.git.sourceforge.net/gitroot/sblim/sfcb commit b2e911de6a717de388d7971d8d7a5ee652da9be3 Merge: 1b5ad92 735acc7 Author: buccella <buc...@li...> Date: Tue Feb 5 17:01:33 2013 -0500 Merge branch 'master' of ssh://sblim.git.sourceforge.net/gitroot/sblim/sfcb commit 1b5ad920c5d19d82adbc2318a3e8a0c83a9e28da Author: buccella <buc...@li...> Date: Tue Feb 5 17:01:17 2013 -0500 [ 3603454 ] control should do type conversions on startup ----------------------------------------------------------------------- Summary of changes: diff --git a/NEWS b/NEWS index adf83c8..d98a01e 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,7 @@ Bugs fixed: - 3601661 Reenable no-fork http adapter mode - 2990304 Enhancements for sfcb - 2778345 There is no response at GetClass after CreateClass +- 3603454 control should do type conversions on startup Changes in 1.4.3 ================ diff --git a/control.c b/control.c index 43d3513..caaf5d2 100644 --- a/control.c +++ b/control.c @@ -44,10 +44,24 @@ #define SFCB_LIBDIR "/usr/lib" #endif +union ctl_num { + _Bool b; + unsigned int uint; + long slong; + unsigned long ulong; +}; + typedef struct control { char *id; +#define CTL_STRING 0 +#define CTL_USTRING 1 /* unstripped string */ +#define CTL_BOOL 2 +#define CTL_LONG 3 +#define CTL_ULONG 4 +#define CTL_UINT 5 int type; char *strValue; + union ctl_num intValue; int dupped; } Control; @@ -57,83 +71,80 @@ char *configfile = NULL; char *ip4List= NULL; char *ip6List= NULL; -// Control initial values -// { property, type, value} -// Type: 0=string, 1=num, 2=bool, 3=unstripped string +/* Control initial values + { property, type, string value, numeric value} */ Control init[] = { - {"ip4AddrList", 0, NULL}, - {"ip6AddrList", 0, NULL}, - {"httpPort", 1, "5988"}, - {"enableHttp", 2, "true"}, - {"enableUds", 2, "true"}, - {"httpProcs", 1, "8"}, - {"httpsPort", 1, "5989"}, - {"enableHttps", 2, "false"}, - {"httpLocalOnly", 2, "false"}, - {"httpUserSFCB", 2, "true"}, - {"httpUser", 0, ""}, + {"ip4AddrList", CTL_STRING, NULL, {0}}, + {"ip6AddrList", CTL_STRING, NULL, {0}}, + {"httpPort", CTL_LONG, NULL, {.slong=5988}}, + {"enableHttp", CTL_BOOL, NULL, {.b=1}}, + {"enableUds", CTL_BOOL, NULL, {.b=1}}, + {"httpProcs", CTL_LONG, NULL, {.slong=8}}, + {"httpsPort", CTL_LONG, NULL, {.slong=5989}}, + {"enableHttps", CTL_BOOL, NULL, {.b=0}}, + {"httpLocalOnly", CTL_BOOL, NULL, {.b=0}}, + {"httpUserSFCB", CTL_BOOL, NULL, {.b=1}}, + {"httpUser", CTL_STRING, "", {0}}, #ifdef HAVE_SLP - {"enableSlp", 2, "true"}, - {"slpRefreshInterval", 1, "600"}, + {"enableSlp", CTL_BOOL, NULL, {.b=1}}, + {"slpRefreshInterval", CTL_LONG, NULL, {.slong=600}}, #endif - {"provProcs", 1, "32"}, - {"sfcbCustomLib", 0, "sfcCustomLib"}, - {"basicAuthLib", 0, "sfcBasicAuthentication"}, - {"basicAuthEntry", 0, "_sfcBasicAuthenticate"}, - {"doBasicAuth", 2, "false"}, - {"doUdsAuth", 2, "false"}, - - {"useChunking", 2, "false"}, - {"chunkSize", 1, "50000"}, - - {"trimWhitespace", 2, "true"}, - - {"keepaliveTimeout", 1, "15"}, - {"keepaliveMaxRequest", 1, "10"}, - {"selectTimeout", 1, "5"}, - - {"providerSampleInterval", 1, "30"}, - {"providerTimeoutInterval", 1, "60"}, - {"providerAutoGroup", 2, "true"}, - {"providerDefaultUserSFCB", 2, "true"}, - {"providerDefaultUser", 0, ""}, - - {"sslKeyFilePath", 0, SFCB_CONFDIR "/file.pem"}, - {"sslCertificateFilePath", 0, SFCB_CONFDIR "/server.pem"}, - {"sslCertList", 0, SFCB_CONFDIR "/clist.pem"}, - {"sslCiphers", 0, "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH"}, - - {"registrationDir", 0, SFCB_STATEDIR "/registration"}, - {"providerDirs", 3, SFCB_LIBDIR " " CMPI_LIBDIR " " LIBDIR}, /* 3: - * unstripped - */ - - {"enableInterOp", 2, "true"}, - {"sslClientTrustStore", 0, SFCB_CONFDIR "/client.pem"}, - {"sslClientCertificate", 0, "ignore"}, - {"sslIndicationReceiverCert", 0, "ignore" }, - {"certificateAuthLib", 0, "sfcCertificateAuthentication"}, - {"localSocketPath", 0, "/tmp/sfcbLocalSocket"}, - {"httpSocketPath", 0, "/tmp/sfcbHttpSocket"}, - {"socketPathGroupPerm", 0, NULL}, - - {"traceFile", 0, "stderr"}, - {"traceLevel", 1, "0"}, - {"traceMask", 1, "0"}, - - {"httpMaxContentLength", 1, "100000000"}, - {"validateMethodParamTypes", 2, "false"}, - {"maxMsgLen", 1, "10000000"}, - {"networkInterface", 3, NULL}, - {"DeliveryRetryInterval",1,"20"}, - {"DeliveryRetryAttempts",1,"3"}, - {"SubscriptionRemovalTimeInterval",1,"2592000"}, - {"SubscriptionRemovalAction",1,"2"}, - {"indicationDeliveryThreadLimit",1,"30"}, - {"indicationDeliveryThreadTimeout",1,"0"}, - {"MaxListenerDestinations",1,"100"}, - {"MaxActiveSubscriptions",1,"100"}, - {"indicationCurlTimeout",1,"10"}, + {"provProcs", CTL_LONG, NULL, {.slong=32}}, + {"sfcbCustomLib", CTL_STRING, "sfcCustomLib", {0}}, + {"basicAuthLib", CTL_STRING, "sfcBasicAuthentication", {0}}, + {"basicAuthEntry", CTL_STRING, "_sfcBasicAuthenticate", {0}}, + {"doBasicAuth", CTL_BOOL, NULL, {.b=0}}, + {"doUdsAuth", CTL_BOOL, NULL, {.b=0}}, + + {"useChunking", CTL_BOOL, NULL, {.b=1}}, + {"chunkSize", CTL_LONG, NULL, {.slong=50000}}, + + {"trimWhitespace", CTL_BOOL, NULL, {.b=1}}, + + {"keepaliveTimeout", CTL_LONG, NULL, {.slong=15}}, + {"keepaliveMaxRequest", CTL_LONG, NULL, {.slong=10}}, + {"selectTimeout", CTL_LONG, NULL, {.slong=5}}, + + {"providerSampleInterval", CTL_LONG, NULL, {.slong=30}}, + {"providerTimeoutInterval", CTL_LONG, NULL, {.slong=60}}, + {"providerAutoGroup", CTL_BOOL, NULL, {.b=1}}, + {"providerDefaultUserSFCB", CTL_BOOL, NULL, {.b=1}}, + {"providerDefaultUser", CTL_STRING, "", {0}}, + + {"sslKeyFilePath", CTL_STRING, SFCB_CONFDIR "/file.pem", {0}}, + {"sslCertificateFilePath", CTL_STRING, SFCB_CONFDIR "/server.pem", {0}}, + {"sslCertList", CTL_STRING, SFCB_CONFDIR "/clist.pem", {0}}, + {"sslCiphers", CTL_STRING, "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH", {0}}, + + {"registrationDir", CTL_STRING, SFCB_STATEDIR "/registration", {0}}, + {"providerDirs", CTL_USTRING, SFCB_LIBDIR " " CMPI_LIBDIR " " LIBDIR, {0}}, + + {"enableInterOp", CTL_BOOL, NULL, {.b=1}}, + {"sslClientTrustStore", CTL_STRING, SFCB_CONFDIR "/client.pem", {0}}, + {"sslClientCertificate", CTL_STRING, "ignore", {0}}, + {"sslIndicationReceiverCert", CTL_STRING, "ignore", {0}}, + {"certificateAuthLib", CTL_STRING, "sfcCertificateAuthentication", {0}}, + {"localSocketPath", CTL_STRING, "/tmp/sfcbLocalSocket", {0}}, + {"httpSocketPath", CTL_STRING, "/tmp/sfcbHttpSocket", {0}}, + {"socketPathGroupPerm", CTL_STRING, NULL, {0}}, + + {"traceFile", CTL_STRING, "stderr", {0}}, + {"traceLevel", CTL_LONG, NULL, {.slong=0}}, + {"traceMask", CTL_LONG, NULL, {.slong=0}}, + + {"httpMaxContentLength", CTL_UINT, NULL, {.uint=100000000}}, + {"validateMethodParamTypes", CTL_BOOL, NULL, {.b=0}}, + {"maxMsgLen", CTL_ULONG, NULL, {.ulong=10000000}}, + {"networkInterface", CTL_USTRING, NULL, {0}}, + {"DeliveryRetryInterval", CTL_UINT, NULL, {.uint=20}}, + {"DeliveryRetryAttempts", CTL_UINT, NULL, {.uint=3}}, + {"SubscriptionRemovalTimeInterval", CTL_UINT, NULL, {.uint=2592000}}, + {"SubscriptionRemovalAction", CTL_UINT, NULL, {.uint=2}}, + {"indicationDeliveryThreadLimit", CTL_LONG, NULL, {.slong=30}}, + {"indicationDeliveryThreadTimeout", CTL_LONG, NULL, {.slong=0}}, + {"MaxListenerDestinations", CTL_LONG, NULL, {.slong=100}}, + {"MaxActiveSubscriptions", CTL_LONG, NULL, {.slong=100}}, + {"indicationCurlTimeout", CTL_LONG, NULL, {.slong=10}}, }; void @@ -154,6 +165,20 @@ sunsetControl() } } +static int +getUNum(char* str, unsigned long *val, unsigned int max) { + + if (isdigit(str[0])) { + unsigned long tmp = strtoul(str, NULL, 0); + if (tmp < max) { + *val = tmp; + return 0; + } + } + *val = 0; + return -1; +} + int setupControl(char *fn) { @@ -170,13 +195,6 @@ setupControl(char *fn) if (ct) return 0; - ct = UtilFactory->newHashTable(61, UtilHashTable_charKey | - UtilHashTable_ignoreKeyCase); - - for (i = 0, m = sizeof(init) / sizeof(Control); i < m; i++) { - ct->ft->put(ct, init[i].id, &init[i]); - } - if (fn) { if (strlen(fn) >= sizeof(fin)) mlogf(M_ERROR,M_SHOW, "--- \"%s\" too long\n", fn); @@ -201,6 +219,15 @@ setupControl(char *fn) return -2; } + /* populate HT with default values */ + ct = UtilFactory->newHashTable(61, UtilHashTable_charKey | + UtilHashTable_ignoreKeyCase); + + for (i = 0, m = sizeof(init) / sizeof(Control); i < m; i++) { + ct->ft->put(ct, init[i].id, &init[i]); + } + + /* run through the config file lines */ while (fgets(fin, 1024, in)) { n++; if (stmt) @@ -216,18 +243,70 @@ setupControl(char *fn) case 2: for (i = 0; i < sizeof(init) / sizeof(Control); i++) { if (strcmp(rv.id, init[i].id) == 0) { - if (init[i].type == 3) { - /* - * unstripped character string - */ + /* unstripped character string */ + if (init[i].type == CTL_USTRING) { init[i].strValue = strdup(rv.val); if (strchr(init[i].strValue, '\n')) *(strchr(init[i].strValue, '\n')) = 0; init[i].dupped = 1; - } else { + } + /* string */ + else if (init[i].type == CTL_STRING) { init[i].strValue = strdup(cntlGetVal(&rv)); init[i].dupped = 1; } + /* numeric */ + else { + + char* val = cntlGetVal(&rv); + long slval; + unsigned long ulval; + + switch (init[i].type) { + + case CTL_BOOL: + if (strcasecmp(val, "true") == 0) { + init[i].intValue.b = 1; + } + else if (strcasecmp(val, "false") == 0) { + init[i].intValue.b = 0; + } + else { + err = 1; + } + break; + + case CTL_LONG: + slval = strtol(val, NULL, 0); + init[i].intValue.slong = slval; + break; + + case CTL_ULONG: + if (getUNum(val, &ulval, ULONG_MAX) == 0) { + init[i].intValue.ulong = ulval; + } + else { + err = 1; + } + break; + + case CTL_UINT: + if (getUNum(val, &ulval, UINT_MAX) == 0) { + init[i].intValue.uint = (unsigned int)ulval; + } + else { + err = 1; + } + break; + } + + if (!err) { + ct->ft->put(ct, init[i].id, &init[i]); + } + + } + if (err) break; + goto ok; } } @@ -237,9 +316,11 @@ setupControl(char *fn) ok: break; case 3: - break; + break; /* control line is just a comment */ } + if (err) break; } + if (stmt) free(stmt); @@ -265,7 +346,7 @@ getControlChars(char *id, char **val) } if ((ctl = ct->ft->get(ct, id))) { - if (ctl->type == 0 || ctl->type == 3) { + if (ctl->type == CTL_STRING || ctl->type == CTL_USTRING) { *val = ctl->strValue; return 0; } @@ -286,8 +367,8 @@ getControlNum(char *id, long *val) } if ((ctl = ct->ft->get(ct, id))) { - if (ctl->type == 1) { - *val = strtol(ctl->strValue, NULL, 0); + if (ctl->type == CTL_LONG) { + *val = ctl->intValue.slong; return 0; } rc = -2; @@ -307,12 +388,9 @@ getControlUNum(char *id, unsigned int *val) } if ((ctl = ct->ft->get(ct, id))) { - if (ctl->type == 1 && isdigit(ctl->strValue[0])) { - unsigned long tmp = strtoul(ctl->strValue, NULL, 0); - if (tmp < UINT_MAX) { - *val = tmp; - return 0; - } + if (ctl->type == CTL_UINT) { + *val = ctl->intValue.uint; + return 0; } rc = -2; } @@ -331,12 +409,9 @@ getControlULong(char *id, unsigned long *val) } if ((ctl = ct->ft->get(ct, id))) { - if (ctl->type == 1 && isdigit(ctl->strValue[0])) { - unsigned long tmp = strtoul(ctl->strValue, NULL, 0); - if (tmp < ULONG_MAX) { - *val = tmp; - return 0; - } + if (ctl->type == CTL_ULONG) { + *val = ctl->intValue.ulong; + return 0; } rc = -2; } @@ -347,11 +422,15 @@ getControlULong(char *id, unsigned long *val) int getControlBool(char *id, int *val) { + if (ct == NULL) { + setupControl(configfile); + } + Control *ctl; int rc = -1; if ((ctl = ct->ft->get(ct, id))) { - if (ctl->type == 2) { - *val = strcasecmp(ctl->strValue, "true") == 0; + if (ctl->type == CTL_BOOL) { + *val = ctl->intValue.b; return 0; } rc = -2; @@ -359,6 +438,8 @@ getControlBool(char *id, int *val) *val = 0; return rc; } + + /* MODELINES */ /* DO NOT EDIT BELOW THIS COMMENT */ /* Modelines are added by 'make pretty' */ hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Michael Chase-S. <mc...@us...> - 2013-02-07 17:58:09
|
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 81f5b790162d0fd6d40ff4f2781d9506418c59d2 (commit) from 735acc776f56599ec1124bb7626835c2ff1b6104 (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 81f5b790162d0fd6d40ff4f2781d9506418c59d2 Author: Michael Chase-Salerno <br...@li...> Date: Thu Feb 7 12:56:40 2013 -0500 Unittest fixes for trimws ----------------------------------------------------------------------- Summary of changes: diff --git a/test/unittest/EmbeddedTests.c b/test/unittest/EmbeddedTests.c index 333e309..f44f062 100644 --- a/test/unittest/EmbeddedTests.c +++ b/test/unittest/EmbeddedTests.c @@ -22,6 +22,7 @@ #include "trace.h" #include "queryOperation.h" #include "objectImpl.h" +int trimws; int main(void) diff --git a/test/unittest/newCMPIInstance.c b/test/unittest/newCMPIInstance.c index 3c71e78..6e7342e 100644 --- a/test/unittest/newCMPIInstance.c +++ b/test/unittest/newCMPIInstance.c @@ -24,6 +24,7 @@ extern CMPIInstance *internal_new_CMPIInstance(int mode, const CMPIObjectPath * cop, CMPIStatus *rc, int override); +int trimws; int main(void) hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Michael Chase-S. <mc...@us...> - 2013-02-06 21:12:45
|
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 "gather - Metric Data Gatherer". The branch, master has been updated via ee243db78f020f4e4047108fea2f63844ef81c40 (commit) from cdc102426953830c23f4d8421c44fa0776e6f14f (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 ee243db78f020f4e4047108fea2f63844ef81c40 Author: Michael Chase-Salerno <br...@li...> Date: Wed Feb 6 16:11:58 2013 -0500 2284848 CPU utilization should account for steal-time ----------------------------------------------------------------------- Summary of changes: ChangeLog | 6 +++ NEWS | 1 + plugin/repositoryOperatingSystem.c | 83 +++++++++++++++++++++++++++++++++++- 3 files changed, 88 insertions(+), 2 deletions(-) hooks/post-receive -- gather - Metric Data Gatherer |
From: Dave B. <bla...@us...> - 2013-02-06 15:20:52
|
Update of /cvsroot/sblim/jsr48-client In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv15105 Modified Files: Tag: Experimental sblim-cim-client2.properties Log Message: 3598613 different data type in cim instance and cim object path Index: sblim-cim-client2.properties =================================================================== RCS file: /cvsroot/sblim/jsr48-client/sblim-cim-client2.properties,v retrieving revision 1.1.2.36 retrieving revision 1.1.2.37 diff -u -d -r1.1.2.36 -r1.1.2.37 --- sblim-cim-client2.properties 17 Jan 2013 14:28:20 -0000 1.1.2.36 +++ sblim-cim-client2.properties 6 Feb 2013 15:20:50 -0000 1.1.2.37 @@ -1,5 +1,5 @@ # -# (C) Copyright IBM Corp. 2006, 2011 +# (C) Copyright IBM Corp. 2006, 2013 # # THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE # ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE |
From: Dave B. <bla...@us...> - 2013-02-06 15:12:07
|
Update of /cvsroot/sblim/jsr48-client In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv13921 Modified Files: NEWS Log Message: 3601894 Enhance HTTP and CIM-XML tracing Index: NEWS =================================================================== RCS file: /cvsroot/sblim/jsr48-client/NEWS,v retrieving revision 1.333 retrieving revision 1.334 diff -u -d -r1.333 -r1.334 --- NEWS 6 Feb 2013 15:10:34 -0000 1.333 +++ NEWS 6 Feb 2013 15:12:04 -0000 1.334 @@ -1,5 +1,6 @@ Changes in HEAD ================ +3601894 Enhance HTTP and CIM-XML tracing 3598613 different data type in cim instance and cim object path 3596303 windows http response WWW-Authenticate: Negotiate fails |
From: Dave B. <bla...@us...> - 2013-02-06 15:10:36
|
Update of /cvsroot/sblim/jsr48-client In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv13779 Modified Files: NEWS Log Message: 3598613 different data type in cim instance and cim object path Index: NEWS =================================================================== RCS file: /cvsroot/sblim/jsr48-client/NEWS,v retrieving revision 1.332 retrieving revision 1.333 diff -u -d -r1.332 -r1.333 --- NEWS 6 Feb 2013 15:08:50 -0000 1.332 +++ NEWS 6 Feb 2013 15:10:34 -0000 1.333 @@ -1,5 +1,6 @@ Changes in HEAD ================ +3598613 different data type in cim instance and cim object path 3596303 windows http response WWW-Authenticate: Negotiate fails Version 2.2.1 |
From: Dave B. <bla...@us...> - 2013-02-06 15:08:52
|
Update of /cvsroot/sblim/jsr48-client In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv13495 Modified Files: NEWS Log Message: 3596303 windows http response WWW-Authenticate: Negotiate fails Index: NEWS =================================================================== RCS file: /cvsroot/sblim/jsr48-client/NEWS,v retrieving revision 1.331 retrieving revision 1.332 diff -u -d -r1.331 -r1.332 --- NEWS 14 Dec 2012 12:16:02 -0000 1.331 +++ NEWS 6 Feb 2013 15:08:50 -0000 1.332 @@ -1,3 +1,7 @@ +Changes in HEAD +================ +3596303 windows http response WWW-Authenticate: Negotiate fails + Version 2.2.1 ================ 3584119 Update detailed release history HTML for 2.2.1 |
From: Dave B. <bla...@us...> - 2013-02-06 15:01:08
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/http In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv11852/src/org/sblim/cimclient/internal/http Modified Files: HttpHeader.java HttpClient.java MessageWriter.java MessageReader.java Log Message: 3601894 Enhance HTTP and CIM-XML tracing Index: MessageReader.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/http/MessageReader.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- MessageReader.java 29 Jul 2010 14:01:25 -0000 1.7 +++ MessageReader.java 6 Feb 2013 15:01:05 -0000 1.8 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2005, 2010 + * (C) Copyright IBM Corp. 2005, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -20,6 +20,7 @@ * 2003590 2008-06-30 blaschke-oss Change licensing from CPL to EPL * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) * 3027479 2010-07-09 blaschke-oss Dead store to local variable + * 3601894 2013-01-23 blaschke-oss Enhance HTTP and CIM-XML tracing */ package org.sblim.cimclient.internal.http; @@ -93,7 +94,7 @@ } if (this.iChunked) { this.iContent = new ChunkedInputStream(new PersistentInputStream(pStream, - isPersistentConnectionSupported())); + isPersistentConnectionSupported()), "Indication Request"); } else { this.iContent = new BoundedInputStream(new PersistentInputStream(pStream, isPersistentConnectionSupported()), contentLength); Index: MessageWriter.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/http/MessageWriter.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- MessageWriter.java 4 Jun 2011 10:14:26 -0000 1.8 +++ MessageWriter.java 6 Feb 2013 15:01:05 -0000 1.9 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2005, 2011 + * (C) Copyright IBM Corp. 2005, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -21,6 +21,7 @@ * 2003590 2008-06-30 blaschke-oss Change licensing from CPL to EPL * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) * 3304058 2011-05-20 blaschke-oss Use same date format in change history + * 3601894 2013-01-23 blaschke-oss Enhance HTTP and CIM-XML tracing */ package org.sblim.cimclient.internal.http; @@ -28,10 +29,12 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; +import java.util.logging.Level; import org.sblim.cimclient.internal.http.io.ASCIIPrintStream; import org.sblim.cimclient.internal.http.io.ChunkedOutputStream; import org.sblim.cimclient.internal.http.io.PersistentOutputStream; +import org.sblim.cimclient.internal.logging.LogAndTraceBroker; /** * Class MessageWriter is responsible for creating http messages @@ -149,10 +152,14 @@ this.iHeader.addField("Content-Type", "application/xml;charset=\"utf-8\""); if (!this.iChunked) this.iHeader.addField("Content-length", Integer .toString(this.iBufferedOS.size())); + LogAndTraceBroker.getBroker().trace(Level.FINER, + "Indication Response HTTP Headers= " + this.iHeader.toString()); this.iHeader.write(this.iRealOS); this.iRealOS.flush(); this.iBufferedOS.writeTo(this.iRealOS); if (this.iChunked && (this.iTrailer != null)) { + LogAndTraceBroker.getBroker().trace(Level.FINER, + "Indication Response HTTP Trailer Headers= " + this.iTrailer.toString()); this.iTrailer.write(this.iRealOS); } this.iRealOS.flush(); Index: HttpHeader.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/http/HttpHeader.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- HttpHeader.java 17 Aug 2012 02:47:40 -0000 1.12 +++ HttpHeader.java 6 Feb 2013 15:01:05 -0000 1.13 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2005, 2012 + * (C) Copyright IBM Corp. 2005, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -25,10 +25,11 @@ * 2003590 2008-06-30 blaschke-oss Change licensing from CPL to EPL * 2204488 2008-10-28 raman_arora Fix code to remove compiler warnings * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) - * 2531371 2009-02-10 raman_arora Upgrade client to JDK 1.5 (Phase 2) + * 2531371 2009-02-10 raman_arora Upgrade client to JDK 1.5 (Phase 2) * 2641758 2009-02-27 blaschke-oss CIM Client does not recognize HTTP extension headers * 3304058 2011-05-20 blaschke-oss Use same date format in change history * 3553858 2012-08-06 blaschke-oss Append duplicate HTTP header fields instead of replace + * 3601894 2013-01-23 blaschke-oss Enhance HTTP and CIM-XML tracing */ package org.sblim.cimclient.internal.http; @@ -439,12 +440,32 @@ * @throws TrailerException */ public void examineTrailer() throws TrailerException { + examineTrailer(null); + } + + /** + * Throws a TrailerException if it contains recognized CIM errors in http + * trailer entries. + * + * @param pOrigin + * The origin of the trailer (response, request, etc.) + * @throws TrailerException + */ + public void examineTrailer(String pOrigin) throws TrailerException { Iterator<Entry<HeaderEntry, String>> itr = this.iterator(); - int code = 0; + int code = 0, i = 0; String desc = null; + StringBuilder hdrs = null; + if (LogAndTraceBroker.getBroker().isLoggableTrace(Level.FINER)) hdrs = new StringBuilder(); while (itr.hasNext()) { Entry<HeaderEntry, String> ent = itr.next(); String keyStr = ent.getKey().toString(); + if (hdrs != null) { + if (i++ > 0) hdrs.append(','); + hdrs.append(keyStr); + hdrs.append(": "); + hdrs.append(this.getField(keyStr)); + } try { if (keyStr.equalsIgnoreCase(WBEMConstants.HTTP_TRAILER_STATUS_CODE)) { String valStr = URLDecoder.decode(this.getField(keyStr), WBEMConstants.UTF8); @@ -457,6 +478,10 @@ throw new Error(e); } } + if (hdrs != null && hdrs.length() > 0) LogAndTraceBroker.getBroker().trace( + Level.FINER, + (pOrigin == null ? "Unknown" : pOrigin) + " HTTP Trailer Headers= " + + hdrs.toString()); if (code > 0 || desc != null) { if (code > 0) { throw new TrailerException(new WBEMException(code, desc)); } throw new TrailerException(new WBEMException(desc)); Index: HttpClient.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/http/HttpClient.java,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- HttpClient.java 26 Nov 2012 13:22:14 -0000 1.43 +++ HttpClient.java 6 Feb 2013 15:01:05 -0000 1.44 @@ -1,7 +1,7 @@ /** * HttpClient.java * - * (C) Copyright IBM Corp. 2005, 2012 + * (C) Copyright IBM Corp. 2005, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -66,6 +66,7 @@ * 3523918 2012-05-06 blaschke-oss "java.io.IOException: Unexpected EOF" returned as HTTP 401 * 3524050 2012-06-06 blaschke-oss Improve WWW-Authenticate in HTTPClient.java * 3557283 2012-11-05 blaschke-oss Print full response when get EOF from CIMOM + * 3601894 2013-01-23 blaschke-oss Enhance HTTP and CIM-XML tracing */ package org.sblim.cimclient.internal.http; @@ -618,7 +619,7 @@ this.iRequestHeaders.write(out); - logger.trace(Level.FINER, "HTTP Headers= " + this.iRequestHeaders); + logger.trace(Level.FINER, "Request HTTP Headers= " + this.iRequestHeaders); if (out.checkError() != null) { delayedException = out.checkError(); @@ -675,6 +676,8 @@ ResponseTime = System.currentTimeMillis(); this.iResponseHeaders = new HttpHeader(this.iIStream); + logger.trace(Level.FINER, "Response HTTP Headers= " + + this.iResponseHeaders.toString()); this.iKeepAlive = false; if ("Keep-alive".equalsIgnoreCase(this.iResponseHeaders .getField("Connection")) @@ -706,7 +709,8 @@ if (transferEncoding != null && transferEncoding.toLowerCase().endsWith("chunked")) { - this.iServerInput = new ChunkedInputStream(this.iServerInput); + this.iServerInput = new ChunkedInputStream(this.iServerInput, + "Response"); this.iKeepAlive = true; } this.iServerInput = new BoundedInputStream(this.iServerInput, length); |
From: Dave B. <bla...@us...> - 2013-02-06 15:01:07
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/http/io In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv11852/src/org/sblim/cimclient/internal/http/io Modified Files: DebugInputStream.java ChunkedInputStream.java Log Message: 3601894 Enhance HTTP and CIM-XML tracing Index: ChunkedInputStream.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/http/io/ChunkedInputStream.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- ChunkedInputStream.java 26 Nov 2012 13:22:15 -0000 1.12 +++ ChunkedInputStream.java 6 Feb 2013 15:01:05 -0000 1.13 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2005, 2012 + * (C) Copyright IBM Corp. 2005, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -24,6 +24,7 @@ * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) * 3304058 2011-05-20 blaschke-oss Use same date format in change history * 3557283 2012-11-05 blaschke-oss Print full response when get EOF from CIMOM + * 3601894 2013-01-23 blaschke-oss Enhance HTTP and CIM-XML tracing */ package org.sblim.cimclient.internal.http.io; @@ -44,6 +45,8 @@ private InputStream iIn; + private String iOrigin; + private long iChunkSize = 0; private boolean iEof = false; @@ -61,7 +64,20 @@ * The stream to create this one upon */ public ChunkedInputStream(InputStream pStream) { + this(pStream, null); + } + + /** + * Ctor. + * + * @param pStream + * The stream to create this one upon + * @param pOrigin + * The origin of the stream (response, indication request, etc.) + */ + public ChunkedInputStream(InputStream pStream, String pOrigin) { this.iIn = pStream; + this.iOrigin = pOrigin == null ? "Unknown" : pOrigin; } @Override @@ -117,7 +133,7 @@ this.iEof = true; this.iTrailers = new HttpHeader(this.iIn); // ebak: http trailers - this.iTrailers.examineTrailer(); + this.iTrailers.examineTrailer(this.iOrigin); } return total > 0 ? total : -1; } Index: DebugInputStream.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/http/io/DebugInputStream.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- DebugInputStream.java 6 Sep 2012 14:46:48 -0000 1.9 +++ DebugInputStream.java 6 Feb 2013 15:01:05 -0000 1.10 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2005, 2012 + * (C) Copyright IBM Corp. 2005, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -22,6 +22,7 @@ * 3062747 2010-09-21 blaschke-oss SblimCIMClient does not log all CIM-XML responces. * 3185833 2011-02-18 blaschke-oss missing newline when logging request/response * 3554738 2012-08-16 blaschke-oss dump CIM xml by LogAndTraceBroker.trace() + * 3601894 2013-01-23 blaschke-oss Enhance HTTP and CIM-XML tracing */ package org.sblim.cimclient.internal.http.io; @@ -50,6 +51,8 @@ private OutputStream iStream; + private String iOrigin; + /** * Ctor. * @@ -57,10 +60,22 @@ * @param os */ public DebugInputStream(InputStream is, OutputStream os) { + this(is, os, null); + } + + /** + * Ctor. + * + * @param is + * @param os + * @param pOrigin + */ + public DebugInputStream(InputStream is, OutputStream os, String pOrigin) { super(is); this.iBuf = new byte[512]; this.iBuffered = false; this.iStream = os; + this.iOrigin = pOrigin == null ? "unknown" : pOrigin; } private void buffer() throws IOException { @@ -77,10 +92,10 @@ } } catch (TrailerException e) { // TrailerException indicates complete response BUT error in trailer - writeBuffer("response begin (TrailerException occurred)"); + writeBuffer(this.iOrigin + " begin (TrailerException occurred)"); throw e; } - writeBuffer("response begin"); + writeBuffer(this.iOrigin + " begin"); } private void writeBuffer(String header) throws IOException { @@ -90,7 +105,10 @@ outStr.append(TimeStamp.formatWithMillis(System.currentTimeMillis())); outStr.append(" ----\n"); outStr.append(new String(this.iBuf, 0, this.iMaxLen)); - outStr.append("\n---- response end ----->\n"); + if (this.iMaxLen > 0 && this.iBuf[this.iMaxLen - 1] != '\n') outStr.append('\n'); + outStr.append("---- "); + outStr.append(this.iOrigin); + outStr.append(" end ----->\n"); if (this.iStream != null) this.iStream.write(outStr.toString().getBytes()); if (LogAndTraceBroker.getBroker().isLoggableCIMXMLTrace(Level.FINEST)) LogAndTraceBroker .getBroker().traceCIMXML(Level.FINEST, outStr.toString(), false); |
From: Dave B. <bla...@us...> - 2013-02-06 14:05:08
|
Update of /cvsroot/sblim/jsr48-client/utst/org/sblim/cimclient/unittest/cim In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv9257/utst/org/sblim/cimclient/unittest/cim Modified Files: CIMInstanceTest.java Log Message: 3598613 different data type in cim instance and cim object path Index: CIMInstanceTest.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/utst/org/sblim/cimclient/unittest/cim/CIMInstanceTest.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- CIMInstanceTest.java 6 Sep 2012 19:12:24 -0000 1.7 +++ CIMInstanceTest.java 6 Feb 2013 14:05:05 -0000 1.8 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2012 + * (C) Copyright IBM Corp. 2006, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -18,6 +18,7 @@ * 2797550 2009-06-01 raman_arora JSR48 compliance - add Java Generics * 3521119 2012-04-24 blaschke-oss JSR48 1.0.0: remove CIMObjectPath 2/3/4-parm ctors * 3529151 2012-08-22 blaschke-oss TCK: CIMInstance property APIs include keys from COP + * 3598613 2013-01-11 blaschke-oss different data type in cim instance and cim object path */ package org.sblim.cimclient.unittest.cim; @@ -26,7 +27,12 @@ import javax.cim.CIMInstance; import javax.cim.CIMObjectPath; import javax.cim.CIMProperty; +import javax.cim.UnsignedInteger16; +import javax.cim.UnsignedInteger32; +import javax.cim.UnsignedInteger64; +import javax.cim.UnsignedInteger8; +import org.sblim.cimclient.internal.cim.CIMHelper; import org.sblim.cimclient.unittest.TestCase; /** @@ -78,4 +84,159 @@ + DERIVED_INST, DERIVED_INST.equals(derived)); } + /** + * testNumericKeys tests that CIMInstanceWithSynchonizedNumericKeyDataTypes + * correctly updates numeric data types of keys in CIMObjectPath to reflect + * the data type of the corresponding keys from CIMProperty[] + */ + public void testNumericKeys() { + CIMProperty<?>[] copProps, instProps; + + CIMProperty<Byte> s8 = new CIMProperty<Byte>("Prop_Integer", CIMDataType.SINT8_T, Byte + .valueOf("21"), true, false, null); + CIMProperty<Short> s16 = new CIMProperty<Short>("Prop_Integer", CIMDataType.SINT16_T, Short + .valueOf("21"), true, false, null); + CIMProperty<Integer> s32 = new CIMProperty<Integer>("Prop_Integer", CIMDataType.SINT32_T, + Integer.valueOf("21"), true, false, null); + CIMProperty<Long> s64 = new CIMProperty<Long>("Prop_Integer", CIMDataType.SINT64_T, Long + .valueOf("21"), true, false, null); + CIMProperty<UnsignedInteger8> u8 = new CIMProperty<UnsignedInteger8>("Prop_Integer", + CIMDataType.UINT8_T, new UnsignedInteger8("21"), true, false, null); + CIMProperty<UnsignedInteger16> u16 = new CIMProperty<UnsignedInteger16>("Prop_Integer", + CIMDataType.UINT16_T, new UnsignedInteger16("21"), true, false, null); + CIMProperty<UnsignedInteger32> u32 = new CIMProperty<UnsignedInteger32>("Prop_Integer", + CIMDataType.UINT32_T, new UnsignedInteger32("21"), true, false, null); + CIMProperty<UnsignedInteger64> u64 = new CIMProperty<UnsignedInteger64>("Prop_Integer", + CIMDataType.UINT64_T, new UnsignedInteger64("21"), true, false, null); + CIMProperty<Float> r32 = new CIMProperty<Float>("Prop_Real", CIMDataType.REAL32_T, Float + .valueOf("21.0"), true, false, null); + CIMProperty<Double> r64 = new CIMProperty<Double>("Prop_Real", CIMDataType.REAL64_T, Double + .valueOf("21.0"), true, false, null); + CIMProperty<String> str = new CIMProperty<String>("Prop_String", CIMDataType.STRING_T, + "21.0", true, false, null); + CIMProperty<Boolean> bool = new CIMProperty<Boolean>("Prop_Boolean", CIMDataType.BOOLEAN_T, + Boolean.TRUE, true, false, null); + CIMProperty<Character> ch = new CIMProperty<Character>("Prop_Char", CIMDataType.CHAR16_T, + Character.valueOf('2'), true, false, null); + + // Change sint8 to other sint types + copProps = new CIMProperty[] { bool, s8, str }; + checkKeyChanged(copProps, new CIMProperty[] { ch, s16, bool, str }, "Prop_Integer"); + checkKeyChanged(copProps, new CIMProperty[] { ch, s32, bool, str }, "Prop_Integer"); + checkKeyChanged(copProps, new CIMProperty[] { ch, s64, bool, str }, "Prop_Integer"); + + // Change sint16 to other sint types + copProps = new CIMProperty[] { bool, s16, str }; + checkKeyChanged(copProps, new CIMProperty[] { ch, s8, bool, str }, "Prop_Integer"); + checkKeyChanged(copProps, new CIMProperty[] { ch, s32, bool, str }, "Prop_Integer"); + checkKeyChanged(copProps, new CIMProperty[] { ch, s64, bool, str }, "Prop_Integer"); + + // Change sint32 to other sint types + copProps = new CIMProperty[] { bool, s32, str }; + checkKeyChanged(copProps, new CIMProperty[] { ch, s8, bool, str }, "Prop_Integer"); + checkKeyChanged(copProps, new CIMProperty[] { ch, s16, bool, str }, "Prop_Integer"); + checkKeyChanged(copProps, new CIMProperty[] { ch, s64, bool, str }, "Prop_Integer"); + + // Change sint64 to other sint types + copProps = new CIMProperty[] { bool, s64, str }; + checkKeyChanged(copProps, new CIMProperty[] { ch, s8, bool, str }, "Prop_Integer"); + checkKeyChanged(copProps, new CIMProperty[] { ch, s16, bool, str }, "Prop_Integer"); + checkKeyChanged(copProps, new CIMProperty[] { ch, s32, bool, str }, "Prop_Integer"); + + // Change uint8 to other uint types + copProps = new CIMProperty[] { bool, u8, str }; + checkKeyChanged(copProps, new CIMProperty[] { ch, u16, bool, str }, "Prop_Integer"); + checkKeyChanged(copProps, new CIMProperty[] { ch, u32, bool, str }, "Prop_Integer"); + checkKeyChanged(copProps, new CIMProperty[] { ch, u64, bool, str }, "Prop_Integer"); + + // Change uint16 to other uint types + copProps = new CIMProperty[] { bool, u16, str }; + checkKeyChanged(copProps, new CIMProperty[] { ch, u8, bool, str }, "Prop_Integer"); + checkKeyChanged(copProps, new CIMProperty[] { ch, u32, bool, str }, "Prop_Integer"); + checkKeyChanged(copProps, new CIMProperty[] { ch, u64, bool, str }, "Prop_Integer"); + + // Change uint32 to other uint types + copProps = new CIMProperty[] { bool, u32, str }; + checkKeyChanged(copProps, new CIMProperty[] { ch, u8, bool, str }, "Prop_Integer"); + checkKeyChanged(copProps, new CIMProperty[] { ch, u16, bool, str }, "Prop_Integer"); + checkKeyChanged(copProps, new CIMProperty[] { ch, u64, bool, str }, "Prop_Integer"); + + // Change uint64 to other uint types + copProps = new CIMProperty[] { bool, u64, str }; + checkKeyChanged(copProps, new CIMProperty[] { ch, u8, bool, str }, "Prop_Integer"); + checkKeyChanged(copProps, new CIMProperty[] { ch, u16, bool, str }, "Prop_Integer"); + checkKeyChanged(copProps, new CIMProperty[] { ch, u32, bool, str }, "Prop_Integer"); + + // Change real32 to other real type + checkKeyChanged(new CIMProperty[] { bool, r32, str }, new CIMProperty[] { ch, r64, bool, + str }, "Prop_Real"); + + // Change real64 to other real type + checkKeyChanged(new CIMProperty[] { bool, r64, str }, new CIMProperty[] { ch, r32, bool, + str }, "Prop_Real"); + + // Change sint32 to other uint types + copProps = new CIMProperty[] { bool, s32, str }; + checkKeyChanged(copProps, new CIMProperty[] { ch, u8, bool, str }, "Prop_Integer"); + checkKeyChanged(copProps, new CIMProperty[] { ch, u16, bool, str }, "Prop_Integer"); + checkKeyChanged(copProps, new CIMProperty[] { ch, u32, bool, str }, "Prop_Integer"); + checkKeyChanged(copProps, new CIMProperty[] { ch, u64, bool, str }, "Prop_Integer"); + + // Change uint32 to other sint types + copProps = new CIMProperty[] { bool, u32, str }; + checkKeyChanged(copProps, new CIMProperty[] { ch, s8, bool, str }, "Prop_Integer"); + checkKeyChanged(copProps, new CIMProperty[] { ch, s16, bool, str }, "Prop_Integer"); + checkKeyChanged(copProps, new CIMProperty[] { ch, s32, bool, str }, "Prop_Integer"); + checkKeyChanged(copProps, new CIMProperty[] { ch, s64, bool, str }, "Prop_Integer"); + + instProps = new CIMProperty[] { ch, bool, str }; + + // Make sure sint types not changed when key not in prop array + checkKeyUnchanged(new CIMProperty[] { bool, s8, str }, instProps, "Prop_Integer"); + checkKeyUnchanged(new CIMProperty[] { bool, s16, str }, instProps, "Prop_Integer"); + checkKeyUnchanged(new CIMProperty[] { bool, s32, str }, instProps, "Prop_Integer"); + checkKeyUnchanged(new CIMProperty[] { bool, s64, str }, instProps, "Prop_Integer"); + + // Make sure uint types not changed when key not in prop array + checkKeyUnchanged(new CIMProperty[] { bool, u8, str }, instProps, "Prop_Integer"); + checkKeyUnchanged(new CIMProperty[] { bool, u16, str }, instProps, "Prop_Integer"); + checkKeyUnchanged(new CIMProperty[] { bool, u32, str }, instProps, "Prop_Integer"); + checkKeyUnchanged(new CIMProperty[] { bool, u64, str }, instProps, "Prop_Integer"); + + // Make sure real types not changed when key not in prop array + checkKeyUnchanged(new CIMProperty[] { bool, r32, str }, instProps, "Prop_Real"); + checkKeyUnchanged(new CIMProperty[] { bool, r64, str }, instProps, "Prop_Real"); + } + + private void checkKeyChanged(CIMProperty<?>[] propsCOP, CIMProperty<?>[] propsInst, + String propName) { + CIMObjectPath cop = new CIMObjectPath("http", "1.2.3.4", "5988", "cimom", "root/interop", + propsCOP); + CIMInstance inst = CIMHelper.CIMInstanceWithSynchonizedNumericKeyDataTypes(cop, propsInst); + verify(" keys[] not expected size! " + inst.getObjectPath().getKeys().length + " != " + + cop.getKeys().length, + inst.getObjectPath().getKeys().length == cop.getKeys().length); + verify(propName + " types do not match! " + + inst.getObjectPath().getKey(propName).getDataType() + " != " + + inst.getProperty(propName).getDataType(), inst.getObjectPath().getKey(propName) + .getDataType().equals(inst.getProperty(propName).getDataType())); + verify(propName + " values do not match! " + + inst.getObjectPath().getKey(propName).getValue() + " != " + + inst.getProperty(propName).getValue(), inst.getObjectPath().getKey(propName) + .getValue().equals(inst.getProperty(propName).getValue())); + } + + private void checkKeyUnchanged(CIMProperty<?>[] propsCOP, CIMProperty<?>[] propsInst, + String propName) { + CIMObjectPath cop = new CIMObjectPath("http", "1.2.3.4", "5988", "cimom", "root/interop", + propsCOP); + CIMInstance inst = new CIMInstance(cop, propsInst); + verify(" keys[] not expected size! " + inst.getObjectPath().getKeys().length + " != " + + cop.getKeys().length, + inst.getObjectPath().getKeys().length == cop.getKeys().length); + verify(propName + " types do not match! " + + inst.getObjectPath().getKey(propName).getDataType() + " != " + + cop.getKey(propName).getDataType(), inst.getObjectPath().getKey(propName) + .getDataType().equals(cop.getKey(propName).getDataType())); + } } |
From: Dave B. <bla...@us...> - 2013-02-06 14:05:07
|
Update of /cvsroot/sblim/jsr48-client/utst/org/sblim/cimclient/unittest/wbem/data In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv9257/utst/org/sblim/cimclient/unittest/wbem/data Added Files: Bug3598613.xml Log Message: 3598613 different data type in cim instance and cim object path --- NEW FILE: Bug3598613.xml --- <?xml version="1.0" encoding="utf-8" ?> <CIM CIMVERSION="2.0" DTDVERSION="2.0"> <MESSAGE ID="826459" PROTOCOLVERSION="1.0"> <SIMPLERSP> <IMETHODRESPONSE NAME="EnumerateInstances"> <IRETURNVALUE> <VALUE.NAMEDINSTANCE> <INSTANCENAME CLASSNAME="PG_SSLCertificate"> <KEYBINDING NAME="IssuerName"> <KEYVALUE VALUETYPE="string">/C=US/ST=NC/L=RTP/O=Director Development/OU=IBM Corporation/CN=IBM Director on 169.254.95.120 1348544936846</KEYVALUE> </KEYBINDING> <KEYBINDING NAME="SerialNumber"> <KEYVALUE VALUETYPE="string">1348544937</KEYVALUE> </KEYBINDING> <KEYBINDING NAME="TruststoreType"> <KEYVALUE VALUETYPE="numeric">2</KEYVALUE> </KEYBINDING> </INSTANCENAME> <INSTANCE CLASSNAME="PG_SSLCertificate" > <PROPERTY NAME="IssuerName" TYPE="string"> <VALUE>/C=US/ST=NC/L=RTP/O=Director Development/OU=IBM Corporation/CN=IBM Director on 169.254.95.120 1348544936846</VALUE> </PROPERTY> <PROPERTY NAME="SerialNumber" TYPE="string"> <VALUE>1348544937</VALUE> </PROPERTY> <PROPERTY NAME="SubjectName" TYPE="string"> <VALUE>/C=US/ST=NC/L=RTP/O=Director Development/OU=IBM Corporation/CN=IBM Director on 169.254.95.120 1348544936846</VALUE> </PROPERTY> <PROPERTY NAME="RegisteredUserName" TYPE="string"> <VALUE>root</VALUE> </PROPERTY> <PROPERTY NAME="TruststorePath" TYPE="string"> <VALUE>/etc/opt/ibm/icc/truststore/3fb40a25.0</VALUE> </PROPERTY> <PROPERTY NAME="TruststoreType" TYPE="uint16"> <VALUE>2</VALUE> </PROPERTY> <PROPERTY NAME="NotBefore" TYPE="datetime"> <VALUE>20120925034857.000000+000</VALUE> </PROPERTY> <PROPERTY NAME="NotAfter" TYPE="datetime"> <VALUE>20170924034857.000000+000</VALUE> </PROPERTY> <PROPERTY NAME="CertificateType" TYPE="uint16"> <VALUE>2</VALUE> </PROPERTY> </INSTANCE> </VALUE.NAMEDINSTANCE> <VALUE.NAMEDINSTANCE> <INSTANCENAME CLASSNAME="PG_SSLCertificate"> <KEYBINDING NAME="IssuerName"> <KEYVALUE VALUETYPE="string">/C=US/ST=NC/L=RTP/O=Director Development/OU=IBM Corporation/CN=IBM Director on 10.9.61.11 1352162758531</KEYVALUE> </KEYBINDING> <KEYBINDING NAME="SerialNumber"> <KEYVALUE VALUETYPE="string">1352162760</KEYVALUE> </KEYBINDING> <KEYBINDING NAME="TruststoreType"> <KEYVALUE VALUETYPE="numeric">2</KEYVALUE> </KEYBINDING> </INSTANCENAME> <INSTANCE CLASSNAME="PG_SSLCertificate" > <PROPERTY NAME="IssuerName" TYPE="string"> <VALUE>/C=US/ST=NC/L=RTP/O=Director Development/OU=IBM Corporation/CN=IBM Director on 10.9.61.11 1352162758531</VALUE> </PROPERTY> <PROPERTY NAME="SerialNumber" TYPE="string"> <VALUE>1352162760</VALUE> </PROPERTY> <PROPERTY NAME="SubjectName" TYPE="string"> <VALUE>/C=US/ST=NC/L=RTP/O=Director Development/OU=IBM Corporation/CN=IBM Director on 10.9.61.11 1352162758531</VALUE> </PROPERTY> <PROPERTY NAME="RegisteredUserName" TYPE="string"> <VALUE>root</VALUE> </PROPERTY> <PROPERTY NAME="TruststorePath" TYPE="string"> <VALUE>/etc/opt/ibm/icc/truststore/adcfb619.0</VALUE> </PROPERTY> <PROPERTY NAME="TruststoreType" TYPE="uint16"> <VALUE>2</VALUE> </PROPERTY> <PROPERTY NAME="NotBefore" TYPE="datetime"> <VALUE>20121106004600.000000+000</VALUE> </PROPERTY> <PROPERTY NAME="NotAfter" TYPE="datetime"> <VALUE>20171105004600.000000+000</VALUE> </PROPERTY> <PROPERTY NAME="CertificateType" TYPE="uint16"> <VALUE>2</VALUE> </PROPERTY> </INSTANCE> </VALUE.NAMEDINSTANCE> <VALUE.NAMEDINSTANCE> <INSTANCENAME CLASSNAME="PG_SSLCertificate"> <KEYBINDING NAME="IssuerName"> <KEYVALUE VALUETYPE="string">/C=US/ST=NC/L=RTP/O=Director Development/OU=IBM Corporation/CN=IBM Director on 9.12.201.236 1349460470283</KEYVALUE> </KEYBINDING> <KEYBINDING NAME="SerialNumber"> <KEYVALUE VALUETYPE="string">1349460472</KEYVALUE> </KEYBINDING> <KEYBINDING NAME="TruststoreType"> <KEYVALUE VALUETYPE="numeric">2</KEYVALUE> </KEYBINDING> </INSTANCENAME> <INSTANCE CLASSNAME="PG_SSLCertificate" > <PROPERTY NAME="IssuerName" TYPE="string"> <VALUE>/C=US/ST=NC/L=RTP/O=Director Development/OU=IBM Corporation/CN=IBM Director on 9.12.201.236 1349460470283</VALUE> </PROPERTY> <PROPERTY NAME="SerialNumber" TYPE="string"> <VALUE>1349460472</VALUE> </PROPERTY> <PROPERTY NAME="SubjectName" TYPE="string"> <VALUE>/C=US/ST=NC/L=RTP/O=Director Development/OU=IBM Corporation/CN=IBM Director on 9.12.201.236 1349460470283</VALUE> </PROPERTY> <PROPERTY NAME="RegisteredUserName" TYPE="string"> <VALUE>root</VALUE> </PROPERTY> <PROPERTY NAME="TruststorePath" TYPE="string"> <VALUE>/etc/opt/ibm/icc/truststore/ff57b4bc.0</VALUE> </PROPERTY> <PROPERTY NAME="TruststoreType" TYPE="uint16"> <VALUE>2</VALUE> </PROPERTY> <PROPERTY NAME="NotBefore" TYPE="datetime"> <VALUE>20121005180752.000000+000</VALUE> </PROPERTY> <PROPERTY NAME="NotAfter" TYPE="datetime"> <VALUE>20171004180752.000000+000</VALUE> </PROPERTY> <PROPERTY NAME="CertificateType" TYPE="uint16"> <VALUE>2</VALUE> </PROPERTY> </INSTANCE> </VALUE.NAMEDINSTANCE> </IRETURNVALUE> </IMETHODRESPONSE> </SIMPLERSP> </MESSAGE> </CIM> |
From: Dave B. <bla...@us...> - 2013-02-06 13:05:49
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/logging In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv5705/src/org/sblim/cimclient/internal/logging Modified Files: LogAndTraceBroker.java Log Message: 3596303 windows http response WWW-Authenticate: Negotiate fails Index: LogAndTraceBroker.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/logging/LogAndTraceBroker.java,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- LogAndTraceBroker.java 15 Nov 2012 14:56:39 -0000 1.27 +++ LogAndTraceBroker.java 6 Feb 2013 13:05:46 -0000 1.28 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2012 + * (C) Copyright IBM Corp. 2006, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -30,6 +30,7 @@ * 3489638 2012-02-28 blaschke-oss PERF: Bottleneck in LogAndTraceBroker.java - getCaller() * 3554738 2012-08-16 blaschke-oss dump CIM xml by LogAndTraceBroker.trace() * 3576396 2012-10-11 blaschke-oss Improve logging of config file name + * 3596303 2013-01-04 blaschke-oss windows http response WWW-Authenticate: Negotiate fails */ package org.sblim.cimclient.internal.logging; @@ -104,7 +105,7 @@ private String iProductName = "SBLIM CIM Client for Java"; - private String iCopyright = "COPYRIGHT (C) 2006, 2012 IBM Corp."; + private String iCopyright = "COPYRIGHT (C) 2006, 2013 IBM Corp."; private String iVersion = "?"; |
From: Dave B. <bla...@us...> - 2013-02-06 13:05:48
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/http In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv5705/src/org/sblim/cimclient/internal/http Modified Files: Challenge.java Log Message: 3596303 windows http response WWW-Authenticate: Negotiate fails Index: Challenge.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/http/Challenge.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Challenge.java 10 Mar 2009 16:32:42 -0000 1.6 +++ Challenge.java 6 Feb 2013 13:05:46 -0000 1.7 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2005, 2009 + * (C) Copyright IBM Corp. 2005, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -18,7 +18,8 @@ * 1565892 2006-11-28 lupusalex Make SBLIM client JSR48 compliant * 2003590 2008-06-30 blaschke-oss Change licensing from CPL to EPL * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) - * 2531371 2009-02-10 raman_arora Upgrade client to JDK 1.5 (Phase 2) + * 2531371 2009-02-10 raman_arora Upgrade client to JDK 1.5 (Phase 2) + * 3596303 2013-01-04 blaschke-oss windows http response WWW-Authenticate: Negotiate fails */ package org.sblim.cimclient.internal.http; @@ -67,7 +68,14 @@ } /** - * Parses the challenge as received from the host + * Parses the challenge as received from the host. RFC 2617 defines the + * following syntax for a challenge: + * + * <pre> + * challenge = auth-scheme 1*SP 1#auth-param + * auth-scheme = token + * auth-param = token "=" ( token | quoted-string ) + * </pre> * * @param pLine * The challenge string @@ -76,68 +84,153 @@ * If the challenge string is ill-formed */ public static Challenge[] parseChallenge(String pLine) throws HttpParseException { - Vector<Challenge> challeges = new Vector<Challenge>(); if (pLine == null || pLine.length() == 0) throw new IllegalArgumentException( - "Invalid challenge"); - Challenge challenge = new Challenge(); - challenge.iParams = new HttpHeader(); + "Invalid challenge, empty"); + pLine = pLine.trim(); + if (pLine.length() == 0) throw new IllegalArgumentException("Invalid challenge, empty"); + + Vector<Challenge> challenges = new Vector<Challenge>(); - char buf[] = pLine.toCharArray(); try { int start = 0, end = 0; - while (true) { - start = skipSpaces(buf, start); - end = findEndOfToken(buf, start); - String scheme = pLine.substring(start, end); - challenge.iScheme = scheme; - start = end; - boolean skipComma = true; - while (true) { - if (!skipComma) { - start = skipSpaces(buf, start); - if (start >= buf.length || buf[start] != ',') { - break; - } - } - start = skipSpaces(buf, start + 1); - if (start >= buf.length) break; - end = findEndOfToken(buf, start); - String paramname = pLine.substring(start, end); - start = end; - if (start >= buf.length) break; + // Break up comma-separated list into tokens + Vector<String> tokensBetweenCommas = new Vector<String>(); + while ((end = indexOfOutsideQuotedString(pLine, ',', start)) > 0) { + tokensBetweenCommas.add(removeWhitespace(pLine.substring(start, end))); + start = end + 1; + } + if (start < pLine.length()) tokensBetweenCommas.add(removeWhitespace(pLine + .substring(start))); - start = skipSpaces(buf, start); - if (start >= buf.length) break; + // Break up tokens into auth-scheme and auth-param + Vector<String> tokens = new Vector<String>(); + for (int i = 0; i < tokensBetweenCommas.size(); i++) { + String token = tokensBetweenCommas.elementAt(i); - if (buf[start] != '=') throw new HttpParseException("Invalid challenge"); - if (start + 1 >= buf.length) break; - start = skipSpaces(buf, start + 1); + if (token.length() == 0) continue; - if (start >= buf.length) break; - end = findEndOfToken(buf, start); - String value = pLine.substring(start, end); - start = end; + start = 0; + end = indexOfOutsideQuotedString(token, ' ', start); - if (value.startsWith("\"") && value.endsWith("\"") && value.length() > 1) challenge.iParams - .addField(paramname, value.substring(1, value.length() - 1)); - else challenge.iParams.addField(paramname, value); - skipComma = false; + if (end == -1) { + tokens.add(token); + } else { + tokens.add(token.substring(0, end)); + start = end + 1; + end = indexOfOutsideQuotedString(token, ' ', start); + + if (end == -1) { + // RFC 2617 indicates this token should be of the + // name=value format, but at least one old CIMOM (SVC + // ICAT) does not follow this rule. The Client + // effectively ignores this token, and so must continue + // to do so. + if (indexOfOutsideQuotedString(token, '=', start) == -1) { + // throw new + // HttpParseException("Invalid challenge, second token must be name=value in " + // + token); + } else { + tokens.add(token.substring(start)); + } + } else { + throw new HttpParseException("Invalid challenge, too many tokens in " + + token); + } } - // if (challenge.params.getField("realm") == null) - // challenge.params.addField("realm", ""); + } - challeges.add(challenge); - if (start >= buf.length) break; + Challenge challenge = new Challenge(); + challenge.iScheme = null; + challenge.iParams = new HttpHeader(); + + for (int i = 0; i < tokens.size(); i++) { + String token = tokens.elementAt(i); + + int equalSign = indexOfOutsideQuotedString(token, '=', 0); + if (equalSign == 0) { + throw new HttpParseException( + "Invalid challenge, no token before equal sign in " + token); + } else if (equalSign > 0) { + // param + if (challenge.iScheme == null) throw new HttpParseException( + "Invalid challenge, param without scheme"); + String name = token.substring(0, equalSign); + String value = token.substring(equalSign + 1); + if (value.length() == 0) { + throw new HttpParseException( + "Invalid challenge, no token after equal sign in " + token); + } else if (value.startsWith("\"") && value.endsWith("\"") && value.length() > 1) { + challenge.iParams.addField(name, value.substring(1, value.length() - 1)); + } else { + challenge.iParams.addField(name, value); + } + } else { + // scheme + if (challenge.iScheme != null) { + // new scheme + challenges.add(challenge); + + challenge = new Challenge(); + challenge.iParams = new HttpHeader(); + } + challenge.iScheme = new String(token); + } } + if (challenge.iScheme != null) { + challenges.add(challenge); + } } catch (HttpParseException e) { throw e; } catch (Exception e) { - throw new HttpParseException("Invalid challenge"); + throw new HttpParseException("Invalid challenge, " + e.getMessage()); } - return challeges.toArray(new Challenge[challeges.size()]); + return challenges.toArray(new Challenge[challenges.size()]); + + } + + /* + * Removes unnecessary whitespace from a challenge such that + * " scheme name = value " becomes "scheme name=value" + */ + private static String removeWhitespace(String str) throws HttpParseException { + char inBuf[] = str.trim().toCharArray(); + StringBuilder outStr = new StringBuilder(); + boolean inQuotes = false; + + for (int inIdx = 0; inIdx < inBuf.length; inIdx++) { + if (inQuotes || !Character.isSpaceChar(inBuf[inIdx])) { + if (inBuf[inIdx] == '=' && outStr.length() == 0) throw new HttpParseException( + "Invalid challenge, no token before equal sign in " + str); + + outStr.append(inBuf[inIdx]); + } else { + // Whitespace not within quoted string + int i = skipSpaces(inBuf, inIdx + 1); + if (i >= inBuf.length) throw new HttpParseException( + "Invalid challenge, no token after space in " + str); + + if (inBuf[i] == '=') { + // auth-param, remove all whitespace up to next token + i = skipSpaces(inBuf, i + 1); + if (i >= inBuf.length) throw new HttpParseException( + "Invalid challenge, no token after equal sign in " + str); + outStr.append('='); + } else { + // another token, combine all whitespace up to next token + // into single space + outStr.append(' '); + } + outStr.append(inBuf[i]); + inIdx = i; + } + if (inBuf[inIdx] == '\"') inQuotes = !inQuotes; + } + if (inQuotes) throw new HttpParseException( + "Invalid challenge, quoted string not terminated in " + str); + return outStr.toString(); } private static int skipSpaces(char[] buf, int pos) { @@ -146,18 +239,22 @@ return pos; } - private static int findEndOfToken(char[] buf, int pos) { - if (buf[pos] == '\"') { - do { - pos++; - } while (buf[pos] != '\"' && pos < buf.length); + private static int indexOfOutsideQuotedString(String str, int ch, int pos) + throws HttpParseException { + int len = str.length(); + boolean inQuotes = false; + + while (pos < len) { + if (str.charAt(pos) == '\"') { + inQuotes = !inQuotes; + } else if (str.charAt(pos) == ch) { + if (!inQuotes) return pos; + } pos++; - } else { - while (pos < buf.length - && (!Character.isSpaceChar(buf[pos]) && !(buf[pos] == ',') && !(buf[pos] == '='))) - pos++; } - return pos; + if (inQuotes) throw new HttpParseException( + "Invalid callenge, quoted string not terminated in " + str); + return -1; } } |
From: Michael Chase-S. <mc...@us...> - 2013-01-31 20:16:15
|
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 735acc776f56599ec1124bb7626835c2ff1b6104 (commit) from 2a0443db490c2645a509579d4f6aaf9db3ab2274 (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 735acc776f56599ec1124bb7626835c2ff1b6104 Author: Michael Chase-Salerno <br...@li...> Date: Thu Jan 31 15:14:47 2013 -0500 2766931 Property filters for interop and interopserver providers ----------------------------------------------------------------------- Summary of changes: diff --git a/NEWS b/NEWS index 8bfe833..adf83c8 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,7 @@ New features: - 3601386 Add test for EmbeddedObject output - 3599160 Add sfcbproc utility - 3601943 ObjectImpl unit test +- 2766931 Property filters for interop and interopserver providers Bugs fixed: - 3599526 segfault during ecn with classProviderSf diff --git a/interopProvider.c b/interopProvider.c index 97c5771..ef8744e 100644 --- a/interopProvider.c +++ b/interopProvider.c @@ -1067,7 +1067,9 @@ InteropProviderEnumInstances(CMPIInstanceMI * mi, if (strcasecmp(CMGetCharPtr(CMGetClassName(cop, NULL)), "cim_indicationsubscription") == 0) { filterInternalProps(ci); } - + if (properties) { + ci->ft->setPropertyFilter(ci, properties, NULL); + } CMReturnInstance(rslt, ci); } if (enm) @@ -1102,7 +1104,9 @@ InteropProviderGetInstance(CMPIInstanceMI * mi, if (strcasecmp(CMGetCharPtr(CMGetClassName(cop, NULL)), "cim_indicationsubscription") == 0) { filterInternalProps(ci); } - + if (properties) { + ci->ft->setPropertyFilter(ci, properties, NULL); + } CMReturnInstance(rslt, ci); } diff --git a/interopServerProvider.c b/interopServerProvider.c index 7b096ae..a2afdfc 100644 --- a/interopServerProvider.c +++ b/interopServerProvider.c @@ -472,6 +472,9 @@ IndServiceProviderGetInstance(CMPIInstanceMI * mi, #endif + if (properties) { + ci->ft->setPropertyFilter(ci, properties, NULL); + } CMReturnInstance(rslt,ci); CMReturnDone(rslt); @@ -497,6 +500,7 @@ IndServiceProviderEnumInstances(CMPIInstanceMI * mi, CMPIContext *ctxLocal; ctxLocal = native_clone_CMPIContext(ctx); CMPIValue val; + CMPIInstance *ci=NULL; val.string = sfcb_native_new_CMPIString("$DefaultProvider$", NULL,0); ctxLocal->ft->addEntry(ctxLocal, "rerouteToProvider", &val, CMPI_string); @@ -505,7 +509,11 @@ IndServiceProviderEnumInstances(CMPIInstanceMI * mi, indServices = CBEnumInstances(_broker, ctxLocal, op, properties, &st); while (CMHasNext(indServices, NULL)) { - CMReturnInstance(rslt, CMGetNext(indServices, NULL).value.inst); + ci=CMGetNext(indServices, NULL).value.inst; + if (properties) { + ci->ft->setPropertyFilter(ci, properties, NULL); + } + CMReturnInstance(rslt, ci); } CMReturnDone(rslt); hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Chris B. <buc...@us...> - 2013-01-30 15:21:04
|
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 2a0443db490c2645a509579d4f6aaf9db3ab2274 (commit) from ff398d1e19e84fcc742cd177a51c0ddbfa4ab6e0 (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 2a0443db490c2645a509579d4f6aaf9db3ab2274 Author: buccella <buc...@li...> Date: Wed Jan 30 10:20:33 2013 -0500 adding ChangeLog back ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..56f6873 --- /dev/null +++ b/ChangeLog @@ -0,0 +1 @@ +For commit changes, see "git log" or: http://sblim.git.sourceforge.net/git/gitweb.cgi?p=sblim/sfcb;a=log;h=HEAD hooks/post-receive -- SFCB - Small Footprint CIM Broker |
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv30692/src/org/sblim/cimclient/internal/cimxml/sax/node Modified Files: Tag: Experimental ReturnValueNode.java ValueObjectNode.java KeyBindingNode.java SimpleExpRspNode.java ClassPathNode.java LocalClassPathNode.java KeyValueNode.java MethodNode.java Node.java ValueRefArrayNode.java Log Message: 3602604 Clean up SAXException messages Index: Node.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/Node.java,v retrieving revision 1.1.2.12 retrieving revision 1.1.2.13 diff -u -d -r1.1.2.12 -r1.1.2.13 --- Node.java 31 Mar 2012 00:02:17 -0000 1.1.2.12 +++ Node.java 30 Jan 2013 14:57:10 -0000 1.1.2.13 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2012 + * (C) Copyright IBM Corp. 2006, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -23,6 +23,7 @@ * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) * 2531371 2009-02-10 raman_arora Upgrade client to JDK 1.5 (Phase 2) * 3513353 2012-03-30 blaschke-oss TCK: CIMDataType arrays must have length >= 1 + * 3602604 2013-01-29 blaschke-oss Clean up SAXException messages */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -220,7 +221,7 @@ String arraySizeStr = pAttribs.getValue("ARRAYSIZE"); // 0 - unbounded size int size = arraySizeStr == null ? 0 : Integer.parseInt(arraySizeStr); - if (size < 0) throw new IllegalArgumentException("ARRAYSIZE cannot be " + size + " !"); + if (size < 0) throw new IllegalArgumentException("ARRAYSIZE cannot be " + size + "!"); return size; } Index: ReturnValueNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/ReturnValueNode.java,v retrieving revision 1.1.2.11 retrieving revision 1.1.2.12 diff -u -d -r1.1.2.11 -r1.1.2.12 --- ReturnValueNode.java 2 Mar 2011 01:57:53 -0000 1.1.2.11 +++ ReturnValueNode.java 30 Jan 2013 14:57:09 -0000 1.1.2.12 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2011 + * (C) Copyright IBM Corp. 2006, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -21,6 +21,7 @@ * 2003590 2008-06-30 blaschke-oss Change licensing from CPL to EPL * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) * 3194700 2011-03-01 blaschke-oss Exception thrown on extrinsic methods + * 3602604 2013-01-29 blaschke-oss Clean up SAXException messages */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -90,7 +91,7 @@ if (valNode instanceof ValueReferenceNode) { if (this.iType != null && this.iType.getType() != CIMDataType.REFERENCE) throw new SAXException( getNodeName() + " node's child node is VALUE.REFERENCE " - + "but it's type based on PARAMTYPE attribute is " + this.iType + " !"); + + "but its type based on PARAMTYPE attribute is " + this.iType + "!"); ValueReferenceNode valRefNode = (ValueReferenceNode) valNode; this.iValue = valRefNode.getCIMObjectPath(); this.iType = valRefNode.getType(); Index: ValueObjectNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/ValueObjectNode.java,v retrieving revision 1.1.2.9 retrieving revision 1.1.2.10 diff -u -d -r1.1.2.9 -r1.1.2.10 --- ValueObjectNode.java 23 Feb 2009 18:25:57 -0000 1.1.2.9 +++ ValueObjectNode.java 30 Jan 2013 14:57:10 -0000 1.1.2.10 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2009 + * (C) Copyright IBM Corp. 2006, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -19,7 +19,8 @@ * 1720707 2007-05-17 ebak Conventional Node factory for CIM-XML SAX parser * 2003590 2008-06-30 blaschke-oss Change licensing from CPL to EPL * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) - * 2531371 2009-02-10 raman_arora Upgrade client to JDK 1.5 (Phase 2) + * 2531371 2009-02-10 raman_arora Upgrade client to JDK 1.5 (Phase 2) + * 3602604 2013-01-29 blaschke-oss Clean up SAXException messages */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -83,7 +84,7 @@ @Override public void testCompletness() throws SAXException { if (this.iCIMObject == null) throw new SAXException( - "VALUE.OBJECT node must have a CLASS or INSTANCE node child!"); + "VALUE.OBJECT node must have a CLASS or INSTANCE child node!"); } /** Index: SimpleExpRspNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/SimpleExpRspNode.java,v retrieving revision 1.1.2.9 retrieving revision 1.1.2.10 diff -u -d -r1.1.2.9 -r1.1.2.10 --- SimpleExpRspNode.java 27 Mar 2012 19:06:32 -0000 1.1.2.9 +++ SimpleExpRspNode.java 30 Jan 2013 14:57:10 -0000 1.1.2.10 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2012 + * (C) Copyright IBM Corp. 2006, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -20,6 +20,7 @@ * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) * 2797550 2009-06-01 raman_arora JSR48 compliance - add Java Generics * 3511454 2012-03-27 blaschke-oss SAX nodes not reinitialized properly + * 3602604 2013-01-29 blaschke-oss Clean up SAXException messages */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -75,7 +76,7 @@ if (this.iExpMethodRspNode != null) throw new SAXException(getNodeName() + " node can have only one child node!"); if (pNodeNameEnum != EXPMETHODRESPONSE) throw new SAXException(getNodeName() - + " node child node can be EXPMETHODRESPONSE only! " + pNodeNameEnum + + " node's child node can be EXPMETHODRESPONSE only! " + pNodeNameEnum + " is invalid!"); } Index: LocalClassPathNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/LocalClassPathNode.java,v retrieving revision 1.1.2.10 retrieving revision 1.1.2.11 diff -u -d -r1.1.2.10 -r1.1.2.11 --- LocalClassPathNode.java 20 Apr 2010 17:17:35 -0000 1.1.2.10 +++ LocalClassPathNode.java 30 Jan 2013 14:57:10 -0000 1.1.2.11 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2010 + * (C) Copyright IBM Corp. 2006, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -21,6 +21,7 @@ * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) * 2531371 2009-02-10 raman_arora Upgrade client to JDK 1.5 (Phase 2) * 2974884 2010-04-20 blaschke-oss Exception when attaching 2 CDRoms with invoke method + * 3602604 2013-01-29 blaschke-oss Clean up SAXException messages */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -83,7 +84,8 @@ if (this.iHasClassName) throw new SAXException( "LOCALCLASSPATH node already has a CLASSNAME child node!"); } else throw new SAXException("LOCALCLASSPATH node cannot have " + pNodeNameEnum - + " child node!" + "It can have LOCALNAMESPACEPATH and CLASSNAME child nodes only!"); + + " child node!" + + " It can have LOCALNAMESPACEPATH and CLASSNAME child nodes only!"); } @Override Index: ValueRefArrayNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/ValueRefArrayNode.java,v retrieving revision 1.1.2.11 retrieving revision 1.1.2.12 diff -u -d -r1.1.2.11 -r1.1.2.12 --- ValueRefArrayNode.java 31 Mar 2012 15:39:42 -0000 1.1.2.11 +++ ValueRefArrayNode.java 30 Jan 2013 14:57:10 -0000 1.1.2.12 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2012 + * (C) Copyright IBM Corp. 2006, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -22,6 +22,7 @@ * 2750520 2009-04-10 blaschke-oss Code cleanup from empty statement et al * 3511454 2012-03-27 blaschke-oss SAX nodes not reinitialized properly * 3513349 2012-03-31 blaschke-oss TCK: CIMDataType must not accept null string + * 3602604 2013-01-29 blaschke-oss Clean up SAXException messages */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -71,7 +72,7 @@ @Override public void testChild(String pNodeNameEnum) throws SAXException { if (pNodeNameEnum != VALUE_REFERENCE) throw new SAXException( - "Child node can be VALUE_REFERENCE only while it is " + pNodeNameEnum + " !"); + "Child node can be VALUE_REFERENCE only while it is " + pNodeNameEnum + "!"); } @Override Index: MethodNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/MethodNode.java,v retrieving revision 1.1.2.11 retrieving revision 1.1.2.12 diff -u -d -r1.1.2.11 -r1.1.2.12 --- MethodNode.java 1 Jun 2009 17:01:10 -0000 1.1.2.11 +++ MethodNode.java 30 Jan 2013 14:57:10 -0000 1.1.2.12 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2009 + * (C) Copyright IBM Corp. 2006, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -22,6 +22,7 @@ * 2531371 2009-02-10 raman_arora Upgrade client to JDK 1.5 (Phase 2) * 2763216 2009-04-14 blaschke-oss Code cleanup: visible spelling/grammar errors * 2797550 2009-06-01 raman_arora JSR48 compliance - add Java Generics + * 3602604 2013-01-29 blaschke-oss Clean up SAXException messages */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -89,7 +90,7 @@ this.iType = getCIMType(pAttribs, false); if (this.iType != null && this.iType.isArray()) throw new SAXException( - "METHOD's node TYPE cannot be an array!"); + "METHOD node's TYPE cannot be an array!"); this.iClassOrigin = getClassOrigin(pAttribs); this.iPropagated = getPropagated(pAttribs); } Index: KeyBindingNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/KeyBindingNode.java,v retrieving revision 1.1.2.9 retrieving revision 1.1.2.10 diff -u -d -r1.1.2.9 -r1.1.2.10 --- KeyBindingNode.java 1 Jun 2009 17:01:10 -0000 1.1.2.9 +++ KeyBindingNode.java 30 Jan 2013 14:57:10 -0000 1.1.2.10 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2009 + * (C) Copyright IBM Corp. 2006, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -19,6 +19,7 @@ * 2003590 2008-06-30 blaschke-oss Change licensing from CPL to EPL * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) * 2797550 2009-06-01 raman_arora JSR48 compliance - add Java Generics + * 3602604 2013-01-29 blaschke-oss Clean up SAXException messages */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -71,7 +72,7 @@ @Override public void testChild(String pNodeNameEnum) throws SAXException { - if (this.iHasChild) throw new SAXException("KEYBINDING node can only one child node!"); + if (this.iHasChild) throw new SAXException("KEYBINDING node can only have one child node!"); if (pNodeNameEnum != KEYVALUE && pNodeNameEnum != VALUE_REFERENCE) throw new SAXException( "KEYBINDING node's child node can be KEYVALUE or VALUE_REFERENCE but not " + pNodeNameEnum); Index: ClassPathNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/ClassPathNode.java,v retrieving revision 1.1.2.9 retrieving revision 1.1.2.10 diff -u -d -r1.1.2.9 -r1.1.2.10 --- ClassPathNode.java 27 Mar 2012 19:06:32 -0000 1.1.2.9 +++ ClassPathNode.java 30 Jan 2013 14:57:10 -0000 1.1.2.10 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2012 + * (C) Copyright IBM Corp. 2006, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -20,6 +20,7 @@ * 2003590 2008-06-30 blaschke-oss Change licensing from CPL to EPL * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) * 3511454 2012-03-27 blaschke-oss SAX nodes not reinitialized properly + * 3602604 2013-01-29 blaschke-oss Clean up SAXException messages */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -81,7 +82,7 @@ if (this.iHasClassName) throw new SAXException( "CLASSPATH node already has a CLASSNAME child node!"); } else throw new SAXException("CLASSPATH node cannot have " + pNodeNameEnum - + " child node!" + "It can have NAMESPACEPATH and CLASSNAME child nodes only!"); + + " child node!" + " It can have NAMESPACEPATH and CLASSNAME child nodes only!"); } @Override Index: KeyValueNode.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/node/KeyValueNode.java,v retrieving revision 1.1.2.14 retrieving revision 1.1.2.15 diff -u -d -r1.1.2.14 -r1.1.2.15 --- KeyValueNode.java 2 Oct 2012 02:03:39 -0000 1.1.2.14 +++ KeyValueNode.java 30 Jan 2013 14:57:10 -0000 1.1.2.15 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2012 + * (C) Copyright IBM Corp. 2006, 2013 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -23,6 +23,7 @@ * 2763216 2009-04-14 blaschke-oss Code cleanup: visible spelling/grammar errors * 2823494 2009-08-03 rgummada Change Boolean constructor to static * 3572993 2012-10-01 blaschke-oss parseDouble("2.2250738585072012e-308") DoS vulnerability + * 3602604 2013-01-29 blaschke-oss Clean up SAXException messages */ package org.sblim.cimclient.internal.cimxml.sax.node; @@ -124,7 +125,7 @@ if (this.iValueTypeStr.equals("numeric")) { if (!setUInt64(pValue) && !setSInt64(pValue) && !setReal64(pValue)) throw new SAXException( - "Unparseable \"number\" value: " + pValue + " !"); + "Unparseable \"number\" value: " + pValue + "!"); } else if (this.iValueTypeStr.equals(MOF.DT_STR)) { if (!setDTAbsolute(pValue) && !setDTInterval(pValue)) { this.iValue = pValue; @@ -132,7 +133,7 @@ } } else if (this.iValueTypeStr.equals(MOF.DT_BOOL)) { if (!setBoolean(pValue)) throw new SAXException("Unparseable \"boolean\" value: " - + pValue + " !"); + + pValue + "!"); } else { throw new SAXException("KEYVALUE node's VALUETYPE attribute must be " + MOF.DT_STR + ", " + MOF.DT_BOOL + " or numeric! " + pValue + " is not allowed!"); |
From: Chris B. <buc...@us...> - 2013-01-29 20:16:23
|
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 4edfa29431dda8c56f0b46abe47b7f97ea685b02 (commit) via 0906566a1b00eee375dc516c8c0a74454c92b063 (commit) via 827757a489447d8906d172073e31e321c39c8936 (commit) via cb7647c132fd27942d9a3679bc861aa99f43ab1d (commit) from 1c16a44018434d1959638ce0df13000ee3fa82f1 (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 4edfa29431dda8c56f0b46abe47b7f97ea685b02 Author: buccella <buc...@li...> Date: Tue Jan 29 15:16:05 2013 -0500 [ 2990304 ] Enhancements for sfcb commit 0906566a1b00eee375dc516c8c0a74454c92b063 Merge: 827757a 1c16a44 Author: buccella <buc...@li...> Date: Tue Jan 29 15:15:19 2013 -0500 Merge branch 'master' of ssh://sblim.git.sourceforge.net/gitroot/sblim/sfcb commit 827757a489447d8906d172073e31e321c39c8936 Author: buccella <buc...@li...> Date: Tue Jan 29 15:15:03 2013 -0500 [ 2990304 ] Enhancements for sfcb commit cb7647c132fd27942d9a3679bc861aa99f43ab1d Author: buccella <buc...@li...> Date: Tue Jan 29 12:53:51 2013 -0500 [ [ 2778345 ] There is no response at GetClass after CreateClass ----------------------------------------------------------------------- Summary of changes: diff --git a/NEWS b/NEWS index b020612..8bfe833 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,8 @@ Bugs fixed: - 3601301 Add stubs for empty CMPI functions for internal providers - 2878328 sfcb and mofc won't compile with --disable-qualifierrep - 3601661 Reenable no-fork http adapter mode +- 2990304 Enhancements for sfcb +- 2778345 There is no response at GetClass after CreateClass Changes in 1.4.3 ================ diff --git a/contributions.txt b/contributions.txt index 32b5092..6226e22 100644 --- a/contributions.txt +++ b/contributions.txt @@ -149,6 +149,7 @@ Shigeyoshi Hashi, NEC 06/06/2009 [ 2780152 ] SetProperty without NewValue gets segfault 09/22/2009 [ 2793653 ] CreateInstance method of abstract class 11/09/2009 [ 2727811 ] typeo in fileRepository.c +01/29/2013 [ 2778345 ] There is no response at GetClass after CreateClass Chad Smith, HP -------------- @@ -212,3 +213,7 @@ Zane Bitter, Red Hat PitRunner --------- 06/12/2012 [ 3533179 ] Double definition for union semun in FreeBSD + +Bas ten Berge +------------- +01/29/2013 [ 2990304 ] Enhancements for sfcb diff --git a/httpAdapter.c b/httpAdapter.c index b74998f..f24d0ef 100644 --- a/httpAdapter.c +++ b/httpAdapter.c @@ -2255,7 +2255,7 @@ ccValidate(X509 * certificate, char **principal, int mode) Validate validate; _SFCB_ENTER(TRACE_HTTPDAEMON, "ccValidate"); - if (getControlChars("certificateAuthlib", &ln) == 0) { + if (getControlChars("certificateAuthLib", &ln) == 0) { libraryName(NULL, ln, dlName, 512); if ((authLib = dlopen(dlName, RTLD_LAZY))) { validate = dlsym(authLib, "_sfcCertificateAuthenticate"); diff --git a/mlog.c b/mlog.c index fdebf78..ee614fb 100644 --- a/mlog.c +++ b/mlog.c @@ -185,6 +185,9 @@ mlogf(int priority, int errout, const char *fmt, ...) case M_INFO: priosysl = LOG_INFO; break; + case M_NOTICE: + priosysl=LOG_NOTICE; + break; case M_ERROR: default: priosysl = LOG_ERR; diff --git a/mlog.h b/mlog.h index 15bce24..97edc4f 100644 --- a/mlog.h +++ b/mlog.h @@ -23,6 +23,7 @@ #define M_DEBUG 1 #define M_INFO 2 #define M_ERROR 3 +#define M_NOTICE 4 #define M_SHOW 1 #define M_QUIET 0 diff --git a/objectImpl.c b/objectImpl.c index 0da6d0d..5125fd5 100644 --- a/objectImpl.c +++ b/objectImpl.c @@ -1627,6 +1627,32 @@ addObjectPropertyH(ClObjectHdr * hdr, ClSection * prps, (char *) addClString(hdr, d.value.chars); } } + /* added from 2778345 */ + else if (od.type == CMPI_string && (d.state & CMPI_nullValue) == 0) { + char *pClString = NULL; + if ((p + i - 1)->quals && ClProperty_Q_EmbeddedObject) + _SFCB_RETURN(-CMPI_RC_ERR_TYPE_MISMATCH); + + switch (d.type) { + case CMPI_chars: + pClString = d.value.chars; + break; + case CMPI_string: + pClString = d.value.string->hdl; + break; + default: + _SFCB_RETURN(-CMPI_RC_ERR_TYPE_MISMATCH); + } + if (pClString) { + if (od.value.string) { + _SFCB_RETURN(-CMPI_RC_ERR_TYPE_MISMATCH); + } + (p + i - 1)->data = d; + (p + i - 1)->data.value.chars = + (char *) addClString(hdr, pClString); + (p + i - 1)->data.type=CMPI_chars; + } + } else if (od.type == CMPI_dateTime && (d.state & CMPI_nullValue) == 0) { char chars[26]; diff --git a/providerRegister.c b/providerRegister.c index d0e9ce1..1d3c775 100644 --- a/providerRegister.c +++ b/providerRegister.c @@ -245,7 +245,7 @@ newProviderRegister() // Set the default provider uid info->uid = provuid; if (!provSFCB) - info->user = strdup(provuser); + info->user = provuser ? strdup(provuser) : NULL; break; case 2: if (strcmp(rv.id, "provider") == 0) diff --git a/sfcBroker.c b/sfcBroker.c index 1ce112f..700d0c3 100644 --- a/sfcBroker.c +++ b/sfcBroker.c @@ -255,6 +255,9 @@ stopBroker() if (providersStopped) break; } + + mlogf(M_NOTICE,M_QUIET,"--- %s V" sfcHttpDaemonVersion " stopped - %d\n", name, currentProc); + remSem(); uninit_sfcBroker(); @@ -607,7 +610,7 @@ main(int argc, char *argv[]) doBa = 0, enableInterOp = 0, httpLocalOnly = 0; - int syslogLevel = LOG_ERR; + int syslogLevel = LOG_NOTICE; long dSockets, pSockets; char *pauseStr; @@ -744,7 +747,7 @@ main(int argc, char *argv[]) startLogging(syslogLevel,1); - mlogf(M_INFO, M_SHOW, "--- %s V" sfcHttpDaemonVersion " started - %d\n", + mlogf(M_NOTICE, M_SHOW, "--- %s V" sfcHttpDaemonVersion " started - %d\n", name, currentProc); //get the creation timestamp for the sequence context hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Michael Chase-S. <mc...@us...> - 2013-01-24 01:16:17
|
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 1c16a44018434d1959638ce0df13000ee3fa82f1 (commit) from 01bf3a34a050f4c92855565f6f29bd7866b04158 (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 1c16a44018434d1959638ce0df13000ee3fa82f1 Author: Michael Chase-Salerno <br...@li...> Date: Wed Jan 23 20:16:02 2013 -0500 3601943 ObjectImpl unit test ----------------------------------------------------------------------- Summary of changes: diff --git a/NEWS b/NEWS index 7569606..b020612 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,7 @@ New features: - 3597806 Bind to arbitrary list of IP addresses in SFCB - 3601386 Add test for EmbeddedObject output - 3599160 Add sfcbproc utility +- 3601943 ObjectImpl unit test Bugs fixed: - 3599526 segfault during ecn with classProviderSf hooks/post-receive -- SFCB - Small Footprint CIM Broker |