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 B. <bla...@us...> - 2012-05-22 02:22:15
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/doc-files In directory vz-cvs-3.sog:/tmp/cvs-serv17844/src/org/sblim/cimclient/doc-files Modified Files: unittest.html Log Message: 3522904 - Add new API WBEMClientSBLIM.isActive() Index: unittest.html =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/doc-files/unittest.html,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- unittest.html 8 May 2012 18:08:54 -0000 1.18 +++ unittest.html 22 May 2012 02:22:13 -0000 1.19 @@ -29,6 +29,7 @@ * 3510090 2012-03-23 blaschke-oss Fix CIMObjectPath.toString() inconsistencies * 3513353 2012-03-30 blaschke-oss TCK: CIMDataType arrays must have length >= 1 * 3466280 2012-04-23 blaschke-oss get instance failure for CIM_IndicationSubscription + * 3522904 2012-05-02 blaschke-oss Add new API WBEMClientSBLIM.isActive() --> </head> <body style="background-color: white;"> @@ -160,7 +161,14 @@ that the INSTANCENAME elements contain or do not contain a namespace as expected.</td></tr> </table> - + +<h3>wbem.WBEMClientTest</h3> + <table border="1" cellpadding="5" cellspacing="0" width="100%"> + <tr><td>testClientIsActive</td> + <td>Tests isActive before initialization, after initialization but before + closing, and after closing.</td></tr> + </table> + <h3>cim.CIMDataTypeTest</h3> <table border="1" cellpadding="5" cellspacing="0" width="100%"> <tr><td>testScalarDataTypes</td> |
From: Narasimha S. <nsh...@us...> - 2012-05-21 21:22:44
|
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 0e2196798140db45b8f9f35aa3da636ae8f6153c (commit) from 87f9c4a243f5040f7dbe778c036df6d738c85061 (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 0e2196798140db45b8f9f35aa3da636ae8f6153c Author: Narasimha Sharoff <nsh...@us...> Date: Mon May 21 14:21:19 2012 -0700 [ 3527920 ] RI and http response codes Signed-off-by: Narasimha Sharoff <nsh...@us...> ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 1aa3f86..28a0d37 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-05-21 Narasimha Sharoff <nsh...@us...> + + * indCIMXMLExport.c, indCIMXMLHander.c: + [ 3527920 ] RI and http response codes + 2012-05-18 Chris Buccella <buc...@li...> * objectImpl.c: diff --git a/NEWS b/NEWS index 3dfeb98..b6112fe 100644 --- a/NEWS +++ b/NEWS @@ -97,6 +97,7 @@ New Features: - 3501314 Add dynamic logging and syslog output to sfcb trace - 3517530 Implement mark, release routines in CMPIBrokerMemFT - 3513390 Enforce LD and subscription limits +- 3527920 RI and http responsecodes Bugs Fixed: - 3514627 unsupported sfcb.cfg param - use exit call diff --git a/indCIMXMLExport.c b/indCIMXMLExport.c index 1c00e0d..dbaa4b3 100644 --- a/indCIMXMLExport.c +++ b/indCIMXMLExport.c @@ -325,15 +325,29 @@ getResponse(CurlData * cd, char **msg) // Use CURLINFO_HTTP_CODE instead of CURLINFO_RESPONSE_CODE // (more portable to older versions of curl) curl_easy_getinfo(cd->mHandle, CURLINFO_HTTP_CODE, &responseCode); - if (responseCode == 401) { - error = (cd->mUserPass) ? "Invalid username/password." : - "Username/password required."; - *msg = strdup(error); - rc = 3; - } else { - rc = 4; - *msg = getErrorMessage(rv); - } + switch(responseCode) { + case 200: + rc = 0; /* HTTP 200 is OK. set rc to 0 */ + break; + case 400: + *msg = strdup("Bad Request"); + rc = 400; + break; + case 401: + error = (cd->mUserPass) ? "Invalid username/password." : + "Username/password required."; + *msg = strdup(error); + rc = 401; + break; + case 501: + *msg = strdup("Not Implemented"); + rc = 501; + break; + default: + *msg = getErrorMessage(rv); + rc = (int)responseCode; + break; + } return rc; } diff --git a/indCIMXMLHandler.c b/indCIMXMLHandler.c index a2dd6c1..300c5a3 100644 --- a/indCIMXMLHandler.c +++ b/indCIMXMLHandler.c @@ -603,6 +603,7 @@ deliverInd(const CMPIObjectPath * ref, const CMPIArgs * in, CMPIInstance * ind) static int id = 1; char *resp; char *msg; + int rc = 0; if ((hci = internalProviderGetInstance(ref, &st)) == NULL) { setStatus(&st, CMPI_RC_ERR_NOT_FOUND, NULL); @@ -615,9 +616,10 @@ deliverInd(const CMPIObjectPath * ref, const CMPIArgs * in, CMPIInstance * ind) sprintf(strId, "%d", id++); xs = exportIndicationReq(ind, strId); sb = segments2stringBuffer(xs.segments); - if (exportIndication - ((char *) dest->hdl, (char *) sb->ft->getCharPtr(sb), &resp, &msg)) { - setStatus(&st, CMPI_RC_ERR_FAILED, NULL); + rc = exportIndication((char*)dest->hdl, + (char*)sb->ft->getCharPtr(sb), &resp, &msg); + if (rc != 0) { + setStatus(&st,rc,NULL); } RespSegment rs = xs.segments[5]; UtilStringBuffer *usb = (UtilStringBuffer *) rs.txt; @@ -1104,8 +1106,14 @@ IndCIMXMLHandlerInvokeMethod(CMPIMethodMI * mi, // Now send the indication st = deliverInd(ref, in, ind); - if (st.rc != 0) { - if (RIEnabled){ + + switch (st.rc) { + case 0: /* Success */ + case 400: /* Bad Request XML */ + case 501: /* Not Implemented */ + break; + default: + if (RIEnabled){ _SFCB_TRACE(1,("--- Indication delivery failed, adding to retry queue")); // Indication delivery failed, send to retry queue // build an element @@ -1140,6 +1148,7 @@ IndCIMXMLHandlerInvokeMethod(CMPIMethodMI * mi, } CMRelease(ctxLocal); } + break; } CMRelease(ind); } hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Narasimha S. <nsh...@us...> - 2012-05-21 18:58:33
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv32547 Modified Files: indCIMXMLExport.c Log Message: [ 3527920 ] RI and http response codes Index: indCIMXMLExport.c =================================================================== RCS file: /cvsroot/sblim/sfcb/indCIMXMLExport.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- indCIMXMLExport.c 21 May 2012 17:22:37 -0000 1.16 +++ indCIMXMLExport.c 21 May 2012 18:58:30 -0000 1.17 @@ -266,29 +266,32 @@ rv = curl_easy_perform(cd->mHandle); if (rv) { - int responseCode = -1; + long responseCode = -1; char *error; // Use CURLINFO_HTTP_CODE instead of CURLINFO_RESPONSE_CODE // (more portable to older versions of curl) curl_easy_getinfo(cd->mHandle, CURLINFO_HTTP_CODE, &responseCode); - rc = responseCode; /* set the return code */ switch(responseCode) { case 200: rc = 0; /* HTTP 200 is OK. set rc to 0 */ break; case 400: *msg = strdup("Bad Request"); + rc = 400; break; case 401: error = (cd->mUserPass) ? "Invalid username/password." : "Username/password required."; *msg = strdup(error); + rc = 401; break; case 501: *msg = strdup("Not Implemented"); + rc = 501; break; default: *msg = getErrorMessage(rv); + rc = (int)responseCode; break; } return rc; |
From: Narasimha S. <nsh...@us...> - 2012-05-21 17:24:35
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv17811 Modified Files: indCIMXMLHandler.c Log Message: [ 3527920 ] RI and http response codes Signed-off-by: Narasimha Sharoff <nsh...@us...> Index: indCIMXMLHandler.c =================================================================== RCS file: /cvsroot/sblim/sfcb/indCIMXMLHandler.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- indCIMXMLHandler.c 18 May 2012 15:06:32 -0000 1.52 +++ indCIMXMLHandler.c 21 May 2012 17:24:33 -0000 1.53 @@ -547,6 +547,7 @@ static int id=1; char *resp; char *msg; + int rc = 0; if ((hci=internalProviderGetInstance(ref,&st))==NULL) { setStatus(&st,CMPI_RC_ERR_NOT_FOUND,NULL); @@ -560,8 +561,10 @@ sprintf(strId,"%d",id++); xs=exportIndicationReq(ind,strId); sb=segments2stringBuffer(xs.segments); - if (exportIndication((char*)dest->hdl,(char*)sb->ft->getCharPtr(sb), &resp, &msg)) { - setStatus(&st,CMPI_RC_ERR_FAILED,NULL); + rc = exportIndication((char*)dest->hdl, + (char*)sb->ft->getCharPtr(sb), &resp, &msg); + if (rc != 0) { + setStatus(&st,rc,NULL); } RespSegment rs = xs.segments[5]; UtilStringBuffer* usb = (UtilStringBuffer*)rs.txt; @@ -972,8 +975,13 @@ // Now send the indication st = deliverInd(ref, in, ind); - if (st.rc != 0) { - if (RIEnabled){ + switch (st.rc) { + case 0: /* Success */ + case 400: /* Bad Request XML */ + case 501: /* Not Implemented */ + break; + default: + if (RIEnabled){ _SFCB_TRACE(1,("--- Indication delivery failed, adding to retry queue")); // Indication delivery failed, send to retry queue // build an element @@ -1008,6 +1016,7 @@ } CMRelease(ctxLocal); } + break; } CMRelease(ind); } |
From: Narasimha S. <nsh...@us...> - 2012-05-21 17:22:39
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv17700 Modified Files: ChangeLog indCIMXMLExport.c NEWS Log Message: [ 3527920 ] RI and http responsecodes Singed-off-by: Narasimha Sharoff <nsh...@us...> Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.689 retrieving revision 1.690 diff -u -d -r1.689 -r1.690 --- NEWS 18 May 2012 23:46:01 -0000 1.689 +++ NEWS 21 May 2012 17:22:37 -0000 1.690 @@ -7,6 +7,7 @@ - 3501314 Add dynamic logging and syslog output to sfcb trace - 3517530 Implement mark, release routines in CMPIBrokerMemFT - 3513390 Enforce LD and subscription limits +- 3527920 RI and http responsecodes Bugs fixed: Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.769 retrieving revision 1.770 diff -u -d -r1.769 -r1.770 --- ChangeLog 18 May 2012 23:46:01 -0000 1.769 +++ ChangeLog 21 May 2012 17:22:37 -0000 1.770 @@ -1,3 +1,8 @@ +2012-05-21 Narasimha Sharoff <nsh...@us...> + + * indCIMXMLExport.c, indCIMXMLHander.c: + [ 3527920 ] RI and http response codes + 2012-05-18 Chris Buccella <buc...@li...> * objectImpl.c: Index: indCIMXMLExport.c =================================================================== RCS file: /cvsroot/sblim/sfcb/indCIMXMLExport.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- indCIMXMLExport.c 28 Feb 2012 21:36:16 -0000 1.15 +++ indCIMXMLExport.c 21 May 2012 17:22:37 -0000 1.16 @@ -266,21 +266,31 @@ rv = curl_easy_perform(cd->mHandle); if (rv) { - long responseCode = -1; + int responseCode = -1; char *error; // Use CURLINFO_HTTP_CODE instead of CURLINFO_RESPONSE_CODE // (more portable to older versions of curl) curl_easy_getinfo(cd->mHandle, CURLINFO_HTTP_CODE, &responseCode); - if (responseCode == 401) { + rc = responseCode; /* set the return code */ + switch(responseCode) { + case 200: + rc = 0; /* HTTP 200 is OK. set rc to 0 */ + break; + case 400: + *msg = strdup("Bad Request"); + break; + case 401: error = (cd->mUserPass) ? "Invalid username/password." : "Username/password required."; - *msg=strdup(error); - rc=3; + *msg = strdup(error); + break; + case 501: + *msg = strdup("Not Implemented"); + break; + default: + *msg = getErrorMessage(rv); + break; } - else { - rc=4; - *msg = getErrorMessage(rv); - } return rc; } |
From: Chris B. <buc...@us...> - 2012-05-19 00:24:14
|
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 87f9c4a243f5040f7dbe778c036df6d738c85061 (commit) via 1f71a3a5030982bc22b3d1f6ead1da7d26faf892 (commit) from f72ae66b66102b892ded4ba2fd4a17330f23662d (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 87f9c4a243f5040f7dbe778c036df6d738c85061 Author: buccella <buc...@li...> Date: Fri May 18 20:24:24 2012 -0400 [ 3528096 ] Error status codes sometimes not propigated for instances commit 1f71a3a5030982bc22b3d1f6ead1da7d26faf892 Author: buccella <buc...@li...> Date: Fri May 18 20:23:30 2012 -0400 [ 3528074 ] Improve CMPIInstance Error Codes ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 43d757d..1aa3f86 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2012-05-18 Chris Buccella <buc...@li...> + + * objectImpl.c: + [ 3528096 ] Error status codes sometimes not propigated for instances + (patch by Tyrel Datwyler) + + * instance.c, test/TestProviders/cmpiTestMiscProvider.c, + test/TestProviders/test/TestMisc8.lines: + [ 3528074 ] Improve CMPIInstance Error Codes + (patch by Tyrel Datwyler) + 2012-05-18 Narasimha Sharoff <nsh...@us...> * indCIMXMLHander.c: diff --git a/NEWS b/NEWS index 7982dba..3dfeb98 100644 --- a/NEWS +++ b/NEWS @@ -105,6 +105,8 @@ Bugs Fixed: - 3525651 CMSetPropertyFilter not CMPI 2.0 compliant - 3527693 Property filters don't work for enum upcalls - 3524819 sfcb may hang on ac call to indication subscription +- 3528074 Improve CMPIInstance Error Codes +- 3528096 Error status codes sometimes not propigated for instances Changes in 1.3.14 ================= diff --git a/instance.c b/instance.c index 059d98c..953fea4 100644 --- a/instance.c +++ b/instance.c @@ -164,6 +164,10 @@ __ift_release(CMPIInstance *instance) { struct native_instance *i = (struct native_instance *) instance; + if (!instance->hdl) { + CMReturn(CMPI_RC_ERR_INVALID_HANDLE); + } + if (i->mem_state && i->mem_state != MEM_RELEASED) { __release_list(i->property_list); __release_list(i->key_list); @@ -180,8 +184,15 @@ static CMPIInstance * __ift_clone(const CMPIInstance *instance, CMPIStatus *rc) { struct native_instance *i = (struct native_instance *) instance; - struct native_instance *new = (struct native_instance *) - malloc(sizeof(struct native_instance)); + struct native_instance *new; + + if (!instance->hdl) { + if (rc) + CMSetStatus(rc, CMPI_RC_ERR_INVALID_HANDLE); + return NULL; + } + + new = (struct native_instance*) malloc(sizeof(struct native_instance)); new->refCount = 0; new->mem_state = MEM_NOT_TRACKED; @@ -193,6 +204,8 @@ __ift_clone(const CMPIInstance *instance, CMPIStatus *rc) ClInstanceRebuild((ClInstance *) instance->hdl, NULL); ((CMPIInstance *) new)->ft = instance->ft; + if (rc) + CMSetStatus(rc, CMPI_RC_OK); return (CMPIInstance *) new; } @@ -204,7 +217,7 @@ __ift_internal_getPropertyAt(const CMPIInstance *ci, CMPICount i, CMPIData rv = { 0, CMPI_notFound, {0} }; if (ClInstanceGetPropertyAt(inst, i, &rv, name, NULL)) { if (rc) - CMSetStatus(rc, CMPI_RC_ERR_NOT_FOUND); + CMSetStatus(rc, CMPI_RC_ERR_NO_SUCH_PROPERTY); return rv; } @@ -239,8 +252,16 @@ CMPIData __ift_getPropertyAt(const CMPIInstance *ci, CMPICount i, CMPIString **name, CMPIStatus *rc) { + CMPIData rv = { 0, CMPI_notFound, {0} }; char *sname; - CMPIData rv = __ift_internal_getPropertyAt(ci, i, &sname, rc, 0); + + if (!ci->hdl) { + if (rc) + CMSetStatus(rc, CMPI_RC_ERR_INVALID_HANDLE); + return rv; + } + + rv = __ift_internal_getPropertyAt(ci, i, &sname, rc, 0); if (name) { *name = sfcb_native_new_CMPIString(sname, NULL, 0); } @@ -250,17 +271,30 @@ __ift_getPropertyAt(const CMPIInstance *ci, CMPICount i, CMPIData __ift_getProperty(const CMPIInstance *ci, const char *id, CMPIStatus *rc) { - ClInstance *inst = (ClInstance *) ci->hdl; - ClSection *prps = &inst->properties; + ClInstance *inst; + ClSection *prps; CMPIData rv = { 0, CMPI_notFound, {0} }; int i; + if (!ci->hdl) { + if (rc) + CMSetStatus(rc, CMPI_RC_ERR_INVALID_HANDLE); + return rv; + } else if (!id) { + if (rc) + CMSetStatus(rc, CMPI_RC_ERR_NO_SUCH_PROPERTY); + return rv; + } + + inst = (ClInstance *) ci->hdl; + prps = &inst->properties; + if ((i = ClObjectLocateProperty(&inst->hdr, prps, id)) != 0) { return __ift_getPropertyAt(ci, i - 1, NULL, rc); } if (rc) - CMSetStatus(rc, CMPI_RC_ERR_NOT_FOUND); + CMSetStatus(rc, CMPI_RC_ERR_NO_SUCH_PROPERTY); return rv; } @@ -268,6 +302,13 @@ static CMPICount __ift_getPropertyCount(const CMPIInstance *ci, CMPIStatus *rc) { ClInstance *inst = (ClInstance *) ci->hdl; + + if (!ci->hdl) { + if (rc) + CMSetStatus(rc, CMPI_RC_ERR_INVALID_HANDLE); + return (CMPICount) 0; + } + if (rc) CMSetStatus(rc, CMPI_RC_OK); return (CMPICount) ClInstanceGetPropertyCount(inst); @@ -278,10 +319,16 @@ __ift_setProperty(const CMPIInstance *instance, const char *name, const CMPIValue * value, CMPIType type) { struct native_instance *i = (struct native_instance *) instance; - ClInstance *inst = (ClInstance *) instance->hdl; + ClInstance *inst; CMPIData data = { type, CMPI_goodValue, {0LL} }; int rc; + if (!instance->hdl) { + CMReturn(CMPI_RC_ERR_INVALID_HANDLE); + } + + inst = (ClInstance *) instance->hdl; + if (type == CMPI_chars) { /* * VM: is this OK or do we need a __new copy @@ -321,6 +368,7 @@ __ift_setProperty(const CMPIInstance *instance, ClInstanceFilterFlagProperty(inst, rc - 1); } if (rc < 0) + /* negative rc is a negated CMPI_RC_ERR return code */ CMReturn(-rc); } CMReturn(CMPI_RC_OK); @@ -355,6 +403,11 @@ __ift_setObjectPath(CMPIInstance *inst, const CMPIObjectPath * cop) int j; CMPIStatus rc = { CMPI_RC_OK, NULL }; + if (!inst->hdl) { + CMSetStatus(&rc, CMPI_RC_ERR_INVALID_HANDLE); + return rc; + } + /* in the case the instance is filtered need to reset the filter with new key list */ if (((struct native_instance *)inst)->filtered) { char **props = ((struct native_instance *)inst)->property_list; @@ -425,10 +478,17 @@ __ift_getObjectPath(const CMPIInstance *instance, CMPIStatus *rc) int j, f = 0; CMPIStatus tmp; - const char *cn = - ClInstanceGetClassName((ClInstance *) instance->hdl); - const char *ns = - ClInstanceGetNameSpace((ClInstance *) instance->hdl); + const char *cn; + const char *ns; + + if (!instance->hdl) { + if (rc) + CMSetStatus(rc, CMPI_RC_ERR_INVALID_HANDLE); + return NULL; + } + + cn = ClInstanceGetClassName((ClInstance *) instance->hdl); + ns = ClInstanceGetNameSpace((ClInstance *) instance->hdl); CMPIObjectPath *cop; cop = TrackedCMPIObjectPath(ns, cn, rc); @@ -568,7 +628,7 @@ static CMPIStatus __ift_setPropertyFilter(CMPIInstance * instance, /* NULL property list, no need to set filter */ CMReturn(CMPI_RC_OK); } - if (instance == NULL) { + if (!instance->hdl) { rc.rc = CMPI_RC_ERR_INVALID_HANDLE; } else { diff --git a/objectImpl.c b/objectImpl.c index b26f521..0bf198e 100644 --- a/objectImpl.c +++ b/objectImpl.c @@ -1678,7 +1678,7 @@ addObjectPropertyH(ClObjectHdr * hdr, ClSection * prps, else if (hdr->type == HDR_Instance && od.type == CMPI_instance && (d.state & CMPI_nullValue) == 0) { if (d.type != CMPI_instance) { - _SFCB_RETURN(CMPI_RC_ERR_TYPE_MISMATCH); + _SFCB_RETURN(-CMPI_RC_ERR_TYPE_MISMATCH); } else { (p + i - 1)->data = d; int size = getInstanceSerializedSize(d.value.inst); @@ -1697,7 +1697,7 @@ addObjectPropertyH(ClObjectHdr * hdr, ClSection * prps, else if (hdr->type == HDR_Args && od.type == CMPI_instance && (d.state & CMPI_nullValue) == 0) { if (d.type != CMPI_instance) { - _SFCB_RETURN(CMPI_RC_ERR_TYPE_MISMATCH); + _SFCB_RETURN(-CMPI_RC_ERR_TYPE_MISMATCH); } else { (p + i - 1)->data = d; diff --git a/test/TestProviders/cmpiTestMiscProvider.c b/test/TestProviders/cmpiTestMiscProvider.c index 337d8f9..6af9fc8 100644 --- a/test/TestProviders/cmpiTestMiscProvider.c +++ b/test/TestProviders/cmpiTestMiscProvider.c @@ -800,6 +800,7 @@ static int _testCMPIInstance() { CMPIStatus rc = { CMPI_RC_OK, NULL }; + int errors = 0; CMPIInstance *instance = NULL; CMPIInstance *clonedInstance = NULL; @@ -818,9 +819,6 @@ _testCMPIInstance() const char *name2 = "secondPropertyName"; CMPIValue value2; CMPIType type = CMPI_uint64; - CMPIBoolean dataEqual = 0; - CMPIBoolean objectPathEqual = 0; - CMPIBoolean cloneSuccessful = 0; CMPIString *beforeObjPath = NULL; CMPIString *afterObjPath = NULL; const char *beforeString = NULL; @@ -832,13 +830,18 @@ _testCMPIInstance() value2.uint32 = 20; rc = CMSetProperty(instance, name2, &value2, type); count = CMGetPropertyCount(instance, &rc); + /* count will vary based on what's in the MOF */ + if (count != 5) { + errors = 1; + } returnedData1 = CMGetProperty(instance, name1, &rc); - if (returnedData1.value.uint32 == 10) { - dataEqual = 1; + if (returnedData1.value.uint32 != 10) { + errors += 2; } - returnedData2 = CMGetPropertyAt(instance, 2, &returnedName, &rc); - if (returnedData2.value.uint32 == 20) { - dataEqual = 1; + /* this check is really SFCB-dependent, since position isn't guaranteed */ + returnedData2 = CMGetPropertyAt(instance, 0, &returnedName, &rc); + if (returnedData2.value.uint32 != 20) { + errors += 4; } newObjPath = make_ObjectPath(_broker, _Namespace, _ClassName); returnedObjPath = CMGetObjectPath(instance, &rc); @@ -850,28 +853,27 @@ _testCMPIInstance() afterObjPath = CMObjectPathToString(returnedObjPath, &rc); afterString = CMGetCharsPtr(afterObjPath, &rc); afterString = CMGetCharsPtr(CMGetNameSpace(returnedObjPath, &rc), &rc); - if (strcmp("newNamespace", afterString) == 0) { - objectPathEqual = 1; + if (strcmp("newNamespace", afterString) != 0) { + errors += 8; } clonedInstance = instance->ft->clone(instance, &rc); clonedData1 = CMGetProperty(clonedInstance, name1, &rc); rc = clonedInstance->ft->release(clonedInstance); - if (returnedData1.value.uint32 == clonedData1.value.uint32) { - cloneSuccessful = 1; - } else { - cloneSuccessful = 0; - } + if (returnedData1.value.uint32 != clonedData1.value.uint32) { + errors += 16; + } CMGetProperty(instance, "noProperty", &rc); if (rc.rc != CMPI_RC_ERR_NO_SUCH_PROPERTY) { - return 1; + errors += 32; } CMGetPropertyAt(instance, 100, &returnedName, &rc); if (rc.rc != CMPI_RC_ERR_NO_SUCH_PROPERTY) { - return 1; + errors += 64; } rc = instance->ft->release(instance); - return 0; + + return errors; } static int diff --git a/test/TestProviders/tests/TestMisc8.lines b/test/TestProviders/tests/TestMisc8.lines index 43491c3..76bb0b0 100644 --- a/test/TestProviders/tests/TestMisc8.lines +++ b/test/TestProviders/tests/TestMisc8.lines @@ -1,6 +1,6 @@ <METHODRESPONSE NAME="TestCMPIBroker"> <RETURNVALUE PARAMTYPE="uint32"> -<VALUE>1</VALUE> +<VALUE>0</VALUE> </RETURNVALUE> <PARAMVALUE NAME="Result" PARAMTYPE="string"> <VALUE>_testCMPIInstance </VALUE> hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Chris B. <buc...@us...> - 2012-05-19 00:23:56
|
Update of /cvsroot/sblim/sfcb/test/TestProviders In directory vz-cvs-3.sog:/tmp/cvs-serv24164/test/TestProviders Modified Files: cmpiTestMiscProvider.c Log Message: removed errant printf statements Index: cmpiTestMiscProvider.c =================================================================== RCS file: /cvsroot/sblim/sfcb/test/TestProviders/cmpiTestMiscProvider.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- cmpiTestMiscProvider.c 18 May 2012 22:57:48 -0000 1.3 +++ cmpiTestMiscProvider.c 19 May 2012 00:23:53 -0000 1.4 @@ -989,7 +989,6 @@ /* count will vary based on what's in the MOF */ if (count != 5) { - fprintf(stderr, "count is %d\n", count); errors=1; } returnedData1 = CMGetProperty(instance, name1, &rc); @@ -997,16 +996,10 @@ { errors+=2; } - int i; - for(i=0; i<count; i++) { - returnedData2 = CMGetPropertyAt(instance, i, &returnedName, &rc); - fprintf(stderr, "property %d is %s\n", i, (char*)returnedName->hdl); - } /* this check is really SFCB-dependent, since position isn't guaranteed */ returnedData2 = CMGetPropertyAt(instance, 0, &returnedName, &rc); if (returnedData2.value.uint32 != 20) { - fprintf(stderr, "returnedData2.value.uint32=%d\n", returnedData2.value.uint32); errors+=4; } newObjPath = make_ObjectPath(_broker, _Namespace, _ClassName); |
From: Chris B. <buc...@us...> - 2012-05-18 23:46:04
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv19665 Modified Files: objectImpl.c ChangeLog NEWS Log Message: [ 3528096 ] Error status codes sometimes not propigated for instances Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.688 retrieving revision 1.689 diff -u -d -r1.688 -r1.689 --- NEWS 18 May 2012 22:57:47 -0000 1.688 +++ NEWS 18 May 2012 23:46:01 -0000 1.689 @@ -18,6 +18,7 @@ - 3527693 Property filters don't work for enum upcalls - 3524819 sfcb may hang on ac call to indication subscription - 3528074 Improve CMPIInstance Error Codes +- 3528096 Error status codes sometimes not propigated for instances Changes in 1.3.14 ================= Index: objectImpl.c =================================================================== RCS file: /cvsroot/sblim/sfcb/objectImpl.c,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- objectImpl.c 26 Mar 2012 19:39:36 -0000 1.55 +++ objectImpl.c 18 May 2012 23:46:01 -0000 1.56 @@ -1538,7 +1538,7 @@ else if (hdr->type == HDR_Instance && od.type == CMPI_instance && (d.state & CMPI_nullValue) == 0) { if (d.type != CMPI_instance) { - _SFCB_RETURN(CMPI_RC_ERR_TYPE_MISMATCH); + _SFCB_RETURN(-CMPI_RC_ERR_TYPE_MISMATCH); } else { (p + i - 1)->data = d; @@ -1558,7 +1558,7 @@ else if (hdr->type == HDR_Args && od.type == CMPI_instance && (d.state & CMPI_nullValue) == 0) { if (d.type != CMPI_instance) { - _SFCB_RETURN(CMPI_RC_ERR_TYPE_MISMATCH); + _SFCB_RETURN(-CMPI_RC_ERR_TYPE_MISMATCH); } else { (p + i - 1)->data = d; Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.768 retrieving revision 1.769 diff -u -d -r1.768 -r1.769 --- ChangeLog 18 May 2012 22:57:47 -0000 1.768 +++ ChangeLog 18 May 2012 23:46:01 -0000 1.769 @@ -1,5 +1,9 @@ 2012-05-18 Chris Buccella <buc...@li...> + * objectImpl.c: + [ 3528096 ] Error status codes sometimes not propigated for instances + (patch by Tyrel Datwyler) + * instance.c, test/TestProviders/cmpiTestMiscProvider.c, test/TestProviders/test/TestMisc8.lines: [ 3528074 ] Improve CMPIInstance Error Codes |
From: Chris B. <buc...@us...> - 2012-05-18 22:57:50
|
Update of /cvsroot/sblim/sfcb/test/TestProviders In directory vz-cvs-3.sog:/tmp/cvs-serv13638/test/TestProviders Modified Files: cmpiTestMiscProvider.c Log Message: [ 3528074 ] Improve CMPIInstance Error Codes Index: cmpiTestMiscProvider.c =================================================================== RCS file: /cvsroot/sblim/sfcb/test/TestProviders/cmpiTestMiscProvider.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- cmpiTestMiscProvider.c 6 Nov 2009 00:18:29 -0000 1.2 +++ cmpiTestMiscProvider.c 18 May 2012 22:57:48 -0000 1.3 @@ -956,6 +956,7 @@ static int _testCMPIInstance () { CMPIStatus rc = { CMPI_RC_OK, NULL }; + int errors = 0; CMPIInstance* instance = NULL; CMPIInstance* clonedInstance = NULL; @@ -974,9 +975,6 @@ const char* name2 = "secondPropertyName"; CMPIValue value2; CMPIType type = CMPI_uint64; - CMPIBoolean dataEqual = 0; - CMPIBoolean objectPathEqual = 0; - CMPIBoolean cloneSuccessful = 0; CMPIString* beforeObjPath = NULL; CMPIString* afterObjPath = NULL; const char* beforeString = NULL; @@ -988,15 +986,28 @@ value2.uint32 = 20; rc = CMSetProperty(instance, name2, &value2, type); count = CMGetPropertyCount(instance, &rc); + /* count will vary based on what's in the MOF */ + if (count != 5) + { + fprintf(stderr, "count is %d\n", count); + errors=1; + } returnedData1 = CMGetProperty(instance, name1, &rc); - if (returnedData1.value.uint32 == 10) + if (returnedData1.value.uint32 != 10) { - dataEqual = 1 ; + errors+=2; } - returnedData2 = CMGetPropertyAt(instance, 2, &returnedName, &rc); - if (returnedData2.value.uint32 == 20) + int i; + for(i=0; i<count; i++) { + returnedData2 = CMGetPropertyAt(instance, i, &returnedName, &rc); + fprintf(stderr, "property %d is %s\n", i, (char*)returnedName->hdl); + } + /* this check is really SFCB-dependent, since position isn't guaranteed */ + returnedData2 = CMGetPropertyAt(instance, 0, &returnedName, &rc); + if (returnedData2.value.uint32 != 20) { - dataEqual = 1 ; + fprintf(stderr, "returnedData2.value.uint32=%d\n", returnedData2.value.uint32); + errors+=4; } newObjPath = make_ObjectPath(_broker, _Namespace, _ClassName); returnedObjPath = CMGetObjectPath(instance, &rc); @@ -1008,34 +1019,30 @@ afterObjPath = CMObjectPathToString(returnedObjPath, &rc); afterString = CMGetCharsPtr(afterObjPath,&rc); afterString = CMGetCharsPtr(CMGetNameSpace(returnedObjPath, &rc), &rc); - if (strcmp("newNamespace",afterString) == 0) + if (strcmp("newNamespace",afterString) != 0) { - objectPathEqual = 1; + errors+=8; } clonedInstance = instance->ft->clone(instance, &rc); clonedData1 = CMGetProperty(clonedInstance, name1, &rc); rc = clonedInstance->ft->release(clonedInstance); - if (returnedData1.value.uint32 == clonedData1.value.uint32) - { - cloneSuccessful = 1; - } - else + if (returnedData1.value.uint32 != clonedData1.value.uint32) { - cloneSuccessful = 0; + errors+=16; } CMGetProperty(instance, "noProperty", &rc); if (rc.rc != CMPI_RC_ERR_NO_SUCH_PROPERTY) { - return 1; + errors+=32; } CMGetPropertyAt(instance, 100, &returnedName, &rc); if (rc.rc != CMPI_RC_ERR_NO_SUCH_PROPERTY) { - return 1; + errors+=64; } rc = instance->ft->release(instance); - return 0; + return errors; } static int _testCMPIObjectPath () |
From: Narasimha S. <nsh...@us...> - 2012-05-18 15:17: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 f72ae66b66102b892ded4ba2fd4a17330f23662d (commit) from 13f7c1262b5b6170ce17e89242c1da0585c44fba (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 f72ae66b66102b892ded4ba2fd4a17330f23662d Author: Narasimha Sharoff <nsh...@us...> Date: Fri May 18 08:15:23 2012 -0700 [ 3524819 ] sfcb may hang on ac call to indication subscription ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index a3550b9..43d757d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-05-18 Narasimha Sharoff <nsh...@us...> + + * indCIMXMLHander.c: + [ 3524819 ] sfcb may hang on ac call to indication subscription + 2012-05-17 Chris Buccella <buc...@li...> * brokerUpc.c, diff --git a/NEWS b/NEWS index 196a512..7982dba 100644 --- a/NEWS +++ b/NEWS @@ -104,6 +104,7 @@ Bugs Fixed: - 3517573 Problem with SequenceContext migration - 3525651 CMSetPropertyFilter not CMPI 2.0 compliant - 3527693 Property filters don't work for enum upcalls +- 3524819 sfcb may hang on ac call to indication subscription Changes in 1.3.14 ================= diff --git a/indCIMXMLHandler.c b/indCIMXMLHandler.c index e9de848..a2dd6c1 100644 --- a/indCIMXMLHandler.c +++ b/indCIMXMLHandler.c @@ -1004,7 +1004,13 @@ int countLD (const CMPIContext * ctx) { int initIndCIMXML(const CMPIContext * ctx) { + unsigned int ri; _SFCB_ENTER(TRACE_INDPROVIDER, "initIndCIMXML"); + + /* If RI is disabled, return */ + getControlUNum("DeliveryRetryAttempts", &ri); + if (!ri) _SFCB_RETURN(0); + //Refill the queue if there were any from the last run refillRetryQ(ctx); if ( LDcount == -1 ) { hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Narasimha S. <nsh...@us...> - 2012-05-18 15:06:35
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv14086 Modified Files: ChangeLog indCIMXMLHandler.c NEWS Log Message: [ 3524819 ] sfcb may hang on ac call to indication subscription Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.686 retrieving revision 1.687 diff -u -d -r1.686 -r1.687 --- NEWS 17 May 2012 21:45:11 -0000 1.686 +++ NEWS 18 May 2012 15:06:32 -0000 1.687 @@ -16,6 +16,7 @@ - 3517573 Problem with SequenceContext migration - 3525651 CMSetPropertyFilter not CMPI 2.0 compliant - 3527693 Property filters don't work for enum upcalls +- 3524819 sfcb may hang on ac call to indication subscription Changes in 1.3.14 ================= Index: indCIMXMLHandler.c =================================================================== RCS file: /cvsroot/sblim/sfcb/indCIMXMLHandler.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- indCIMXMLHandler.c 16 May 2012 16:12:37 -0000 1.51 +++ indCIMXMLHandler.c 18 May 2012 15:06:32 -0000 1.52 @@ -880,7 +880,13 @@ int initIndCIMXML (const CMPIContext * ctx) { + unsigned int ri; _SFCB_ENTER(TRACE_INDPROVIDER, "initIndCIMXML"); + + /* If RI is disabled, return */ + getControlUNum("DeliveryRetryAttempts", &ri); + if (!ri) _SFCB_RETURN(0); + //Refill the queue if there were any from the last run refillRetryQ(ctx); _SFCB_RETURN(0); Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.766 retrieving revision 1.767 diff -u -d -r1.766 -r1.767 --- ChangeLog 17 May 2012 21:45:11 -0000 1.766 +++ ChangeLog 18 May 2012 15:06:32 -0000 1.767 @@ -1,3 +1,8 @@ +2012-05-18 Narasimha Sharoff <nsh...@us...> + + * indCIMXMLHander.c: + [ 3524819 ] sfcb may hang on ac call to indication subscription + 2012-05-17 Chris Buccella <buc...@li...> * brokerUpc.c, |
From: Chris B. <buc...@us...> - 2012-05-17 21:45:13
|
Update of /cvsroot/sblim/sfcb/test/xmltest In directory vz-cvs-3.sog:/tmp/cvs-serv7907/test/xmltest Added Files: enumerateInstance_CIM_IndicationService-propertyFilter.lines enumerateInstance_CIM_IndicationService-propertyFilter.xml Log Message: [ 3527693 ] Property filters don't work for enum upcalls --- NEW FILE: enumerateInstance_CIM_IndicationService-propertyFilter.xml --- <?xml version="1.0" encoding="utf-8" ?> <CIM CIMVERSION="2.0" DTDVERSION="2.0"> <MESSAGE ID="4711" PROTOCOLVERSION="1.0"><SIMPLEREQ><IMETHODCALL NAME="EnumerateInstances"><LOCALNAMESPACEPATH><NAMESPACE NAME="root"></NAMESPACE><NAMESPACE NAME="interop"></NAMESPACE></LOCALNAMESPACEPATH> <IPARAMVALUE NAME="ClassName"><CLASSNAME NAME="cim_indicationservice"/></IPARAMVALUE> <IPARAMVALUE NAME="DeepInheritance"><VALUE>TRUE</VALUE></IPARAMVALUE> <IPARAMVALUE NAME="LocalOnly"><VALUE>FALSE</VALUE></IPARAMVALUE> <IPARAMVALUE NAME="IncludeQualifiers"><VALUE>FALSE</VALUE></IPARAMVALUE> <IPARAMVALUE NAME="IncludeClassOrigin"><VALUE>TRUE</VALUE></IPARAMVALUE> <IPARAMVALUE NAME="PropertyList"><VALUE.ARRAY><VALUE>FilterCreationEnabled</VALUE></VALUE.ARRAY></IPARAMVALUE> </IMETHODCALL></SIMPLEREQ> </MESSAGE></CIM> --- NEW FILE: enumerateInstance_CIM_IndicationService-propertyFilter.lines --- <PROPERTY NAME="FilterCreationEnabled" TYPE="boolean"> <VALUE>TRUE</VALUE> </PROPERTY> </INSTANCE> |
From: Chris B. <buc...@us...> - 2012-05-17 21:01:22
|
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 13f7c1262b5b6170ce17e89242c1da0585c44fba (commit) from d2a83f4428ca7e82afc72eafb6616af0e94cb45d (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 13f7c1262b5b6170ce17e89242c1da0585c44fba Author: buccella <buc...@li...> Date: Thu May 17 17:00:56 2012 -0400 [ 3527693 ] Property filters don't work for enum upcalls ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index c271ea1..a3550b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2012-05-17 Chris Buccella <buc...@li...> + * brokerUpc.c, + test/xmltest/enumerateInstance_CIM_IndicationService-propertyFilter.*: + [ 3527693 ] Property filters don't work for enum upcalls + (patch by Tyrel Datwyler) + * classProviderGz.c, httpAdapter.c, interopProvider.c, msgqueue.c, msgqueue.h, providerMgr.c: [ 3527674 ] Faster Startup diff --git a/NEWS b/NEWS index 8969355..196a512 100644 --- a/NEWS +++ b/NEWS @@ -103,6 +103,7 @@ Bugs Fixed: - 3516184 commClose close socket when file hndl is null - 3517573 Problem with SequenceContext migration - 3525651 CMSetPropertyFilter not CMPI 2.0 compliant +- 3527693 Property filters don't work for enum upcalls Changes in 1.3.14 ================= diff --git a/brokerUpc.c b/brokerUpc.c index 6f50c19..1abe89f 100644 --- a/brokerUpc.c +++ b/brokerUpc.c @@ -373,7 +373,8 @@ genericEnumRequest(const CMPIBroker * broker, int initrc = 0; int irc, c, - i = -1; + i = -1, + cnt = bhdr->count; _SFCB_ENTER(TRACE_UPCALLS, "genericEnumRequest"); @@ -389,7 +390,7 @@ genericEnumRequest(const CMPIBroker * broker, sreqSize += i * sizeof(MsgSegment); i = -1; while (props[++i]) { - bhdr->object[i + 2] = setCharsMsgSegment(props[i]); + bhdr->object[i + cnt] = setCharsMsgSegment(props[i]); } bhdr->count += i; } diff --git a/test/xmltest/enumerateInstance_CIM_IndicationService-propertyFilter.lines b/test/xmltest/enumerateInstance_CIM_IndicationService-propertyFilter.lines new file mode 100644 index 0000000..6333abd --- /dev/null +++ b/test/xmltest/enumerateInstance_CIM_IndicationService-propertyFilter.lines @@ -0,0 +1,4 @@ +<PROPERTY NAME="FilterCreationEnabled" TYPE="boolean"> +<VALUE>TRUE</VALUE> +</PROPERTY> +</INSTANCE> diff --git a/test/TestProviders/tests/RIEnumIS.XML b/test/xmltest/enumerateInstance_CIM_IndicationService-propertyFilter.xml similarity index 78% copy from test/TestProviders/tests/RIEnumIS.XML copy to test/xmltest/enumerateInstance_CIM_IndicationService-propertyFilter.xml index 36c0ff7..9c893ff 100644 --- a/test/TestProviders/tests/RIEnumIS.XML +++ b/test/xmltest/enumerateInstance_CIM_IndicationService-propertyFilter.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="utf-8" ?> <CIM CIMVERSION="2.0" DTDVERSION="2.0"> <MESSAGE ID="4711" PROTOCOLVERSION="1.0"><SIMPLEREQ><IMETHODCALL NAME="EnumerateInstances"><LOCALNAMESPACEPATH><NAMESPACE NAME="root"></NAMESPACE><NAMESPACE NAME="interop"></NAMESPACE></LOCALNAMESPACEPATH> -<IPARAMVALUE NAME="ClassName"><CLASSNAME NAME="CIM_IndicationService"/></IPARAMVALUE> +<IPARAMVALUE NAME="ClassName"><CLASSNAME NAME="cim_indicationservice"/></IPARAMVALUE> <IPARAMVALUE NAME="DeepInheritance"><VALUE>TRUE</VALUE></IPARAMVALUE> <IPARAMVALUE NAME="LocalOnly"><VALUE>FALSE</VALUE></IPARAMVALUE> <IPARAMVALUE NAME="IncludeQualifiers"><VALUE>FALSE</VALUE></IPARAMVALUE> <IPARAMVALUE NAME="IncludeClassOrigin"><VALUE>TRUE</VALUE></IPARAMVALUE> +<IPARAMVALUE NAME="PropertyList"><VALUE.ARRAY><VALUE>FilterCreationEnabled</VALUE></VALUE.ARRAY></IPARAMVALUE> </IMETHODCALL></SIMPLEREQ> </MESSAGE></CIM> hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Chris B. <buc...@us...> - 2012-05-17 19:52:42
|
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 d2a83f4428ca7e82afc72eafb6616af0e94cb45d (commit) via d52b477e301eb3e499c56b4635011339c8f1a571 (commit) from 93cfecefeae968e8ffafb80aea1f8e885f934573 (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 d2a83f4428ca7e82afc72eafb6616af0e94cb45d Author: buccella <buc...@li...> Date: Thu May 17 15:50:35 2012 -0400 [ 3527674 ] Faster Startup commit d52b477e301eb3e499c56b4635011339c8f1a571 Author: buccella <buc...@li...> Date: Wed May 16 15:41:08 2012 -0400 Additional cleanup found during 2966659 ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 7cc6870..c271ea1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-05-17 Chris Buccella <buc...@li...> + + * classProviderGz.c, httpAdapter.c, interopProvider.c, + msgqueue.c, msgqueue.h, providerMgr.c: + [ 3527674 ] Faster Startup + 2012-05-16 Chris Buccella <buc...@li...> * control.c, msgqueue.c, msgqueue.h, sfcBroker.c: diff --git a/NEWS b/NEWS index 9879903..8969355 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,8 @@ New features: Bugs fixed: - 3495804 Cleanup: httpProcId still defined, wrong define in cimXmlGen - 3516167 Force kill sfcbd on stop if needed +- 2966659 Cleanup https daemon remnants +- 3527674 Faster Startup Changes in 1.4.2 ================ @@ -63,8 +65,6 @@ New features: Bugs fixed: -- 2966659 Cleanup https daemon remnants - Everything in 1.3.10, plus: - 3130727 CMPIPropertyMIFT.setProperty() missing objectpath keys diff --git a/classProviderGz.c b/classProviderGz.c index ebe79d1..546a100 100644 --- a/classProviderGz.c +++ b/classProviderGz.c @@ -1138,6 +1138,9 @@ ClassProviderInvokeMethod(CMPIMethodMI * mi, atoi(val + sizeof(char))) > 0) ? cacheLimit : 10; } + /* let providerMgr know that we're odne init'ing */ + semRelease(sfcbSem,INIT_CLASS_PROV_ID); + st.rc = CMPI_RC_OK; } diff --git a/httpAdapter.c b/httpAdapter.c index 0ea9b4a..47aa3cc 100644 --- a/httpAdapter.c +++ b/httpAdapter.c @@ -91,7 +91,7 @@ int chunkMode = CHUNK_ALLOW; int sfcbSSLMode = 0; /* used as a global sslMode */ int httpLocalOnly = 0; /* 1 = only listen on loopback * interface */ -static int hMax; +static long hMax; static int httpProcIdX; static int stopAccepting = 0; static int running = 0; @@ -1855,8 +1855,7 @@ httpDaemon(int argc, char *argv[], int sslMode) int i, rc; char *cp; - long procs, - httpPort; + long httpPort; int httpListenFd = -1; int enableHttp = 0; fd_set httpfds; @@ -1906,10 +1905,8 @@ httpDaemon(int argc, char *argv[], int sslMode) udsPath = "/tmp/sfcbHttpSocket"; #endif - hMax = htMax; /* max number of http procs */ - - if (getControlNum("httpProcs", &procs)) - procs = 10; + if (getControlNum("httpProcs", &hMax)) + hMax = 10; if (getControlBool("enableHttp", &enableHttp)) enableHttp = 1; #ifdef HAVE_UDS @@ -1925,7 +1922,7 @@ httpDaemon(int argc, char *argv[], int sslMode) * note: we check for enableHttps in sfcBroker */ - initHttpProcCtl(procs); + initHttpProcCtl(hMax); if (getControlBool("doBasicAuth", &doBa)) doBa = 0; @@ -2102,6 +2099,10 @@ httpDaemon(int argc, char *argv[], int sslMode) maxfdp1 = (maxfdp1 > udsListenFd) ? maxfdp1 : (udsListenFd + 1); #endif + /* wait until providerMgr is ready to start accepting reqs + (that is, when interopProvider is finished initializing) */ + semAcquire(sfcbSem, INIT_PROV_MGR_ID); + for (;;) { /* diff --git a/interopProvider.c b/interopProvider.c index 192b062..c7545d0 100644 --- a/interopProvider.c +++ b/interopProvider.c @@ -1568,6 +1568,8 @@ InteropProviderInvokeMethod(CMPIMethodMI * mi, else if (strcasecmp(methodName, "_startup") == 0) { initInterOp(_broker, ctx); + /* let httpAdapter know that he can continue */ + semRelease(sfcbSem,INIT_PROV_MGR_ID); } else { diff --git a/msgqueue.c b/msgqueue.c index 53ba7ac..61158ea 100644 --- a/msgqueue.c +++ b/msgqueue.c @@ -122,7 +122,7 @@ semSetValue(int semid, int semnum, int value) } int -initSem(int https, int provs) +initSem(int provs) { union semun sun; int i; @@ -133,8 +133,10 @@ initSem(int https, int provs) semctl(sfcbSem, 0, IPC_RMID, sun); if ((sfcbSem = - semget(sfcbSemKey, 4 + (provs * 3) + 3, + semget(sfcbSemKey, + PROV_PROC_BASE_ID + (provs * PROV_PROC_NUM_SEMS) + PROV_PROC_NUM_SEMS, IPC_CREAT | IPC_EXCL | 0600)) == -1) { + char *emsg = strerror(errno); mlogf(M_ERROR, M_SHOW, "\n--- SFCB semaphore create key: 0x%x failed: %s\n", sfcbSemKey, @@ -145,10 +147,9 @@ initSem(int https, int provs) abort(); } - sun.val = 1; - semctl(sfcbSem, HTTP_GUARD_ID, SETVAL, sun); - sun.val = https; - semctl(sfcbSem, HTTP_PROCS_ID, SETVAL, sun); + sun.val = 0; /* init as unacquirable */ + semctl(sfcbSem, INIT_CLASS_PROV_ID, SETVAL, sun); + semctl(sfcbSem, INIT_PROV_MGR_ID, SETVAL, sun); for (i = 0; i < provs; i++) { sun.val = 1; diff --git a/msgqueue.h b/msgqueue.h index 869cbcb..13fdd30 100644 --- a/msgqueue.h +++ b/msgqueue.h @@ -148,7 +148,7 @@ extern int semReleaseUnDo(int semid, int semnum); extern int semMultiRelease(int semid, int semnum, int n); extern int semGetValue(int semid, int semnum); extern int semSetValue(int semid, int semnum, int value); -extern int initSem(int https, int provs); +extern int initSem(int provs); extern int provProcSem; extern int provWorkSem; @@ -166,8 +166,10 @@ extern char *httpPauseStr; /* * static ids */ -#define HTTP_GUARD_ID 0 -#define HTTP_PROCS_ID 1 + +#define INIT_CLASS_PROV_ID 0 +#define INIT_PROV_MGR_ID 1 + /* * PROV_PROC_BASE_ID must be updated if the number of id's in the above @@ -195,9 +197,7 @@ extern char *httpPauseStr; #define PROV_ALIVE(id) (((id)*(int)(PROV_PROC_NUM_SEMS))+PROV_PROC_ALIVE_ID+PROV_PROC_BASE_ID) extern ComSockets *sPairs; -extern int ptBase, - htBase, - htMax; +extern int ptBase; extern void stopLocalConnectServer(); extern void localConnectServer(); diff --git a/providerMgr.c b/providerMgr.c index 4db8f91..a7d47d5 100644 --- a/providerMgr.c +++ b/providerMgr.c @@ -998,12 +998,17 @@ processProviderMgrRequests() sigprocmask(SIG_SETMASK, &mask, &old_mask); startUpProvider("root/interop", "$ClassProvider$"); + /* wait until classProvider is finished init'ing */ + semAcquire(sfcbSem,INIT_CLASS_PROV_ID); #ifdef SFCB_INCL_INDICATION_SUPPORT if (interOpProvInfoPtr != forceNoProvInfoPtr) { - sleep(2); startUpProvider("root/interop", "$InterOpProvider$"); + /* note: we don't wait here for interopProvider to finish init'ing, + because its init has some reqs that providerMgr will need to process. + httpAdapter waits for interop to init before accepting HTTP requests */ } + #endif #ifdef HAVE_SLP startUpProvider("root/interop", "$ProfileProvider$"); @@ -1144,8 +1149,7 @@ getProviderContext(BinRequestContext * ctx) { unsigned long int l; int rc = 0, - i, - x; + i; char *buf; ProvAddr *as; ComSockets sockets; @@ -1167,7 +1171,6 @@ getProviderContext(BinRequestContext * ctx) ((OperationHdr *) buf)->nameSpace.data = (void *) l; l += ohdr->nameSpace.length; memcpy(buf + l, ohdr->className.data, ohdr->className.length); - x = l; ((OperationHdr *) buf)->className.data = (void *) l; l += ohdr->className.length; diff --git a/sfcBroker.c b/sfcBroker.c index 77951d0..7d2e4b7 100644 --- a/sfcBroker.c +++ b/sfcBroker.c @@ -865,7 +865,7 @@ main(int argc, char *argv[]) startHttp = 1; } - initSem(dSockets, pSockets); + initSem(pSockets); initProvProcCtl(pSockets); init_sfcBroker(); initSocketPairs(pSockets, dSockets); hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Dave B. <bla...@us...> - 2012-05-17 12:17:52
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml In directory vz-cvs-3.sog:/tmp/cvs-serv4063/src/org/sblim/cimclient/internal/cimxml Modified Files: Tag: Experimental CIMClientXML_HelperImpl.java Log Message: 3527580 - WBEMClient should not throw IllegalArgumentException Index: CIMClientXML_HelperImpl.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/CIMClientXML_HelperImpl.java,v retrieving revision 1.18.2.29 retrieving revision 1.18.2.30 diff -u -d -r1.18.2.29 -r1.18.2.30 --- CIMClientXML_HelperImpl.java 25 Apr 2012 02:34:36 -0000 1.18.2.29 +++ CIMClientXML_HelperImpl.java 17 May 2012 12:17:49 -0000 1.18.2.30 @@ -47,6 +47,7 @@ * 3062747 2010-09-21 blaschke-oss SblimCIMClient does not log all CIM-XML responces. * 3514537 2012-04-03 blaschke-oss TCK: execQueryInstances requires boolean, not Boolean * 3521119 2012-04-24 blaschke-oss JSR48 1.0.0: remove CIMObjectPath 2/3/4-parm ctors + * 3527580 2012-05-17 blaschke-oss WBEMClient should not throw IllegalArgumentException */ package org.sblim.cimclient.internal.cimxml; @@ -388,7 +389,7 @@ CIMProperty<?>[] keysA = pObjectName.getKeys(); // Make sure keys are populated - if (keysA.length == 0) throw new IllegalArgumentException( + if (keysA.length == 0) throw new WBEMException(WBEMException.CIM_ERR_INVALID_PARAMETER, "associatorInstances requires keys for the instance to be populated"); Element simplereqE = CIMXMLBuilderImpl.createSIMPLEREQ(pDoc); @@ -463,7 +464,8 @@ "null class name"); // Make sure keys are not populated - if (pObjectName.getKeys().length != 0) throw new IllegalArgumentException( + if (pObjectName.getKeys().length != 0) throw new WBEMException( + WBEMException.CIM_ERR_INVALID_PARAMETER, "Keys should not be populated for associatorClasses"); Element simplereqE = CIMXMLBuilderImpl.createSIMPLEREQ(pDoc); @@ -1305,7 +1307,8 @@ "null class name"); // Make sure keys are not populated - if (pPath.getKeys().length != 0) throw new IllegalArgumentException( + if (pPath.getKeys().length != 0) throw new WBEMException( + WBEMException.CIM_ERR_INVALID_PARAMETER, "Keys should not be populated for referenceClasses"); Element simplereqE = CIMXMLBuilderImpl.createSIMPLEREQ(pDoc); @@ -1365,7 +1368,8 @@ "null class name"); // keys are required for CIMInstance - if (pPath.getKeys().length == 0) throw new IllegalArgumentException( + if (pPath.getKeys().length == 0) throw new WBEMException( + WBEMException.CIM_ERR_INVALID_PARAMETER, "refrenceInstances requires keys for the instance to be populated"); Element simplereqE = CIMXMLBuilderImpl.createSIMPLEREQ(pDoc); |
Update of /cvsroot/sblim/gather/provider In directory vz-cvs-3.sog:/tmp/cvs-serv11356/provider Modified Files: OSBase_MetricDefForMEProvider.c OSBase_MetricDefinitionProvider.c OSBase_MetricElementCapabilitiesProvider.c OSBase_MetricElementConformsToProfileProvider.c OSBase_MetricForMEProvider.c OSBase_MetricGathererProvider.c OSBase_MetricHostedServiceProvider.c OSBase_MetricInstanceProvider.c OSBase_MetricLifeCycleProvider.c OSBase_MetricRegisteredProfileProvider.c OSBase_MetricRepositoryServiceProvider.c OSBase_MetricServiceAffectsElementProvider.c OSBase_MetricServiceCapabilitiesProvider.c OSBase_MetricServiceProvider.c OSBase_MetricUtil.c OSBase_MetricUtil.h OSBase_MetricValueProvider.c Log Message: Fixed 3031802: add support for CIM property filters Index: OSBase_MetricRegisteredProfileProvider.c =================================================================== RCS file: /cvsroot/sblim/gather/provider/OSBase_MetricRegisteredProfileProvider.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- OSBase_MetricRegisteredProfileProvider.c 17 Jul 2009 22:15:39 -0000 1.1 +++ OSBase_MetricRegisteredProfileProvider.c 17 May 2012 01:02:42 -0000 1.2 @@ -71,7 +71,7 @@ return NULL; } -static CMPIInstance * make_inst(const CMPIObjectPath * op) +static CMPIInstance * make_inst(const CMPIObjectPath * op, const char ** props) { CMPIObjectPath * cop; CMPIInstance * ci = NULL; @@ -85,11 +85,12 @@ NULL); if (cop) { + CMAddKey(cop, "InstanceId", _INSTANCEID, CMPI_chars); ci = CMNewInstance(_broker, cop, NULL); } if (ci) { - CMSetProperty(ci, "InstanceId", _INSTANCEID, CMPI_chars); + CMSetPropertyFilter(ci, props, NULL); CMSetProperty(ci, "RegisteredOrganization", ®org, CMPI_uint16); @@ -153,7 +154,7 @@ CMPIInstance * ci = NULL; CMPIStatus rc = {CMPI_RC_OK, NULL}; - ci = make_inst(op); + ci = make_inst(op, props); if (ci) { CMReturnInstance(rslt, ci); @@ -181,7 +182,7 @@ return rc; } - ci = make_inst(op); + ci = make_inst(op, props); if (ci) { CMReturnInstance(rslt, ci); Index: OSBase_MetricInstanceProvider.c =================================================================== RCS file: /cvsroot/sblim/gather/provider/OSBase_MetricInstanceProvider.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- OSBase_MetricInstanceProvider.c 20 May 2009 19:39:56 -0000 1.9 +++ OSBase_MetricInstanceProvider.c 17 May 2012 01:02:42 -0000 1.10 @@ -41,16 +41,19 @@ * ------------------------------------------------------------------ */ static CMPIInstance * _makeRefInstance(const CMPIObjectPath *defp, - const CMPIObjectPath *valp) + const CMPIObjectPath *valp, + const char ** props) { CMPIObjectPath *co = CMNewObjectPath(_broker,NULL,LOCALCLASSNAME,NULL); CMPIInstance *ci = NULL; if (co) { CMSetNameSpaceFromObjectPath(co,defp); + CMAddKey(co,"Antecedent",&defp,CMPI_ref); + CMAddKey(co,"Dependent",&valp,CMPI_ref); + ci = CMNewInstance(_broker,co, NULL); if (ci) { - CMSetProperty(ci,"Antecedent",&defp,CMPI_ref); - CMSetProperty(ci,"Dependent",&valp,CMPI_ref); + CMSetPropertyFilter(ci, props, NULL); } } return ci; @@ -71,6 +74,7 @@ static CMPIStatus associatorHelper( const CMPIResult * rslt, const CMPIContext * ctx, const CMPIObjectPath * cop, + const char ** props, int associators, int names ) { CMPIStatus st = {CMPI_RC_OK,NULL}; @@ -121,14 +125,14 @@ ci = makeMetricValueInst( _broker, ctx, metricname, metricid, &vr.vsValues[i], vr.vsDataType, - cop, &st ); + cop, props, &st ); if (ci) { CMReturnInstance(rslt,ci); } } else if (names) { CMReturnObjectPath(rslt,_makeRefPath(cop, co)); } else { - CMReturnInstance(rslt,_makeRefInstance(cop, co)); + CMReturnInstance(rslt,_makeRefInstance(cop, co, props)); } } } @@ -153,14 +157,14 @@ CMReturnObjectPath(rslt,co); } else if (!names && associators) { ci = makeMetricDefInst( _broker, ctx, metricname, metricid, - CMGetCharPtr(namesp), &st ); + CMGetCharPtr(namesp), props, &st ); if (ci) { CMReturnInstance(rslt,ci); } } else if (names) { CMReturnObjectPath(rslt,_makeRefPath(co, cop)); } else { - CMReturnInstance(rslt,_makeRefInstance(co, cop)); + CMReturnInstance(rslt,_makeRefInstance(co, cop, props)); } } } @@ -281,7 +285,7 @@ const char * resultRole, const char ** propertyList ) { - return associatorHelper(rslt,ctx,cop,1,0); + return associatorHelper(rslt,ctx,cop,propertyList,1,0); } CMPIStatus OSBase_MetricInstanceProviderAssociatorNames( CMPIAssociationMI * mi, @@ -293,7 +297,7 @@ const char * role, const char * resultRole ) { - return associatorHelper(rslt,ctx,cop,1,1); + return associatorHelper(rslt,ctx,cop,NULL,1,1); } CMPIStatus OSBase_MetricInstanceProviderReferences( CMPIAssociationMI * mi, @@ -304,7 +308,7 @@ const char * role, const char ** propertyList ) { - return associatorHelper(rslt,ctx,cop,0,0); + return associatorHelper(rslt,ctx,cop,propertyList,0,0); } @@ -315,7 +319,7 @@ const char * assocClass, const char * role) { - return associatorHelper(rslt,ctx,cop,0,1); + return associatorHelper(rslt,ctx,cop,NULL,0,1); } /* ------------------------------------------------------------------ * Index: OSBase_MetricServiceAffectsElementProvider.c =================================================================== RCS file: /cvsroot/sblim/gather/provider/OSBase_MetricServiceAffectsElementProvider.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- OSBase_MetricServiceAffectsElementProvider.c 17 Jul 2009 22:17:18 -0000 1.2 +++ OSBase_MetricServiceAffectsElementProvider.c 17 May 2012 01:02:42 -0000 1.3 @@ -112,8 +112,9 @@ static char * _RIGHTROP = "AffectingElement"; static CMPIInstance * make_ref_inst(const CMPIObjectPath * op, - CMPIData cap, - CMPIData manelm) + CMPIData cap, + CMPIData manelm, + const char ** props) { CMPIObjectPath * cop; CMPIInstance * inst; @@ -123,11 +124,14 @@ _CLASSNAME, NULL); if (cop) { + CMAddKey(cop, _LEFTPROP, &cap.value, CMPI_ref); + CMAddKey(cop, _RIGHTROP, &manelm.value, CMPI_ref); inst = CMNewInstance(_broker, cop, NULL); - CMSetProperty(inst, _LEFTPROP, &cap.value, CMPI_ref); - CMSetProperty(inst, _RIGHTROP, &manelm.value, CMPI_ref); - - return inst; + + if (inst) { + CMSetPropertyFilter(inst, props, NULL); + return inst; + } } return NULL; @@ -188,14 +192,14 @@ _RIGHTREF, NULL); - assoc = CBEnumInstances(_broker, ctx, cop, NULL, &rc); + assoc = CBEnumInstances(_broker, ctx, cop, properties, &rc); } else if (CMClassPathIsA(_broker, op, _RIGHTREF, NULL)) { cop = CMNewObjectPath(_broker, CMGetCharPtr(CMGetNameSpace(op, NULL)), _LEFTREF, NULL); - assoc = CBEnumInstances(_broker, ctx, cop, NULL, &rc); + assoc = CBEnumInstances(_broker, ctx, cop, properties, &rc); } else { return rc; } @@ -301,7 +305,7 @@ data.state = CMPI_goodValue; data.value.ref = CMGetObjectPath(inst, NULL); - rinst = make_ref_inst(op, data, CMGetNext(service, NULL)); + rinst = make_ref_inst(op, data, CMGetNext(service, NULL), properties); if (rinst) { CMReturnInstance(rslt, rinst); @@ -324,7 +328,7 @@ data.value.ref = CMGetObjectPath(inst, NULL); while (CMHasNext(metdef, &rc)) { - rinst = make_ref_inst(op, CMGetNext(metdef, NULL), data); + rinst = make_ref_inst(op, CMGetNext(metdef, NULL), data, properties); if (rinst) { CMReturnInstance(rslt, rinst); Index: OSBase_MetricForMEProvider.c =================================================================== RCS file: /cvsroot/sblim/gather/provider/OSBase_MetricForMEProvider.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- OSBase_MetricForMEProvider.c 27 May 2010 05:50:46 -0000 1.10 +++ OSBase_MetricForMEProvider.c 17 May 2012 01:02:42 -0000 1.11 @@ -43,16 +43,19 @@ * ------------------------------------------------------------------ */ static CMPIInstance * _makeRefInstance(const CMPIObjectPath *defp, - const CMPIObjectPath *valp) + const CMPIObjectPath *valp, + const char ** props) { CMPIObjectPath *co = CMNewObjectPath(_broker,NULL,LOCALCLASSNAME,NULL); CMPIInstance *ci = NULL; if (co) { CMSetNameSpaceFromObjectPath(co,defp); + CMAddKey(co,"Antecedent",&defp,CMPI_ref); + CMAddKey(co,"Dependent",&valp,CMPI_ref); + ci = CMNewInstance(_broker,co, NULL); if (ci) { - CMSetProperty(ci,"Antecedent",&defp,CMPI_ref); - CMSetProperty(ci,"Dependent",&valp,CMPI_ref); + CMSetPropertyFilter(ci, props, NULL); } } return ci; @@ -73,6 +76,7 @@ static CMPIStatus associatorHelper( const CMPIResult * rslt, const CMPIContext * ctx, const CMPIObjectPath * cop, + const char ** props, int associators, int names ) { CMPIStatus st = {CMPI_RC_OK,NULL}; @@ -112,7 +116,7 @@ if (names && associators) { CMReturnObjectPath(rslt,co); } else if (!names && associators) { - ci = CBGetInstance(_broker,ctx,co,NULL,NULL); + ci = CBGetInstance(_broker,ctx,co,props,NULL); /* this can fail if the instance is not served by our CIM Server */ if (ci) { CMReturnInstance(rslt,ci); @@ -120,7 +124,7 @@ } else if (names) { CMReturnObjectPath(rslt,_makeRefPath(co, cop)); } else { - CMReturnInstance(rslt,_makeRefInstance(co, cop)); + CMReturnInstance(rslt,_makeRefInstance(co, cop, props)); } } } @@ -157,14 +161,14 @@ metricids[i], &vr.vsValues[j], vr.vsDataType, - cop, &st ); + cop, props, &st ); if (ci) { CMReturnInstance(rslt,ci); } } else if (names) { CMReturnObjectPath(rslt,_makeRefPath(cop, co)); } else { - CMReturnInstance(rslt,_makeRefInstance(cop, co)); + CMReturnInstance(rslt,_makeRefInstance(cop, co, props)); } } } @@ -285,7 +289,7 @@ const char * resultRole, const char ** propertyList ) { - return associatorHelper(rslt,ctx,cop,1,0); + return associatorHelper(rslt,ctx,cop,propertyList,1,0); } CMPIStatus OSBase_MetricForMEProviderAssociatorNames( CMPIAssociationMI * mi, @@ -297,7 +301,7 @@ const char * role, const char * resultRole ) { - return associatorHelper(rslt,ctx,cop,1,1); + return associatorHelper(rslt,ctx,cop,NULL,1,1); } CMPIStatus OSBase_MetricForMEProviderReferences( CMPIAssociationMI * mi, @@ -308,7 +312,7 @@ const char * role, const char ** propertyList ) { - return associatorHelper(rslt,ctx,cop,0,0); + return associatorHelper(rslt,ctx,cop,propertyList,0,0); } @@ -319,7 +323,7 @@ const char * assocClass, const char * role) { - return associatorHelper(rslt,ctx,cop,0,1); + return associatorHelper(rslt,ctx,cop,NULL,0,1); } /* ------------------------------------------------------------------ * Index: OSBase_MetricDefinitionProvider.c =================================================================== RCS file: /cvsroot/sblim/gather/provider/OSBase_MetricDefinitionProvider.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- OSBase_MetricDefinitionProvider.c 20 May 2009 19:39:56 -0000 1.9 +++ OSBase_MetricDefinitionProvider.c 17 May 2012 01:02:42 -0000 1.10 @@ -123,7 +123,7 @@ metricnums=getMetricDefsForClass(_broker,ctx,ref,&metricnames,&metricids); for (i=0; i<metricnums;i++) { ci = makeMetricDefInst(_broker,ctx,metricnames[i],metricids[i], - CMGetCharPtr(CMGetNameSpace(ref,NULL)),&rc); + CMGetCharPtr(CMGetNameSpace(ref,NULL)),properties,&rc); if (ci) { CMReturnInstance(rslt,ci); } else { @@ -158,7 +158,7 @@ if (idData.value.string && checkRepositoryConnection()) { if (parseMetricDefId(CMGetCharPtr(idData.value.string),mname,&mid) == 0) { ci=makeMetricDefInst(_broker,ctx,mname,mid, - CMGetCharPtr(CMGetNameSpace(cop,NULL)),&rc); + CMGetCharPtr(CMGetNameSpace(cop,NULL)),properties,&rc); if( ci == NULL ) { if( _debug ) { if( rc.msg != NULL ) Index: OSBase_MetricValueProvider.c =================================================================== RCS file: /cvsroot/sblim/gather/provider/OSBase_MetricValueProvider.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- OSBase_MetricValueProvider.c 20 May 2009 19:39:56 -0000 1.15 +++ OSBase_MetricValueProvider.c 17 May 2012 01:02:42 -0000 1.16 @@ -69,6 +69,7 @@ COMMHEAP *ch, const CMPIObjectPath *ref, const CMPIResult *rslt, + const char ** props, CMPIStatus *rc); /* ---------------------------------------------------------------------------*/ @@ -143,7 +144,7 @@ pnum = getPluginNamesForValueClass(_broker,ctx,ref,&pnames); for (i=0; i<pnum; i++) { rdefnum = rreposplugin_list(pnames[i],&rdef,ch); - returnInstances(_broker,ctx,rdef,rdefnum,ch,ref,rslt,&rc); + returnInstances(_broker,ctx,rdef,rdefnum,ch,ref,rslt,properties,&rc); } releasePluginNames(pnames); ch_release(ch); @@ -190,7 +191,7 @@ fprintf( stderr, "::: got %d values for id \n", vr.vsId); if (vr.vsNumValues>=1) { ci = makeMetricValueInst( _broker, ctx, vName, vId, &vr.vsValues[0], vr.vsDataType, - cop, &rc ); + cop, properties, &rc ); if( ci == NULL ) { if( _debug ) { if( rc.msg != NULL ) @@ -363,6 +364,7 @@ COMMHEAP *ch, const CMPIObjectPath *ref, const CMPIResult *rslt, + const char ** props, CMPIStatus *rc) { int i,j; @@ -383,7 +385,7 @@ for (j=0; j< vr.vsNumValues; j++) { ci = makeMetricValueInst( _broker, ctx, rdef[i].rdName, rdef[i].rdId, &vr.vsValues[j], vr.vsDataType, - ref, rc ); + ref, props, rc ); if( ci == NULL ) { if( _debug ) { if( rc->msg != NULL ) Index: OSBase_MetricElementCapabilitiesProvider.c =================================================================== RCS file: /cvsroot/sblim/gather/provider/OSBase_MetricElementCapabilitiesProvider.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- OSBase_MetricElementCapabilitiesProvider.c 16 Jul 2009 21:14:07 -0000 1.1 +++ OSBase_MetricElementCapabilitiesProvider.c 17 May 2012 01:02:42 -0000 1.2 @@ -112,22 +112,26 @@ static char * _RIGHTROP = "ManagedElement"; static CMPIInstance * make_ref_inst(const CMPIObjectPath * op, - CMPIData cap, - CMPIData manelm) + CMPIData cap, + CMPIData manelm, + const char ** props) { CMPIObjectPath * cop; CMPIInstance * inst; cop = CMNewObjectPath(_broker, - CMGetCharPtr(CMGetNameSpace(op, NULL)), - _CLASSNAME, - NULL); + CMGetCharPtr(CMGetNameSpace(op, NULL)), + _CLASSNAME, + NULL); if (cop) { + CMAddKey(cop, _LEFTPROP, &cap.value, CMPI_ref); + CMAddKey(cop, _RIGHTROP, &manelm.value, CMPI_ref); inst = CMNewInstance(_broker, cop, NULL); - CMSetProperty(inst, _LEFTPROP, &cap.value, CMPI_ref); - CMSetProperty(inst, _RIGHTROP, &manelm.value, CMPI_ref); - return inst; + if (inst) { + CMSetPropertyFilter(inst, props, NULL); + return inst; + } } return NULL; @@ -188,14 +192,14 @@ _RIGHTREF, NULL); - assoc = CBEnumInstances(_broker, ctx, cop, NULL, &rc); + assoc = CBEnumInstances(_broker, ctx, cop, properties, &rc); } else if (CMClassPathIsA(_broker, op, _RIGHTREF, NULL)) { cop = CMNewObjectPath(_broker, CMGetCharPtr(CMGetNameSpace(op, NULL)), _LEFTREF, NULL); - assoc = CBEnumInstances(_broker, ctx, cop, NULL, &rc); + assoc = CBEnumInstances(_broker, ctx, cop, properties, &rc); } else { return rc; } @@ -303,7 +307,7 @@ } if (CMHasNext(cap, &rc) && CMHasNext(manelm, &rc)) { - inst = make_ref_inst(op, CMGetNext(cap, NULL), CMGetNext(manelm, NULL)); + inst = make_ref_inst(op, CMGetNext(cap, NULL), CMGetNext(manelm, NULL), properties); if (inst) { CMReturnInstance(rslt, inst); } Index: OSBase_MetricGathererProvider.c =================================================================== RCS file: /cvsroot/sblim/gather/provider/OSBase_MetricGathererProvider.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- OSBase_MetricGathererProvider.c 22 May 2010 02:07:51 -0000 1.11 +++ OSBase_MetricGathererProvider.c 17 May 2012 01:02:42 -0000 1.12 @@ -118,13 +118,15 @@ op=CMNewObjectPath(_broker,CMGetCharPtr(CMGetNameSpace(ref,NULL)),_ClassName, NULL); if (op) { + CMAddKey(op,"CreationClassName",_ClassName,CMPI_chars); + CMAddKey(op,"Name",_Name,CMPI_chars); + CMAddKey(op,"SystemCreationClassName",CSCreationClassName,CMPI_chars); + CMAddKey(op,"SystemName",get_system_name(),CMPI_chars); + ci=CMNewInstance(_broker,op,NULL); } if (ci) { - CMSetProperty(ci,"CreationClassName",_ClassName,CMPI_chars); - CMSetProperty(ci,"Name",_Name,CMPI_chars); - CMSetProperty(ci,"SystemCreationClassName",CSCreationClassName,CMPI_chars); - CMSetProperty(ci,"SystemName",get_system_name(),CMPI_chars); + CMSetPropertyFilter(ci, properties, NULL); CMSetProperty(ci,"Release",PACKAGE_VERSION,CMPI_chars); @@ -175,13 +177,15 @@ op=CMNewObjectPath(_broker,CMGetCharPtr(CMGetNameSpace(ref,NULL)),_ClassName, NULL); if (op) { + CMAddKey(op,"CreationClassName",_ClassName,CMPI_chars); + CMAddKey(op,"Name",_Name,CMPI_chars); + CMAddKey(op,"SystemCreationClassName",CSCreationClassName,CMPI_chars); + CMAddKey(op,"SystemName",get_system_name(),CMPI_chars); + ci=CMNewInstance(_broker,op,NULL); } if (ci) { - CMSetProperty(ci,"CreationClassName",_ClassName,CMPI_chars); - CMSetProperty(ci,"Name",_Name,CMPI_chars); - CMSetProperty(ci,"SystemCreationClassName",CSCreationClassName,CMPI_chars); - CMSetProperty(ci,"SystemName",get_system_name(),CMPI_chars); + CMSetPropertyFilter(ci, properties, NULL); CMSetProperty(ci,"Release",PACKAGE_VERSION,CMPI_chars); Index: OSBase_MetricRepositoryServiceProvider.c =================================================================== RCS file: /cvsroot/sblim/gather/provider/OSBase_MetricRepositoryServiceProvider.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- OSBase_MetricRepositoryServiceProvider.c 22 May 2010 02:07:51 -0000 1.11 +++ OSBase_MetricRepositoryServiceProvider.c 17 May 2012 01:02:42 -0000 1.12 @@ -120,14 +120,15 @@ op=CMNewObjectPath(_broker,CMGetCharPtr(CMGetNameSpace(ref,NULL)),_ClassName, NULL); if (op) { + CMAddKey(op,"CreationClassName",_ClassName,CMPI_chars); + CMAddKey(op,"Name",_Name,CMPI_chars); + CMAddKey(op,"SystemCreationClassName",CSCreationClassName,CMPI_chars); + CMAddKey(op,"SystemName",get_system_name(),CMPI_chars); + ci=CMNewInstance(_broker,op,NULL); } if (ci) { - CMSetProperty(ci,"CreationClassName",_ClassName,CMPI_chars); - CMSetProperty(ci,"Name",_Name,CMPI_chars); - CMSetProperty(ci,"SystemCreationClassName",CSCreationClassName,CMPI_chars); - CMSetProperty(ci,"SystemName",get_system_name(),CMPI_chars); - + CMSetPropertyFilter(ci, properties, NULL); CMSetProperty(ci,"Release",PACKAGE_VERSION,CMPI_chars); if (rrepos_status(&rs)) { @@ -182,13 +183,15 @@ op=CMNewObjectPath(_broker,CMGetCharPtr(CMGetNameSpace(ref,NULL)),_ClassName, NULL); if (op) { + CMAddKey(op,"CreationClassName",_ClassName,CMPI_chars); + CMAddKey(op,"Name",_Name,CMPI_chars); + CMAddKey(op,"SystemCreationClassName",CSCreationClassName,CMPI_chars); + CMAddKey(op,"SystemName",get_system_name(),CMPI_chars); + ci=CMNewInstance(_broker,op,NULL); } if (ci) { - CMSetProperty(ci,"CreationClassName",_ClassName,CMPI_chars); - CMSetProperty(ci,"Name",_Name,CMPI_chars); - CMSetProperty(ci,"SystemCreationClassName",CSCreationClassName,CMPI_chars); - CMSetProperty(ci,"SystemName",get_system_name(),CMPI_chars); + CMSetPropertyFilter(ci, properties, NULL); CMSetProperty(ci,"Release",PACKAGE_VERSION,CMPI_chars); Index: OSBase_MetricUtil.h =================================================================== RCS file: /cvsroot/sblim/gather/provider/OSBase_MetricUtil.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- OSBase_MetricUtil.h 20 May 2009 19:39:56 -0000 1.11 +++ OSBase_MetricUtil.h 17 May 2012 01:02:42 -0000 1.12 @@ -87,6 +87,7 @@ const ValueItem *val, unsigned datatype, const CMPIObjectPath *cop, + const char ** props, CMPIStatus * rc); CMPIObjectPath * makeMetricValuePath(const CMPIBroker * broker, const CMPIContext * ctx, @@ -107,6 +108,7 @@ const char * defname, int defid, const char * namesp, + const char ** props, CMPIStatus * rc); CMPIObjectPath * makeResourcePath(const CMPIBroker * broker, Index: OSBase_MetricLifeCycleProvider.c =================================================================== RCS file: /cvsroot/sblim/gather/provider/OSBase_MetricLifeCycleProvider.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- OSBase_MetricLifeCycleProvider.c 20 May 2009 19:39:56 -0000 1.3 +++ OSBase_MetricLifeCycleProvider.c 17 May 2012 01:02:42 -0000 1.4 @@ -491,7 +491,7 @@ parseMetricDefId(mdefId,mName,&mId); mvci = makeMetricValueInst(_broker, ctx, mName, mId, vr->vsValues, - vr->vsDataType, co, NULL); + vr->vsDataType, co, NULL, NULL); if (mvci) { CMSetProperty(ci,"SourceInstance",&mvci,CMPI_instance); if (_debug) Index: OSBase_MetricHostedServiceProvider.c =================================================================== RCS file: /cvsroot/sblim/gather/provider/OSBase_MetricHostedServiceProvider.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- OSBase_MetricHostedServiceProvider.c 16 Jul 2009 21:14:07 -0000 1.1 +++ OSBase_MetricHostedServiceProvider.c 17 May 2012 01:02:42 -0000 1.2 @@ -112,8 +112,9 @@ static char * _RIGHTROP = "Dependent"; static CMPIInstance * make_ref_inst(const CMPIObjectPath * op, - CMPIData cap, - CMPIData manelm) + CMPIData cap, + CMPIData manelm, + const char ** props) { CMPIObjectPath * cop; CMPIInstance * inst; @@ -123,11 +124,14 @@ _CLASSNAME, NULL); if (cop) { + CMAddKey(cop, _LEFTPROP, &cap.value, CMPI_ref); + CMAddKey(cop, _RIGHTROP, &manelm.value, CMPI_ref); inst = CMNewInstance(_broker, cop, NULL); - CMSetProperty(inst, _LEFTPROP, &cap.value, CMPI_ref); - CMSetProperty(inst, _RIGHTROP, &manelm.value, CMPI_ref); - return inst; + if (inst) { + CMSetPropertyFilter(inst, props, NULL); + return inst; + } } return NULL; @@ -188,14 +192,14 @@ _RIGHTREF, NULL); - assoc = CBEnumInstances(_broker, ctx, cop, NULL, &rc); + assoc = CBEnumInstances(_broker, ctx, cop, properties, &rc); } else if (CMClassPathIsA(_broker, op, _RIGHTREF, NULL)) { cop = CMNewObjectPath(_broker, CMGetCharPtr(CMGetNameSpace(op, NULL)), _LEFTREF, NULL); - assoc = CBEnumInstances(_broker, ctx, cop, NULL, &rc); + assoc = CBEnumInstances(_broker, ctx, cop, properties, &rc); } else { return rc; } @@ -303,7 +307,7 @@ } if (CMHasNext(cap, &rc) && CMHasNext(manelm, &rc)) { - inst = make_ref_inst(op, CMGetNext(cap, NULL), CMGetNext(manelm, NULL)); + inst = make_ref_inst(op, CMGetNext(cap, NULL), CMGetNext(manelm, NULL), properties); if (inst) { CMReturnInstance(rslt, inst); } Index: OSBase_MetricDefForMEProvider.c =================================================================== RCS file: /cvsroot/sblim/gather/provider/OSBase_MetricDefForMEProvider.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- OSBase_MetricDefForMEProvider.c 20 May 2009 19:39:56 -0000 1.6 +++ OSBase_MetricDefForMEProvider.c 17 May 2012 01:02:42 -0000 1.7 @@ -40,16 +40,19 @@ * ------------------------------------------------------------------ */ static CMPIInstance * _makeRefInstance(const CMPIObjectPath *defp, - const CMPIObjectPath *valp) + const CMPIObjectPath *valp, + const char ** props) { CMPIObjectPath *co = CMNewObjectPath(_broker,NULL,LOCALCLASSNAME,NULL); CMPIInstance *ci = NULL; if (co) { CMSetNameSpaceFromObjectPath(co,defp); + CMAddKey(co,"Antecedent",&defp,CMPI_ref); + CMAddKey(co,"Dependent",&valp,CMPI_ref); + ci = CMNewInstance(_broker,co, NULL); if (ci) { - CMSetProperty(ci,"Antecedent",&defp,CMPI_ref); - CMSetProperty(ci,"Dependent",&valp,CMPI_ref); + CMSetPropertyFilter(ci, props, NULL); } } return ci; @@ -70,6 +73,7 @@ static CMPIStatus associatorHelper( const CMPIResult * rslt, const CMPIContext * ctx, const CMPIObjectPath * cop, + const char **props, int associators, int names ) { CMPIStatus st = {CMPI_RC_OK,NULL}; @@ -124,7 +128,7 @@ } else if (names) { CMReturnObjectPath(rslt,_makeRefPath(co, cop)); } else { - CMReturnInstance(rslt,_makeRefInstance(co, cop)); + CMReturnInstance(rslt,_makeRefInstance(co, cop, props)); } } } @@ -154,6 +158,7 @@ metricnames[i], metricids[i], CMGetCharPtr(namesp), + props, &st ); if (ci) { CMReturnInstance(rslt,ci); @@ -161,7 +166,7 @@ } else if (names) { CMReturnObjectPath(rslt,_makeRefPath(cop, co)); } else { - CMReturnInstance(rslt,_makeRefInstance(cop, co)); + CMReturnInstance(rslt,_makeRefInstance(cop, co, props)); } } releaseMetricIds(metricnames,metricids,resources,systems); @@ -278,7 +283,7 @@ const char * resultRole, const char ** propertyList ) { - return associatorHelper(rslt,ctx,cop,1,0); + return associatorHelper(rslt,ctx,cop,propertyList,1,0); } CMPIStatus OSBase_MetricDefForMEProviderAssociatorNames( CMPIAssociationMI * mi, @@ -290,7 +295,7 @@ const char * role, const char * resultRole ) { - return associatorHelper(rslt,ctx,cop,1,1); + return associatorHelper(rslt,ctx,cop,NULL,1,1); } CMPIStatus OSBase_MetricDefForMEProviderReferences( CMPIAssociationMI * mi, @@ -301,7 +306,7 @@ const char * role, const char ** propertyList ) { - return associatorHelper(rslt,ctx,cop,0,0); + return associatorHelper(rslt,ctx,cop,propertyList,0,0); } @@ -312,7 +317,7 @@ const char * assocClass, const char * role) { - return associatorHelper(rslt,ctx,cop,0,1); + return associatorHelper(rslt,ctx,cop,NULL,0,1); } /* ------------------------------------------------------------------ * Index: OSBase_MetricElementConformsToProfileProvider.c =================================================================== RCS file: /cvsroot/sblim/gather/provider/OSBase_MetricElementConformsToProfileProvider.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- OSBase_MetricElementConformsToProfileProvider.c 17 Jul 2009 22:15:39 -0000 1.1 +++ OSBase_MetricElementConformsToProfileProvider.c 17 May 2012 01:02:42 -0000 1.2 @@ -115,22 +115,26 @@ static char * _CIMV2 = "root/cimv2"; static CMPIInstance * make_ref_inst(const CMPIObjectPath * op, - CMPIData cap, - CMPIData manelm) + CMPIData cap, + CMPIData manelm, + const char ** props) { CMPIObjectPath * cop; CMPIInstance * inst; cop = CMNewObjectPath(_broker, - CMGetCharPtr(CMGetNameSpace(op, NULL)), - _CLASSNAME, - NULL); + CMGetCharPtr(CMGetNameSpace(op, NULL)), + _CLASSNAME, + NULL); if (cop) { + CMAddKey(cop, _LEFTPROP, &cap.value, CMPI_ref); + CMAddKey(cop, _RIGHTROP, &manelm.value, CMPI_ref); inst = CMNewInstance(_broker, cop, NULL); - CMSetProperty(inst, _LEFTPROP, &cap.value, CMPI_ref); - CMSetProperty(inst, _RIGHTROP, &manelm.value, CMPI_ref); - return inst; + if (inst) { + CMSetPropertyFilter(inst, props, NULL); + return inst; + } } return NULL; @@ -191,14 +195,14 @@ _RIGHTREF, NULL); - assoc = CBEnumInstances(_broker, ctx, cop, NULL, &rc); + assoc = CBEnumInstances(_broker, ctx, cop, properties, &rc); } else if (CMClassPathIsA(_broker, op, _RIGHTREF, NULL)) { cop = CMNewObjectPath(_broker, _INTEROP, _LEFTREF, NULL); - assoc = CBEnumInstances(_broker, ctx, cop, NULL, &rc); + assoc = CBEnumInstances(_broker, ctx, cop, properties, &rc); } else { return rc; } @@ -303,11 +307,11 @@ if (CMHasNext(manelm, &rc)) { enumdata = CMGetNext(manelm, NULL); - rinst = make_ref_inst(op, instdata, enumdata); + rinst = make_ref_inst(op, instdata, enumdata, properties); if (rinst) { CMReturnInstance(rslt, rinst); } - rinst = make_ref_inst(cop, instdata, enumdata); + rinst = make_ref_inst(cop, instdata, enumdata, properties); if (rinst) { CMReturnInstance(rslt, rinst); } @@ -326,11 +330,11 @@ if (CMHasNext(profile, &rc)) { enumdata = CMGetNext(profile, NULL); - rinst = make_ref_inst(op, enumdata, instdata); + rinst = make_ref_inst(op, enumdata, instdata, properties); if (rinst) { CMReturnInstance(rslt, rinst); } - rinst = make_ref_inst(cop, enumdata, instdata); + rinst = make_ref_inst(cop, enumdata, instdata, properties); if (rinst) { CMReturnInstance(rslt, rinst); } Index: OSBase_MetricUtil.c =================================================================== RCS file: /cvsroot/sblim/gather/provider/OSBase_MetricUtil.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- OSBase_MetricUtil.c 20 May 2009 19:39:56 -0000 1.19 +++ OSBase_MetricUtil.c 17 May 2012 01:02:42 -0000 1.20 @@ -853,6 +853,7 @@ const ValueItem *val, unsigned datatype, const CMPIObjectPath *cop, + const char ** props, CMPIStatus * rc) { CMPIObjectPath * co; @@ -871,15 +872,18 @@ co = CMNewObjectPath(broker,namesp,valclsname,rc); if (co) { + CMAddKey(co,"InstanceId", + makeMetricValueId(instid,defname,defid,val->viResource, + val->viSystemId, + val->viCaptureTime), + CMPI_chars); + CMAddKey(co,"MetricDefinitionId",makeMetricDefId(defidstr,defname,defid), + CMPI_chars); ci = CMNewInstance(broker,co,rc); - if (ci) { - CMSetProperty(ci,"InstanceId", - makeMetricValueId(instid,defname,defid,val->viResource, - val->viSystemId, - val->viCaptureTime), - CMPI_chars); - CMSetProperty(ci,"MetricDefinitionId",makeMetricDefId(defidstr,defname,defid), - CMPI_chars); + + if (ci) { + CMSetPropertyFilter(ci, props, NULL); + CMSetProperty(ci,"MeasuredElementName",val->viResource,CMPI_chars); datetime = CMNewDateTimeFromBinary(broker, @@ -1008,6 +1012,7 @@ const char * defname, int defid, const char *namesp, + const char **props, CMPIStatus * rc) { CMPIObjectPath * co; @@ -1024,11 +1029,13 @@ /* get plugin's metric definition */ if (co) { + CMAddKey(co,"Id", + makeMetricDefId(instid,defname,defid), + CMPI_chars); ci = CMNewInstance(broker,co,rc); if (ci) { - CMSetProperty(ci,"Id", - makeMetricDefId(instid,defname,defid), - CMPI_chars); + CMSetPropertyFilter(ci, props, NULL); + CMSetProperty(ci,"Name",defname,CMPI_chars); /* DataType */ for (dt=0;dt<sizeof(typetable)/sizeof(int);dt++) { Index: OSBase_MetricServiceProvider.c =================================================================== RCS file: /cvsroot/sblim/gather/provider/OSBase_MetricServiceProvider.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- OSBase_MetricServiceProvider.c 22 May 2010 02:07:51 -0000 1.3 +++ OSBase_MetricServiceProvider.c 17 May 2012 01:02:42 -0000 1.4 @@ -33,16 +33,16 @@ const CMPIBroker * _broker; enum METHOD_RETURN { - METHOD_SUCCESS = 0, - METHOD_NOT_SUPPORTED = 1, - METHOD_FAILED = 2, + METHOD_SUCCESS = 0, + METHOD_NOT_SUPPORTED = 1, + METHOD_FAILED = 2, }; #define NUMKEYS 4 struct keypair { - const char * key; - const char * value; + const char * key; + const char * value; }; static struct keypair keys[4]; @@ -53,84 +53,85 @@ static void init_keys() { - keys[0] = (struct keypair) { "CreationClassName", _CLASSNAME }; - keys[1] = (struct keypair) { "Name", _NAME }; - keys[2] = (struct keypair) { "SystemCreationClassName", CSCreationClassName }; - keys[3] = (struct keypair) { "SystemName", get_system_name() }; - - return; + keys[0] = (struct keypair) { "CreationClassName", _CLASSNAME }; + keys[1] = (struct keypair) { "Name", _NAME }; + keys[2] = (struct keypair) { "SystemCreationClassName", CSCreationClassName }; + keys[3] = (struct keypair) { "SystemName", get_system_name() }; + + return; } static void check_keys(const CMPIObjectPath * op, CMPIStatus * rc) { - CMPIString * key; - int i; - - for (i = 0; i < NUMKEYS; i++) { - key = CMGetKey(op, keys[i].key, rc).value.string; - - if (rc->rc != CMPI_RC_OK) { - return; - } else if ( key == NULL) { - CMSetStatusWithChars(_broker, rc, CMPI_RC_ERR_FAILED, - "NULL key value"); - } - - if (strcasecmp(CMGetCharPtr(key), keys[i].value) != 0) { - CMSetStatusWithChars(_broker, rc, CMPI_RC_ERR_NOT_FOUND, - "The requested instance doesn't exist"); - return; - } - } - - return; + CMPIString * key; + int i; + + for (i = 0; i < NUMKEYS; i++) { + key = CMGetKey(op, keys[i].key, rc).value.string; + + if (rc->rc != CMPI_RC_OK) { + return; + } else if ( key == NULL) { + CMSetStatusWithChars(_broker, rc, CMPI_RC_ERR_FAILED, + "NULL key value"); + } + + if (strcasecmp(CMGetCharPtr(key), keys[i].value) != 0) { + CMSetStatusWithChars(_broker, rc, CMPI_RC_ERR_NOT_FOUND, + "The requested instance doesn't exist"); + return; + } + } + + return; } static CMPIObjectPath * make_path(const CMPIObjectPath * op) { - CMPIObjectPath * cop; - int i; - - cop = CMNewObjectPath(_broker, - CMGetCharPtr(CMGetNameSpace(op, NULL)), - _CLASSNAME, - NULL); - - if (cop) { - for (i = 0; i < NUMKEYS; i++) { - CMAddKey(cop, keys[i].key, keys[i].value, CMPI_chars); - } - return cop; - } + CMPIObjectPath * cop; + int i; + + cop = CMNewObjectPath(_broker, + CMGetCharPtr(CMGetNameSpace(op, NULL)), + _CLASSNAME, + NULL); - return NULL; + if (cop) { + for (i = 0; i < NUMKEYS; i++) { + CMAddKey(cop, keys[i].key, keys[i].value, CMPI_chars); + } + return cop; + } + + return NULL; } -static CMPIInstance * make_inst(const CMPIObjectPath * op) +static CMPIInstance * make_inst(const CMPIObjectPath * op, const char **props) { - CMPIObjectPath * cop; - CMPIInstance * ci = NULL; - int i; - - cop = CMNewObjectPath(_broker, - CMGetCharPtr(CMGetNameSpace(op, NULL)), - _CLASSNAME, - NULL); - - if (cop) { - ci = CMNewInstance(_broker, cop, NULL); - } - - if (ci) { - for (i = 0; i < NUMKEYS; i++) { - CMSetProperty(ci, keys[i].key, keys[i].value, CMPI_chars); - } - CMSetProperty(ci, "ElementName", _CLASSNAME, CMPI_chars); + CMPIObjectPath * cop; + CMPIInstance * ci = NULL; + int i; + + cop = CMNewObjectPath(_broker, + CMGetCharPtr(CMGetNameSpace(op, NULL)), + _CLASSNAME, + NULL); + + if (cop) { + for (i = 0; i < NUMKEYS; i++) { + CMAddKey(cop, keys[i].key, keys[i].value, CMPI_chars); + } + ci = CMNewInstance(_broker, cop, NULL); + } + + if (ci) { + CMSetPropertyFilter(ci, props, NULL); + CMSetProperty(ci, "ElementName", _CLASSNAME, CMPI_chars); CMSetProperty(ci, "Release", PACKAGE_VERSION, CMPI_chars); - return ci; - } - - return NULL; + return ci; + } + + return NULL; } static CMPIStatus Cleanup(CMPIInstanceMI * mi, @@ -170,14 +171,14 @@ CMPIInstance * ci = NULL; CMPIStatus rc = {CMPI_RC_OK, NULL}; - ci = make_inst(op); - - if (ci) { - CMReturnInstance(rslt, ci); - } else { - CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_FAILED, - "Couldn't build instance"); - } + ci = make_inst(op, props); + + if (ci) { + CMReturnInstance(rslt, ci); + } else { + CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_FAILED, + "Couldn't build instance"); + } CMReturnDone(rslt); return rc; @@ -192,19 +193,19 @@ CMPIInstance * ci = NULL; CMPIStatus rc = {CMPI_RC_OK, NULL}; - check_keys(op, &rc); - - if (rc.rc != CMPI_RC_OK) { - return rc; - } + check_keys(op, &rc); + + if (rc.rc != CMPI_RC_OK) { + return rc; + } + + ci = make_inst(op, props); - ci = make_inst(op); - if (ci) { CMReturnInstance(rslt, ci); } else { CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_FAILED, - "Couldn't build instance"); + "Couldn't build instance"); } CMReturnDone(rslt); @@ -265,54 +266,54 @@ const CMPIArgs * in, CMPIArgs * out) { - CMPIStatus rc = {CMPI_RC_OK, NULL}; - CMPIValue valrc; + CMPIStatus rc = {CMPI_RC_OK, NULL}; + CMPIValue valrc; - check_keys(op, &rc); - - if (rc.rc != CMPI_RC_OK) { - return rc; - } + check_keys(op, &rc); + + if (rc.rc != CMPI_RC_OK) { + return rc; + } - if (strcasecmp(method, "ShowMetrics") == 0) { - valrc.uint32 = METHOD_NOT_SUPPORTED; - CMReturnData(rslt, &valrc, CMPI_uint32); - CMReturnDone(rslt); - } else if (strcasecmp(method, "ShowMetricsByClass") == 0) { - valrc.uint32 = METHOD_NOT_SUPPORTED; - CMReturnData(rslt, &valrc, CMPI_uint32); - CMReturnDone(rslt); - } else if (strcasecmp(method, "ControlMetrics") == 0) { - valrc.uint32 = METHOD_NOT_SUPPORTED; - CMReturnData(rslt, &valrc, CMPI_uint32); - CMReturnDone(rslt); - } else if (strcasecmp(method, "ControlMetricsByClass") == 0) { - valrc.uint32 = METHOD_NOT_SUPPORTED; - CMReturnData(rslt, &valrc, CMPI_uint32); - CMReturnDone(rslt); - } else if (strcasecmp(method, "GetMetricValues") == 0) { - valrc.uint32 = METHOD_NOT_SUPPORTED; - CMReturnData(rslt, &valrc, CMPI_uint32); - CMReturnDone(rslt); - } else if (strcasecmp(method, "StartService") == 0) { - valrc.uint32 = METHOD_NOT_SUPPORTED; - CMReturnData(rslt, &valrc, CMPI_uint32); - CMReturnDone(rslt); - } else if (strcasecmp(method, "StopService") == 0) { - valrc.uint32 = METHOD_NOT_SUPPORTED; - CMReturnData(rslt, &valrc, CMPI_uint32); - CMReturnDone(rslt); - } else if (strcasecmp(method, "ChangeAffectedElementsAssignedSequence") == 0) { - valrc.uint32 = METHOD_NOT_SUPPORTED; - CMReturnData(rslt, &valrc, CMPI_uint32); - CMReturnDone(rslt); - } else if (strcasecmp(method, "RequestStateChange") == 0) { - valrc.uint32 = METHOD_NOT_SUPPORTED; - CMReturnData(rslt, &valrc, CMPI_uint32); - CMReturnDone(rslt); - } else { - CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_METHOD_NOT_FOUND, method); - } + if (strcasecmp(method, "ShowMetrics") == 0) { + valrc.uint32 = METHOD_NOT_SUPPORTED; + CMReturnData(rslt, &valrc, CMPI_uint32); + CMReturnDone(rslt); + } else if (strcasecmp(method, "ShowMetricsByClass") == 0) { + valrc.uint32 = METHOD_NOT_SUPPORTED; + CMReturnData(rslt, &valrc, CMPI_uint32); + CMReturnDone(rslt); + } else if (strcasecmp(method, "ControlMetrics") == 0) { + valrc.uint32 = METHOD_NOT_SUPPORTED; + CMReturnData(rslt, &valrc, CMPI_uint32); + CMReturnDone(rslt); + } else if (strcasecmp(method, "ControlMetricsByClass") == 0) { + valrc.uint32 = METHOD_NOT_SUPPORTED; + CMReturnData(rslt, &valrc, CMPI_uint32); + CMReturnDone(rslt); + } else if (strcasecmp(method, "GetMetricValues") == 0) { + valrc.uint32 = METHOD_NOT_SUPPORTED; + CMReturnData(rslt, &valrc, CMPI_uint32); + CMReturnDone(rslt); + } else if (strcasecmp(method, "StartService") == 0) { + valrc.uint32 = METHOD_NOT_SUPPORTED; + CMReturnData(rslt, &valrc, CMPI_uint32); + CMReturnDone(rslt); + } else if (strcasecmp(method, "StopService") == 0) { + valrc.uint32 = METHOD_NOT_SUPPORTED; + CMReturnData(rslt, &valrc, CMPI_uint32); + CMReturnDone(rslt); + } else if (strcasecmp(method, "ChangeAffectedElementsAssignedSequence") == 0) { + valrc.uint32 = METHOD_NOT_SUPPORTED; + CMReturnData(rslt, &valrc, CMPI_uint32); + CMReturnDone(rslt); + } else if (strcasecmp(method, "RequestStateChange") == 0) { + valrc.uint32 = METHOD_NOT_SUPPORTED; + CMReturnData(rslt, &valrc, CMPI_uint32); + CMReturnDone(rslt); + } else { + CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_METHOD_NOT_FOUND, method); + } return rc; } Index: OSBase_MetricServiceCapabilitiesProvider.c =================================================================== RCS file: /cvsroot/sblim/gather/provider/OSBase_MetricServiceCapabilitiesProvider.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- OSBase_MetricServiceCapabilitiesProvider.c 11 May 2011 01:23:53 -0000 1.2 +++ OSBase_MetricServiceCapabilitiesProvider.c 17 May 2012 01:02:42 -0000 1.3 @@ -68,7 +68,7 @@ return NULL; } -static CMPIInstance * make_inst(const CMPIObjectPath * op) +static CMPIInstance * make_inst(const CMPIObjectPath * op, const char **props) { CMPIObjectPath * cop; CMPIInstance * ci = NULL; @@ -76,16 +76,17 @@ CMPIArray * array_string = NULL; cop = CMNewObjectPath(_broker, - CMGetCharPtr(CMGetNameSpace(op, NULL)), - _CLASSNAME, - NULL); + CMGetCharPtr(CMGetNameSpace(op, NULL)), + _CLASSNAME, + NULL); if (cop) { - ci = CMNewInstance(_broker, cop, NULL); + CMAddKey(cop, "InstanceID", _INSTANCEID, CMPI_chars); + ci = CMNewInstance(_broker, cop, NULL); } if (ci) { - CMSetProperty(ci, "InstanceID", _INSTANCEID, CMPI_chars); + CMSetPropertyFilter(ci, props, NULL); CMSetProperty(ci, "ElementName", _CLASSNAME, CMPI_chars); array_string = CMNewArray(_broker, 0, CMPI_string, NULL); @@ -143,7 +144,7 @@ CMPIInstance * ci; CMPIStatus rc = {CMPI_RC_OK, NULL}; - ci = make_inst(op); + ci = make_inst(op, props); if (ci) { CMReturnInstance(rslt, ci); @@ -171,7 +172,7 @@ return rc; } - ci = make_inst(op); + ci = make_inst(op, props); if (ci) { CMReturnInstance(rslt, ci); |
From: Chris B. <buc...@us...> - 2012-05-16 18:48: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 93cfecefeae968e8ffafb80aea1f8e885f934573 (commit) from ee5dac7462c8b026e62f197ddcb53a89b8177ced (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 93cfecefeae968e8ffafb80aea1f8e885f934573 Author: buccella <buc...@li...> Date: Wed May 16 14:48:41 2012 -0400 [ 2966659 ] Cleanup https daemon remnants ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 410a2e3..7cc6870 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-05-16 Chris Buccella <buc...@li...> + + * control.c, msgqueue.c, msgqueue.h, sfcBroker.c: + [ 2966659 ] Cleanup https daemon remnants + 2012-05-14 Chris Buccella <buc...@li...> * indCIMXMLHandler.c, instance.c, internalProvider.c, queryOperation.h, diff --git a/NEWS b/NEWS index ef43ca7..9879903 100644 --- a/NEWS +++ b/NEWS @@ -63,6 +63,8 @@ New features: Bugs fixed: +- 2966659 Cleanup https daemon remnants + Everything in 1.3.10, plus: - 3130727 CMPIPropertyMIFT.setProperty() missing objectpath keys diff --git a/control.c b/control.c index ab20a3a..d394a3c 100644 --- a/control.c +++ b/control.c @@ -65,7 +65,6 @@ Control init[] = { {"httpProcs", 1, "8"}, {"httpsPort", 1, "5989"}, {"enableHttps", 2, "false"}, - {"httpsProcs", 1, "8"}, {"httpLocalOnly", 2, "false"}, {"httpUserSFCB", 2, "true"}, {"httpUser", 0, ""}, diff --git a/msgqueue.c b/msgqueue.c index 0ab0ee0..53ba7ac 100644 --- a/msgqueue.c +++ b/msgqueue.c @@ -44,8 +44,7 @@ ComSockets *sPairs; int ptBase, htBase, stBase, - htMax, - stMax; + htMax; int currentProc = 0; int noProvPause = 0; char *provPauseStr = NULL; @@ -123,7 +122,7 @@ semSetValue(int semid, int semnum, int value) } int -initSem(int https, int shttps, int provs) +initSem(int https, int provs) { union semun sun; int i; @@ -150,10 +149,6 @@ initSem(int https, int shttps, int provs) semctl(sfcbSem, HTTP_GUARD_ID, SETVAL, sun); sun.val = https; semctl(sfcbSem, HTTP_PROCS_ID, SETVAL, sun); - sun.val = 1; - semctl(sfcbSem, SHTTP_GUARD_ID, SETVAL, sun); - sun.val = shttps; - semctl(sfcbSem, SHTTP_PROCS_ID, SETVAL, sun); for (i = 0; i < provs; i++) { sun.val = 1; @@ -635,10 +630,10 @@ spSendCtlResult(int *to, int *from, short code, unsigned long count, } void -initSocketPairs(int provs, int https, int shttps) +initSocketPairs(int provs, int https) { int i, - t = (provs * 2); // +https+shttps; + t = (provs * 2); // +https; sPairs = (ComSockets *) malloc(sizeof(ComSockets) * t); mlogf(M_INFO, M_SHOW, "--- initSocketPairs: %d\n", t); @@ -647,9 +642,7 @@ initSocketPairs(int provs, int https, int shttps) } ptBase = provs; htBase = ptBase + provs; - stBase = htBase + https; htMax = https; - stMax = shttps; } void diff --git a/msgqueue.h b/msgqueue.h index 0949d30..869cbcb 100644 --- a/msgqueue.h +++ b/msgqueue.h @@ -139,7 +139,7 @@ extern int spSendResult(int *to, int *from, void *data, unsigned long size); extern unsigned long getInode(int fd); -extern void initSocketPairs(int provs, int https, int shttps); +extern void initSocketPairs(int provs, int https); extern int semAcquireUnDo(int semid, int semnum); extern int semAcquire(int semid, int semnum); @@ -148,7 +148,7 @@ extern int semReleaseUnDo(int semid, int semnum); extern int semMultiRelease(int semid, int semnum, int n); extern int semGetValue(int semid, int semnum); extern int semSetValue(int semid, int semnum, int value); -extern int initSem(int https, int shttps, int provs); +extern int initSem(int https, int provs); extern int provProcSem; extern int provWorkSem; @@ -168,13 +168,12 @@ extern char *httpPauseStr; */ #define HTTP_GUARD_ID 0 #define HTTP_PROCS_ID 1 -#define SHTTP_GUARD_ID 2 -#define SHTTP_PROCS_ID 3 + /* * PROV_PROC_BASE_ID must be updated if the number of id's in the above * block changes. */ -#define PROV_PROC_BASE_ID 4 +#define PROV_PROC_BASE_ID 2 /* * constants for calculating per process ids @@ -198,9 +197,7 @@ extern char *httpPauseStr; extern ComSockets *sPairs; extern int ptBase, htBase, - stBase, - htMax, - stMax; + htMax; extern void stopLocalConnectServer(); extern void localConnectServer(); diff --git a/sfcBroker.c b/sfcBroker.c index e4789e7..77951d0 100644 --- a/sfcBroker.c +++ b/sfcBroker.c @@ -603,7 +603,6 @@ main(int argc, char *argv[]) httpLocalOnly = 0; int syslogLevel = LOG_ERR; long dSockets, - sSockets, pSockets; char *pauseStr; @@ -818,8 +817,6 @@ main(int argc, char *argv[]) if (getControlNum("httpProcs", (long *) &dSockets)) dSockets = 10; - if (getControlNum("httpsProcs", (long *) &sSockets)) - sSockets = 10; if (getControlNum("provProcs", (long *) &pSockets)) pSockets = 16; @@ -868,10 +865,10 @@ main(int argc, char *argv[]) startHttp = 1; } - initSem(dSockets, sSockets, pSockets); + initSem(dSockets, pSockets); initProvProcCtl(pSockets); init_sfcBroker(); - initSocketPairs(pSockets, dSockets, sSockets); + initSocketPairs(pSockets, dSockets); setSignal(SIGQUIT, handleSigquit, 0); setSignal(SIGINT, handleSigquit, 0); hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Michael Chase-S. <mc...@us...> - 2012-05-16 16:12:40
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv6015 Modified Files: ChangeLog control.h indCIMXMLHandler.c interopProvider.c Log Message: [ 3513390 ] Enforce LD and subscription limits Use hashtable instead of EI Index: control.h =================================================================== RCS file: /cvsroot/sblim/sfcb/control.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- control.h 24 Jun 2011 20:13:20 -0000 1.5 +++ control.h 16 May 2012 16:12:37 -0000 1.6 @@ -28,5 +28,6 @@ int getControlNum(char *id, long *val); int getControlBool(char *id, int *val); const char * sfcBrokerStart; +static int LDcount=0; #endif Index: indCIMXMLHandler.c =================================================================== RCS file: /cvsroot/sblim/sfcb/indCIMXMLHandler.c,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- indCIMXMLHandler.c 11 May 2012 20:05:11 -0000 1.50 +++ indCIMXMLHandler.c 16 May 2012 16:12:37 -0000 1.51 @@ -50,7 +50,6 @@ extern void memLinkObjectPath(CMPIObjectPath *op); static const CMPIBroker *_broker; -static int LDcount=-1; static int interOpNameSpace(const CMPIObjectPath *cop, CMPIStatus *st) { @@ -879,49 +878,11 @@ _SFCB_RETURN(0); } -int countLD (const CMPIContext * ctx) { - _SFCB_ENTER(TRACE_INDPROVIDER, "countLD"); - CMPIEnumeration *enm; - CMPIStatus st = { CMPI_RC_OK, NULL }; - LDcount++; // Mark it initialized - - // Enumerate the destinations - CMPIContext * ctxLocal = prepareUpcall((CMPIContext *)ctx); - CMPIObjectPath *ref=CMNewObjectPath(_broker,"root/interop","cim_listenerdestination",&st); - enm = _broker->bft->enumerateInstanceNames(_broker, ctxLocal, ref, &st); - while(enm && enm->ft->hasNext(enm, &st)) { - LDcount++; - enm->ft->getNext(enm, &st); - } - ref = CMNewObjectPath(_broker,"root/interop","cim_listenerdestinationcimxml",&st); - enm = _broker->bft->enumerateInstanceNames(_broker, ctxLocal, ref, &st); - while(enm && enm->ft->hasNext(enm, &st)) { - LDcount++; - enm->ft->getNext(enm, &st); - } - ref = CMNewObjectPath(_broker,"root/interop","cim_indicationhandlercimxml",&st); - enm = _broker->bft->enumerateInstanceNames(_broker, ctxLocal, ref, &st); - while(enm && enm->ft->hasNext(enm, &st)) { - LDcount++; - enm->ft->getNext(enm, &st); - } - - CMRelease(ref); - CMRelease(ctxLocal); - _SFCB_TRACE(1,("--- initial count of destinations: %d.",LDcount)); - - _SFCB_RETURN(0); -} - int initIndCIMXML (const CMPIContext * ctx) { _SFCB_ENTER(TRACE_INDPROVIDER, "initIndCIMXML"); //Refill the queue if there were any from the last run refillRetryQ(ctx); - if ( LDcount == -1 ) { - //Get the count of ListenerDestinations - countLD(ctx); - } _SFCB_RETURN(0); } Index: interopProvider.c =================================================================== RCS file: /cvsroot/sblim/sfcb/interopProvider.c,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- interopProvider.c 13 Apr 2012 23:48:19 -0000 1.59 +++ interopProvider.c 16 May 2012 16:12:37 -0000 1.60 @@ -59,7 +59,6 @@ static const CMPIBroker *_broker; static int firstTime=1; - typedef struct filter { CMPIInstance *fci; QLStatement *qs; @@ -773,6 +772,10 @@ getControlNum("indicationDeliveryThreadTimeout",&IND_THREAD_TO); sem_init(&availThreadsSem, 0, MAX_IND_THREADS); + if (handlerHt) { + // Set the initial count of Listener Destinations + LDcount=handlerHt->ft->size(handlerHt); + } _SFCB_EXIT(); } Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.764 retrieving revision 1.765 diff -u -d -r1.764 -r1.765 --- ChangeLog 11 May 2012 20:05:11 -0000 1.764 +++ ChangeLog 16 May 2012 16:12:37 -0000 1.765 @@ -1,3 +1,9 @@ +2012-05-16 Michael Chase-Salerno <br...@li...> + + * control.h, indCIMXMLHandler.c, interopServerProvider.c: + [ 3513390 ] Enforce LD and subscription limits + Use hashtable instead of EI + 2012-05-11 Chris Buccella <buc...@li...> * instance.c, indCIMXMLHandler.c, internalProvider.c, |
From: Dave B. <bla...@us...> - 2012-05-14 21:51:19
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem In directory vz-cvs-3.sog:/tmp/cvs-serv15654/src/org/sblim/cimclient/internal/wbem Modified Files: Tag: Experimental CIMError.java Log Message: 3526681 - CIMError valid status codes out-of-date Index: CIMError.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem/CIMError.java,v retrieving revision 1.3.2.2 retrieving revision 1.3.2.3 diff -u -d -r1.3.2.2 -r1.3.2.3 --- CIMError.java 22 Jan 2009 23:21:04 -0000 1.3.2.2 +++ CIMError.java 14 May 2012 21:51:16 -0000 1.3.2.3 @@ -1,7 +1,7 @@ /** * CIMError.java * - * (C) Copyright IBM Corp. 2005, 2009 + * (C) Copyright IBM Corp. 2005, 2012 * * 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 @@ * 1535756 2006-08-07 lupusalex Make code warning free * 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) + * 3526681 2012-05-14 blaschke-oss CIMError valid status codes out-of-date */ package org.sblim.cimclient.internal.wbem; @@ -120,7 +121,9 @@ * @param pStatus */ public void setCode(int pStatus) { - if (pStatus > 18 || pStatus < 1) throw new IllegalArgumentException("invalid error code"); + if (pStatus > WBEMException.CIM_ERR_SERVER_IS_SHUTTING_DOWN + || pStatus < WBEMException.CIM_ERR_FAILED) throw new IllegalArgumentException( + "invalid error code"); this.iStatusCode = pStatus; } |
From: Dave B. <bla...@us...> - 2012-05-14 21:43:33
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml In directory vz-cvs-3.sog:/tmp/cvs-serv15376/src/org/sblim/cimclient/internal/cimxml Modified Files: Tag: Experimental CIMXMLParserImpl.java Log Message: 3526679 - DOM parser ignores ERROR node CODE Index: CIMXMLParserImpl.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/CIMXMLParserImpl.java,v retrieving revision 1.14.2.37 retrieving revision 1.14.2.38 diff -u -d -r1.14.2.37 -r1.14.2.38 --- CIMXMLParserImpl.java 25 Apr 2012 02:34:36 -0000 1.14.2.37 +++ CIMXMLParserImpl.java 14 May 2012 21:43:31 -0000 1.14.2.38 @@ -54,6 +54,7 @@ * 3513349 2012-03-31 blaschke-oss TCK: CIMDataType must not accept null string * 3466280 2012-04-23 blaschke-oss get instance failure for CIM_IndicationSubscription * 3521119 2012-04-24 blaschke-oss JSR48 1.0.0: remove CIMObjectPath 2/3/4-parm ctors + * 3526679 2012-05-14 blaschke-oss DOM parser ignores ERROR node CODE */ package org.sblim.cimclient.internal.cimxml; @@ -2645,6 +2646,7 @@ } catch (Exception e) { LogAndTraceBroker.getBroker().trace(Level.WARNING, "exception while parsing error code from XML", e); + errorCode = WBEMException.CIM_ERR_FAILED; } Attr error_descriptionA = (Attr) searchAttribute(pErrorE, "DESCRIPTION"); String description = ""; @@ -2666,9 +2668,10 @@ // throw new CIMException(CIMException.getErrorName(errorCode), // description.substring(description.indexOf(':')+1)); - if (!rtnV.isEmpty()) return new WBEMException(WBEMException.CIM_ERR_FAILED, "ErrorCode:" - + errorCode + " description:" + description, rtnV.toArray(new CIMInstance[0])); - return new WBEMException("ErrorCode:" + errorCode + " description:" + description); + if (!rtnV.isEmpty()) return new WBEMException(errorCode, "ErrorCode:" + errorCode + + " description:" + description, rtnV.toArray(new CIMInstance[0])); + return new WBEMException(errorCode, "ErrorCode:" + errorCode + " description:" + + description); } /** |
From: Dave B. <bla...@us...> - 2012-05-14 21:14:59
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cim In directory vz-cvs-3.sog:/tmp/cvs-serv13594/src/org/sblim/cimclient/internal/cim Modified Files: Tag: Experimental DTStringReader.java Log Message: 3526675 - Unit test fails on Java 7 Index: DTStringReader.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cim/DTStringReader.java,v retrieving revision 1.2.2.5 retrieving revision 1.2.2.6 diff -u -d -r1.2.2.5 -r1.2.2.6 --- DTStringReader.java 14 Apr 2009 22:21:54 -0000 1.2.2.5 +++ DTStringReader.java 14 May 2012 21:14:57 -0000 1.2.2.6 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2009 + * (C) Copyright IBM Corp. 2006, 2012 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -17,6 +17,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) * 2763216 2009-04-14 blaschke-oss Code cleanup: visible spelling/grammar errors + * 3526675 2012-05-14 blaschke-oss Unit test fails on Java 7 */ package org.sblim.cimclient.internal.cim; @@ -98,6 +99,9 @@ } if (res < 0) throw new IllegalArgumentException("Negative value is not allowed for " + pFieldName + " in " + this.iDateTimeStr + "!"); + // Java 7 parseInt began allowing plus sign + if (field.indexOf('+') != -1) throw new IllegalArgumentException( + "Plus sign is not allowed for " + pFieldName + " in " + this.iDateTimeStr + "!"); return res; } |
From: Chris B. <buc...@us...> - 2012-05-14 16:45:48
|
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 ee5dac7462c8b026e62f197ddcb53a89b8177ced (commit) via 45f17b53fa1e744d699c904ace650c092d273af4 (commit) via 29fc7c5a0999194cc3fe9e5785e3ea48a12a0673 (commit) from e4d06da1801b9ae1cc51277510fc3c4c3944d42d (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 ee5dac7462c8b026e62f197ddcb53a89b8177ced Author: buccella <buc...@li...> Date: Mon May 14 12:46:14 2012 -0400 [ 3525651 ] CMSetPropertyFilter not CMPI 2.0 compliant commit 45f17b53fa1e744d699c904ace650c092d273af4 Author: buccella <buc...@li...> Date: Mon May 14 12:20:32 2012 -0400 Missing changes from 3367363 in GetInstance commit 29fc7c5a0999194cc3fe9e5785e3ea48a12a0673 Author: buccella <buc...@li...> Date: Fri May 11 17:12:12 2012 -0400 fixed trace line ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 921b1ca..410a2e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2012-05-14 Chris Buccella <buc...@li...> + + * indCIMXMLHandler.c, instance.c, internalProvider.c, queryOperation.h, + queryStatement.c, result.c, + test/xmltest/InstanceTest25GetWithPropertyFilter.*: + [ 3525651 ] CMSetPropertyFilter not CMPI 2.0 compliant + (based on patch by Tyrel Datwyler) + 2012-04-19 Michael Chase-Salerno <br...@li...> * control.c, indCIMXMLHandler.c, interopServerProvider.c, diff --git a/NEWS b/NEWS index 1cd82fb..ef43ca7 100644 --- a/NEWS +++ b/NEWS @@ -100,7 +100,7 @@ Bugs Fixed: - 3514627 unsupported sfcb.cfg param - use exit call - 3516184 commClose close socket when file hndl is null - 3517573 Problem with SequenceContext migration - +- 3525651 CMSetPropertyFilter not CMPI 2.0 compliant Changes in 1.3.14 ================= diff --git a/cimXmlOps.y b/cimXmlOps.y index 2903c31..5cf8e6c 100644 --- a/cimXmlOps.y +++ b/cimXmlOps.y @@ -361,7 +361,7 @@ buildGetInstanceRequest(void *parm) sreqSize += req->properties * sizeof(MsgSegment); sreq = calloc(1, sreqSize); sreq->hdr.operation = OPS_GetInstance; - sreq->hdr.count = req->properties + 2; + sreq->hdr.count = req->properties + GI_REQ_REG_SEGMENTS; path = TrackedCMPIObjectPath(req->op.nameSpace.data, req->op.className.data, @@ -378,9 +378,11 @@ buildGetInstanceRequest(void *parm) } sreq->objectPath = setObjectPathMsgSegment(path); sreq->principal = setCharsMsgSegment(hdr->principal); + sreq->userRole = setCharsMsgSegment(hdr->role); sreq->hdr.sessionId = hdr->sessionId; for (i = 0; i < req->properties; i++) { + fprintf(stderr, "setting filter prop %d to %s\n", i, req->propertyList.values[i].value); sreq->properties[i] = setCharsMsgSegment(req->propertyList.values[i].value); } diff --git a/indCIMXMLHandler.c b/indCIMXMLHandler.c index 1db59da..e9de848 100644 --- a/indCIMXMLHandler.c +++ b/indCIMXMLHandler.c @@ -168,22 +168,6 @@ IndCIMXMLHandlerEnumInstanceNames(CMPIInstanceMI * mi, _SFCB_RETURN(st); } -const char ** -getKeyList(const CMPIObjectPath * cop) -{ - CMPIString *s; - const char **list; - int i = cop->ft->getKeyCount(cop, NULL); - list = malloc((i + 1) * sizeof(char *)); - list[i] = NULL; - while (i) { - i--; - cop->ft->getKeyAt(cop, i, &s, NULL); - list[i] = s->ft->getCharPtr(s, NULL); - } - return list; -} - void filterInternalProps(CMPIInstance* ci) { @@ -308,7 +292,6 @@ IndCIMXMLHandlerGetInstance(CMPIInstanceMI * mi, { CMPIStatus st; CMPIInstance* ci; - const char** keyList; _SFCB_ENTER(TRACE_INDPROVIDER, "IndCIMXMLHandlerGetInstance"); ci = internalProviderGetInstance(cop, &st); @@ -318,11 +301,7 @@ IndCIMXMLHandlerGetInstance(CMPIInstanceMI * mi, filterInternalProps(ci); } if (properties) { - keyList = getKeyList(ci->ft->getObjectPath(ci, NULL)); - ci->ft->setPropertyFilter(ci, properties, keyList); - if (keyList) { - free(keyList); - } + ci->ft->setPropertyFilter(ci, properties, NULL); } CMReturnInstance(rslt, ci); } diff --git a/instance.c b/instance.c index a7a7748..059d98c 100644 --- a/instance.c +++ b/instance.c @@ -80,6 +80,10 @@ static void instFillDefaultProperties(struct native_instance *inst, const char *ns, const char *cn); #endif +static CMPIStatus __ift_internal_setPropertyFilter(CMPIInstance * instance, + const char **propertyList, + const char **keys); + /****************************************************************************/ static void @@ -112,6 +116,28 @@ __duplicate_list(const char **list) return result; } +static char **__make_key_list(const CMPIObjectPath * cop) +{ + char **keys = NULL; + int i, j; + + if (cop) { + j = CMGetKeyCount(cop, NULL); + + if (j) { + /* allocate extra element since list needs to be NULL terminated */ + keys = calloc(j + 1, sizeof(char *)); + for (i = 0; i < j; i++) { + CMPIString *keyName; + CMGetKeyAt(cop, i , &keyName, NULL); + keys[i] = strdup(CMGetCharsPtr(keyName, NULL)); + } + } + } + + return keys; +} + void memLinkInstance(CMPIInstance *ci) { @@ -329,6 +355,14 @@ __ift_setObjectPath(CMPIInstance *inst, const CMPIObjectPath * cop) int j; CMPIStatus rc = { CMPI_RC_OK, NULL }; + /* in the case the instance is filtered need to reset the filter with new key list */ + if (((struct native_instance *)inst)->filtered) { + char **props = ((struct native_instance *)inst)->property_list; + char **keys = __make_key_list(cop); + __ift_internal_setPropertyFilter(inst, (const char **)props, (const char **)keys); + __release_list(keys); + } + /* * get information out of objectpath */ @@ -462,8 +496,8 @@ __ift_getObjectPath(const CMPIInstance *instance, CMPIStatus *rc) } static CMPIStatus -__ift_setPropertyFilter(CMPIInstance *instance, - const char **propertyList, const char **keys) +__ift_internal_setPropertyFilter(CMPIInstance *instance, + const char **propertyList, const char **keys) { int j, m; @@ -476,13 +510,6 @@ __ift_setPropertyFilter(CMPIInstance *instance, struct native_instance *iNew, iTemp; - if (propertyList == NULL) { - /* - * NULL property list, no need to set filter - */ - CMReturn(CMPI_RC_OK); - } - cop = TrackedCMPIObjectPath(instGetNameSpace(instance), instGetClassName(instance), NULL); @@ -529,6 +556,35 @@ __ift_setPropertyFilter(CMPIInstance *instance, CMReturn(CMPI_RC_OK); } +static CMPIStatus __ift_setPropertyFilter(CMPIInstance * instance, + const char **propertyList, + const char **keys) +{ + CMPIStatus rc = { CMPI_RC_OK, NULL}; + CMPIObjectPath *cop = NULL; + char **ikeys = NULL; + + if (propertyList == NULL) { + /* NULL property list, no need to set filter */ + CMReturn(CMPI_RC_OK); + } + if (instance == NULL) { + rc.rc = CMPI_RC_ERR_INVALID_HANDLE; + } + else { + /* CMPI 2.0 dictates that keyList is to be ignored by MB, and remains for Binary compat. + Build keyList from instance objectpath to be passed to internal filter implementation */ + cop = CMGetObjectPath(instance, NULL); + ikeys = __make_key_list(cop); + + rc = __ift_internal_setPropertyFilter(instance, propertyList, (const char **)ikeys); + + __release_list(ikeys); + } + + return rc; +} + static CMPIData __ift_getQualifier(CMPIInstance *inst, const char *name, CMPIStatus *rc) { diff --git a/internalProvider.c b/internalProvider.c index a51a9e3..c330ceb 100644 --- a/internalProvider.c +++ b/internalProvider.c @@ -104,22 +104,6 @@ ipGetNext(BlobIndex * bi, int *len, char **keyb, size_t * keybl) return instifyBlob(blob); } -const char ** -getKeyList(const CMPIObjectPath * cop) -{ - CMPIString *s; - const char **list; - int i = cop->ft->getKeyCount(cop, NULL); - list = malloc((i + 1) * sizeof(char *)); - list[i] = NULL; - while (i) { - i--; - cop->ft->getKeyAt(cop, i, &s, NULL); - list[i] = s->ft->getCharPtr(s, NULL); - } - return list; -} - static char **nsTab = NULL; static int nsTabLen = 0; @@ -284,7 +268,6 @@ enumInstances(CMPIInstanceMI * mi, CMPIObjectPath *op; CMPIArray *ar; CMPIData rv; - const char **keyList; _SFCB_ENTER(TRACE_INTERNALPROVIDER, "enumInstances"); _SFCB_TRACE(1, ("--- %s %s", nss, cns)); @@ -312,11 +295,7 @@ enumInstances(CMPIInstanceMI * mi, for (ci = ipGetFirst(bi, &len, NULL, 0); ci; ci = ipGetNext(bi, &len, NULL, 0)) { if (properties) { - keyList = getKeyList(ci->ft->getObjectPath(ci, NULL)); - ci->ft->setPropertyFilter(ci, properties, keyList); - if (keyList) { - free(keyList); - } + ci->ft->setPropertyFilter(ci, properties, NULL); } _SFCB_TRACE(1, ("--- returning instance %p", ci)); retFnc(rslt, ci); @@ -420,17 +399,12 @@ InternalProviderGetInstance(CMPIInstanceMI * mi, { CMPIStatus st = { CMPI_RC_OK, NULL }; CMPIInstance *ci; - const char **keyList; _SFCB_ENTER(TRACE_INTERNALPROVIDER, "InternalProviderGetInstance"); ci = internalProviderGetInstance(cop, &st); if (st.rc == CMPI_RC_OK && properties) { - keyList = getKeyList(ci->ft->getObjectPath(ci, NULL)); - ci->ft->setPropertyFilter(ci, properties, keyList); - if (keyList) { - free(keyList); - } + ci->ft->setPropertyFilter(ci, properties, NULL); } if (st.rc == CMPI_RC_OK) { @@ -520,7 +494,6 @@ InternalProviderModifyInstance(CMPIInstanceMI * mi, const char *nss = ns->ft->getCharPtr(ns, NULL); const char *cns = cn->ft->getCharPtr(cn, NULL); const char *bnss = repositoryNs(nss); - const char **keyList; _SFCB_ENTER(TRACE_INTERNALPROVIDER, "InternalProviderSetInstance"); @@ -536,11 +509,7 @@ InternalProviderModifyInstance(CMPIInstanceMI * mi, } if (properties) { - keyList = getKeyList(ci->ft->getObjectPath(ci, NULL)); - ci->ft->setPropertyFilter((CMPIInstance *) ci, properties, keyList); - if (keyList) { - free(keyList); - } + ci->ft->setPropertyFilter((CMPIInstance *) ci, properties, NULL); } len = getInstanceSerializedSize(ci); diff --git a/providerMgr.c b/providerMgr.c index 6af92a7..4db8f91 100644 --- a/providerMgr.c +++ b/providerMgr.c @@ -1151,7 +1151,7 @@ getProviderContext(BinRequestContext * ctx) ComSockets sockets; OperationHdr *ohdr = ctx->oHdr; - _SFCB_ENTER(TRACE_PROVIDERMGR, "internalGetProviderContext"); + _SFCB_ENTER(TRACE_PROVIDERMGR, "getProviderContext"); l = sizeof(*ohdr) + ohdr->nameSpace.length + ohdr->className.length; buf = (char *) malloc(l + 8); diff --git a/queryOperation.h b/queryOperation.h index 2c2b3f8..6e0b4e4 100644 --- a/queryOperation.h +++ b/queryOperation.h @@ -234,7 +234,7 @@ struct qlPropertySource { struct qlStatementFt { void (*release) (QLStatement *); CMPIInstance *(*cloneAndFilter) (QLStatement *, CMPIInstance *, - CMPIObjectPath *, char **); + CMPIObjectPath *); void (*setAllProperties) (QLStatement *, int allProperties); void (*appendSelectPropertyName) (QLStatement *, char *name); void (*addFromClass) (QLStatement *, char *cn, char *ca); diff --git a/queryStatement.c b/queryStatement.c index 91aaf07..b11840f 100644 --- a/queryStatement.c +++ b/queryStatement.c @@ -186,14 +186,12 @@ qsRelease(QLStatement * st) } static CMPIInstance * -qsCloneAndFilter(QLStatement * st, CMPIInstance *ci, CMPIObjectPath * cop, - char **kNames) +qsCloneAndFilter(QLStatement * st, CMPIInstance *ci, CMPIObjectPath * cop) { CMPIInstance *nic = CMNewInstance(Broker, cop, NULL); CMPICount i, c = CMGetPropertyCount(ci, NULL); - CMSetPropertyFilter(nic, (const char **) st->spNames, - (const char **) kNames); + CMSetPropertyFilter(nic, (const char **) st->spNames, NULL); for (i = 0; i < c; i++) { CMPIString *name; CMPIData d = CMGetPropertyAt(ci, i, &name, NULL); diff --git a/result.c b/result.c index 3a5edd3..025db97 100644 --- a/result.c +++ b/result.c @@ -303,7 +303,7 @@ __rft_returnInstance(const CMPIResult *result, if (r->qs->allProps == 0) { instance = r->qs->ft->cloneAndFilter(r->qs, (CMPIInstance *) instance, - CMGetObjectPath(instance,NULL), r->qs->keys); + CMGetObjectPath(instance,NULL)); releaseInstance = 1; } } else @@ -312,7 +312,7 @@ __rft_returnInstance(const CMPIResult *result, if (r->qs->allProps == 0) { instance = r->qs->ft->cloneAndFilter(r->qs, (CMPIInstance *) instance, - CMGetObjectPath(instance,NULL), r->qs->keys); + CMGetObjectPath(instance,NULL)); releaseInstance = 1; } } diff --git a/test/cimrstest/Interim_gi_TestPerson.lines b/test/xmltest/InstanceTest25GetWithPropertyFilter.lines similarity index 60% copy from test/cimrstest/Interim_gi_TestPerson.lines copy to test/xmltest/InstanceTest25GetWithPropertyFilter.lines index 0f40d14..b4ea1fd 100644 --- a/test/cimrstest/Interim_gi_TestPerson.lines +++ b/test/xmltest/InstanceTest25GetWithPropertyFilter.lines @@ -1,5 +1,5 @@ -<IRETURNVALUE> <INSTANCE CLASSNAME="TEST_Person"> <PROPERTY NAME="name" TYPE="string"> -<VALUE>Mike</VALUE> -Mike +<VALUE>Michael</VALUE> +</PROPERTY> +</INSTANCE> diff --git a/test/xmltest/InstanceTest25GetWithPropertyFilter.xml b/test/xmltest/InstanceTest25GetWithPropertyFilter.xml new file mode 100644 index 0000000..2d6e265 --- /dev/null +++ b/test/xmltest/InstanceTest25GetWithPropertyFilter.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8" ?> +<CIM CIMVERSION="2.0" DTDVERSION="2.0"> +<MESSAGE ID="4711" PROTOCOLVERSION="1.0"><SIMPLEREQ><IMETHODCALL NAME="GetInstance"><LOCALNAMESPACEPATH><NAMESPACE NAME="root"></NAMESPACE><NAMESPACE NAME="cimv2"></NAMESPACE></LOCALNAMESPACEPATH> +<IPARAMVALUE NAME="LocalOnly"><VALUE>FALSE</VALUE></IPARAMVALUE> +<IPARAMVALUE NAME="IncludeQualifiers"><VALUE>FALSE</VALUE></IPARAMVALUE> +<IPARAMVALUE NAME="IncludeClassOrigin"><VALUE>TRUE</VALUE></IPARAMVALUE> +<IPARAMVALUE NAME="PropertyList"><VALUE.ARRAY><VALUE>name</VALUE></VALUE.ARRAY></IPARAMVALUE> +<IPARAMVALUE NAME="InstanceName"><INSTANCENAME CLASSNAME="Test_person"><KEYBINDING NAME="name"><KEYVALUE VALUETYPE="string">Michael</KEYVALUE></KEYBINDING></INSTANCENAME></IPARAMVALUE> +</IMETHODCALL></SIMPLEREQ> +</MESSAGE></CIM> hooks/post-receive -- SFCB - Small Footprint CIM Broker |
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv24421 Modified Files: instance.c indCIMXMLHandler.c queryStatement.c internalProvider.c queryOperation.h result.c ChangeLog NEWS Log Message: [ 3525651 ] CMSetPropertyFilter not CMPI 2.0 compliant Index: instance.c =================================================================== RCS file: /cvsroot/sblim/sfcb/instance.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- instance.c 23 Nov 2011 18:22:16 -0000 1.53 +++ instance.c 11 May 2012 20:05:11 -0000 1.54 @@ -77,6 +77,10 @@ const char * ns, const char * cn); #endif +static CMPIStatus __ift_internal_setPropertyFilter(CMPIInstance * instance, + const char **propertyList, + const char **keys); + /****************************************************************************/ static void __release_list(char **list) @@ -107,6 +111,29 @@ } +static char **__make_key_list(const CMPIObjectPath * cop) +{ + char **keys = NULL; + int i, j; + + if (cop) { + j = CMGetKeyCount(cop, NULL); + + if (j) { + /* allocate extra element since list needs to be NULL terminated */ + keys = calloc(j + 1, sizeof(char *)); + for (i = 0; i < j; i++) { + CMPIString *keyName; + CMGetKeyAt(cop, i , &keyName, NULL); + keys[i] = strdup(CMGetCharsPtr(keyName, NULL)); + } + } + } + + return keys; +} + + void memLinkInstance(CMPIInstance *ci) { struct native_instance *i = (struct native_instance *) ci; @@ -304,6 +331,14 @@ int j; CMPIStatus rc = { CMPI_RC_OK, NULL }; + /* in the case the instance is filtered need to reset the filter with new key list */ + if (((struct native_instance *)inst)->filtered) { + char **props = ((struct native_instance *)inst)->property_list; + char **keys = __make_key_list(cop); + __ift_internal_setPropertyFilter(inst, (const char **)props, (const char **)keys); + __release_list(keys); + } + /* get information out of objectpath */ if (cop) { j = CMGetKeyCount(cop, &tmp1); @@ -420,9 +455,9 @@ } -static CMPIStatus __ift_setPropertyFilter(CMPIInstance * instance, - const char **propertyList, - const char **keys) +static CMPIStatus __ift_internal_setPropertyFilter(CMPIInstance * instance, + const char **propertyList, + const char **keys) { int j,m; CMPIObjectPath * cop; @@ -433,11 +468,6 @@ struct native_instance *i = (struct native_instance *) instance; struct native_instance *iNew,iTemp; - if (propertyList == NULL) { - /* NULL property list, no need to set filter */ - CMReturn(CMPI_RC_OK); - } - cop = TrackedCMPIObjectPath(instGetNameSpace(instance), instGetClassName(instance), NULL); if(cop) { if(i->mem_state == MEM_RELEASED || i->mem_state > 0) { @@ -482,6 +512,36 @@ CMReturn(CMPI_RC_OK); } + +static CMPIStatus __ift_setPropertyFilter(CMPIInstance * instance, + const char **propertyList, + const char **keys) +{ + CMPIStatus rc = { CMPI_RC_OK, NULL}; + CMPIObjectPath *cop = NULL; + char **ikeys = NULL; + + if (propertyList == NULL) { + /* NULL property list, no need to set filter */ + CMReturn(CMPI_RC_OK); + } + if (instance == NULL) { + rc.rc = CMPI_RC_ERR_INVALID_HANDLE; + } + else { + /* CMPI 2.0 dictates that keyList is to be ignored by MB, and remains for Binary compat. + Build keyList from instance objectpath to be passed to internal filter implementation */ + cop = CMGetObjectPath(instance, NULL); + ikeys = __make_key_list(cop); + + rc = __ift_internal_setPropertyFilter(instance, propertyList, (const char **)ikeys); + + __release_list(ikeys); + } + + return rc; +} + static CMPIData __ift_getQualifier(CMPIInstance* inst, const char *name, CMPIStatus* rc) { Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.763 retrieving revision 1.764 diff -u -d -r1.763 -r1.764 --- ChangeLog 19 Apr 2012 17:39:55 -0000 1.763 +++ ChangeLog 11 May 2012 20:05:11 -0000 1.764 @@ -1,3 +1,11 @@ +2012-05-11 Chris Buccella <buc...@li...> + + * instance.c, indCIMXMLHandler.c, internalProvider.c, + queryOperation.h, queryStatement.c, result.c, + test/xmltest/InstanceTest25GetWithPropertyFilter.xml: + [ 3525651 ] CMSetPropertyFilter not CMPI 2.0 compliant + (based on patch by Tyrel Datwyler) + 2012-04-19 Michael Chase-Salerno <br...@li...> * control.c, indCIMXMLHandler.c, interopServerProvider.c, Index: queryStatement.c =================================================================== RCS file: /cvsroot/sblim/sfcb/queryStatement.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- queryStatement.c 14 Apr 2010 20:06:24 -0000 1.16 +++ queryStatement.c 11 May 2012 20:05:11 -0000 1.17 @@ -169,12 +169,11 @@ } } -static CMPIInstance* qsCloneAndFilter(QLStatement *st, CMPIInstance *ci, CMPIObjectPath *cop, - char **kNames) +static CMPIInstance* qsCloneAndFilter(QLStatement *st, CMPIInstance *ci, CMPIObjectPath *cop) { CMPIInstance *nic=CMNewInstance(Broker,cop,NULL); CMPICount i,c=CMGetPropertyCount(ci,NULL); - CMSetPropertyFilter(nic,(const char**)st->spNames, (const char**)kNames); + CMSetPropertyFilter(nic,(const char**)st->spNames, NULL); for (i=0; i<c; i++) { CMPIString *name; CMPIData d=CMGetPropertyAt(ci,i,&name,NULL); Index: queryOperation.h =================================================================== RCS file: /cvsroot/sblim/sfcb/queryOperation.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- queryOperation.h 19 Mar 2009 23:31:49 -0000 1.11 +++ queryOperation.h 11 May 2012 20:05:11 -0000 1.12 @@ -219,7 +219,7 @@ struct qlStatementFt { void (*release)(QLStatement*); - CMPIInstance *(*cloneAndFilter)(QLStatement*,CMPIInstance*,CMPIObjectPath*,char**); + CMPIInstance *(*cloneAndFilter)(QLStatement*,CMPIInstance*,CMPIObjectPath*); void (*setAllProperties)(QLStatement*,int allProperties); void (*appendSelectPropertyName)(QLStatement*,char *name); void (*addFromClass)(QLStatement*,char *cn, char *ca); Index: indCIMXMLHandler.c =================================================================== RCS file: /cvsroot/sblim/sfcb/indCIMXMLHandler.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- indCIMXMLHandler.c 19 Apr 2012 17:39:55 -0000 1.49 +++ indCIMXMLHandler.c 11 May 2012 20:05:11 -0000 1.50 @@ -270,7 +270,6 @@ { CMPIStatus st; CMPIInstance* ci; - const char** keyList; _SFCB_ENTER(TRACE_INDPROVIDER, "IndCIMXMLHandlerGetInstance"); @@ -281,11 +280,7 @@ filterInternalProps(ci); } if (properties) { - keyList = getKeyList(ci->ft->getObjectPath(ci, NULL)); - ci->ft->setPropertyFilter(ci, properties, keyList); - if (keyList) { - free(keyList); - } + ci->ft->setPropertyFilter(ci, properties, NULL); } CMReturnInstance(rslt, ci); } Index: internalProvider.c =================================================================== RCS file: /cvsroot/sblim/sfcb/internalProvider.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- internalProvider.c 14 May 2010 22:57:18 -0000 1.43 +++ internalProvider.c 11 May 2012 20:05:11 -0000 1.44 @@ -264,7 +264,6 @@ CMPIObjectPath *op; CMPIArray *ar; CMPIData rv; - const char **keyList; _SFCB_ENTER(TRACE_INTERNALPROVIDER, "enumInstances"); _SFCB_TRACE(1,("--- %s %s",nss,cns)); @@ -288,11 +287,7 @@ if ((bi=_getIndex(bnss,cns))!=NULL) { for (ci=ipGetFirst(bi,&len,NULL,0); ci; ci=ipGetNext(bi,&len,NULL,0)) { if(properties) { - keyList = getKeyList(ci->ft->getObjectPath(ci, NULL)); - ci->ft->setPropertyFilter(ci, properties, keyList); - if(keyList) { - free(keyList); - } + ci->ft->setPropertyFilter(ci, properties, NULL); } _SFCB_TRACE(1,("--- returning instance %p",ci)); retFnc(rslt,ci); @@ -382,17 +377,12 @@ { CMPIStatus st = { CMPI_RC_OK, NULL }; CMPIInstance *ci; - const char ** keyList; _SFCB_ENTER(TRACE_INTERNALPROVIDER, "InternalProviderGetInstance"); ci=internalProviderGetInstance(cop,&st); if(st.rc==CMPI_RC_OK && properties) { - keyList = getKeyList(ci->ft->getObjectPath(ci, NULL)); - ci->ft->setPropertyFilter(ci, properties, keyList); - if(keyList) { - free(keyList); - } + ci->ft->setPropertyFilter(ci, properties, NULL); } if (st.rc==CMPI_RC_OK) { @@ -475,7 +465,6 @@ const char *nss=ns->ft->getCharPtr(ns,NULL); const char *cns=cn->ft->getCharPtr(cn,NULL); const char *bnss=repositoryNs(nss); - const char **keyList; _SFCB_ENTER(TRACE_INTERNALPROVIDER, "InternalProviderSetInstance"); @@ -491,11 +480,7 @@ } if(properties) { - keyList = getKeyList(ci->ft->getObjectPath(ci, NULL)); - ci->ft->setPropertyFilter((CMPIInstance*)ci, properties, keyList); - if(keyList) { - free(keyList); - } + ci->ft->setPropertyFilter((CMPIInstance*)ci, properties, NULL); } len=getInstanceSerializedSize(ci); Index: result.c =================================================================== RCS file: /cvsroot/sblim/sfcb/result.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- result.c 23 Sep 2011 20:18:46 -0000 1.17 +++ result.c 11 May 2012 20:05:11 -0000 1.18 @@ -254,7 +254,7 @@ if (irc==1) { if (r->qs->allProps==0) { instance= - r->qs->ft->cloneAndFilter(r->qs,(CMPIInstance *)instance,CMGetObjectPath(instance, NULL),r->qs->keys); + r->qs->ft->cloneAndFilter(r->qs,(CMPIInstance *)instance,CMGetObjectPath(instance, NULL)); releaseInstance=1; } } @@ -262,7 +262,7 @@ } else { if (r->qs->allProps==0) { - instance=r->qs->ft->cloneAndFilter(r->qs,(CMPIInstance *)instance,CMGetObjectPath(instance,NULL), r->qs->keys); + instance=r->qs->ft->cloneAndFilter(r->qs,(CMPIInstance *)instance,CMGetObjectPath(instance,NULL)); releaseInstance=1; } } Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.684 retrieving revision 1.685 diff -u -d -r1.684 -r1.685 --- NEWS 19 Apr 2012 17:39:55 -0000 1.684 +++ NEWS 11 May 2012 20:05:11 -0000 1.685 @@ -14,6 +14,7 @@ - 3514627 unsupported sfcb.cfg param - use exit call - 3516184 commClose close socket when file hndl is null - 3517573 Problem with SequenceContext migration +- 3525651 CMSetPropertyFilter not CMPI 2.0 compliant Changes in 1.3.14 ================= |
From: Chris B. <buc...@us...> - 2012-05-11 20:05:13
|
Update of /cvsroot/sblim/sfcb/test/xmltest In directory vz-cvs-3.sog:/tmp/cvs-serv24421/test/xmltest Added Files: InstanceTest25GetWithPropertyFilter.lines InstanceTest25GetWithPropertyFilter.xml Log Message: [ 3525651 ] CMSetPropertyFilter not CMPI 2.0 compliant --- NEW FILE: InstanceTest25GetWithPropertyFilter.xml --- <?xml version="1.0" encoding="utf-8" ?> <CIM CIMVERSION="2.0" DTDVERSION="2.0"> <MESSAGE ID="4711" PROTOCOLVERSION="1.0"><SIMPLEREQ><IMETHODCALL NAME="GetInstance"><LOCALNAMESPACEPATH><NAMESPACE NAME="root"></NAMESPACE><NAMESPACE NAME="cimv2"></NAMESPACE></LOCALNAMESPACEPATH> <IPARAMVALUE NAME="LocalOnly"><VALUE>FALSE</VALUE></IPARAMVALUE> <IPARAMVALUE NAME="IncludeQualifiers"><VALUE>FALSE</VALUE></IPARAMVALUE> <IPARAMVALUE NAME="IncludeClassOrigin"><VALUE>TRUE</VALUE></IPARAMVALUE> <IPARAMVALUE NAME="PropertyList"><VALUE.ARRAY><VALUE>name</VALUE></VALUE.ARRAY></IPARAMVALUE> <IPARAMVALUE NAME="InstanceName"><INSTANCENAME CLASSNAME="Test_person"><KEYBINDING NAME="name"><KEYVALUE VALUETYPE="string">Michael</KEYVALUE></KEYBINDING></INSTANCENAME></IPARAMVALUE> </IMETHODCALL></SIMPLEREQ> </MESSAGE></CIM> --- NEW FILE: InstanceTest25GetWithPropertyFilter.lines --- <INSTANCE CLASSNAME="TEST_Person"> <PROPERTY NAME="name" TYPE="string"> <VALUE>Michael</VALUE> </PROPERTY> </INSTANCE> |
From: Dave B. <bla...@us...> - 2012-05-11 17:49:07
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem In directory vz-cvs-3.sog:/tmp/cvs-serv8127/src/org/sblim/cimclient/internal/wbem Modified Files: Tag: Experimental WBEMClientCIMXML.java Log Message: 3525914 - TCK: SetPropertyTest.testSetProperty failing Index: WBEMClientCIMXML.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem/WBEMClientCIMXML.java,v retrieving revision 1.21.2.63 retrieving revision 1.21.2.64 diff -u -d -r1.21.2.63 -r1.21.2.64 --- WBEMClientCIMXML.java 10 May 2012 23:23:42 -0000 1.21.2.63 +++ WBEMClientCIMXML.java 11 May 2012 17:49:04 -0000 1.21.2.64 @@ -65,6 +65,7 @@ * 3521328 2012-04-25 blaschke-oss JSR48 1.0.0: remove WBEMClient associators and references * 3522904 2012-05-02 blaschke-oss Add new API WBEMClientSBLIM.isActive() * 3521157 2012-05-10 blaschke-oss JSR48 1.0.0: PROP_ENABLE_*_LOGGING is Level, not 0/1 + * 3525914 2012-05-11 blaschke-oss TCK: SetPropertyTest.testSetProperty failing */ package org.sblim.cimclient.internal.wbem; @@ -421,7 +422,7 @@ CurSblimLog = WBEMConfigurationDefaults.LOG_FILE_LOCATION; } - int i = CurSblimLog.lastIndexOf(File.separatorChar); + int i = getLastSeparator(CurSblimLog); if (i == -1) { NewSblimLog.append(CurSblimLog); } else { @@ -436,7 +437,7 @@ String CurSblimLog = this.iConfiguration .getDomainProperty(WBEMConfigurationProperties.LOG_FILE_LOCATION); if (CurSblimLog != null) { - int i = CurSblimLog.lastIndexOf(File.separatorChar); + int i = getLastSeparator(CurSblimLog); if (i != -1) { NewSblimLog.insert(0, CurSblimLog.substring(0, i + 1)); } |