From: Michael Chase-S. <mc...@us...> - 2012-04-03 21:05:59
|
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 c4f1e693534731ad2dda92ec5ab09c496f18e887 (commit) via e679fcb9698340055068726d1cb08b1e6714f7fc (commit) from 9485c3a9baaf59453dec79496073d45da8b1cc52 (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 c4f1e693534731ad2dda92ec5ab09c496f18e887 Author: Michael Chase-Salerno <br...@li...> Date: Tue Apr 3 17:05:37 2012 -0400 [ 3512425 ] SequenceContext needs to be set at startup commit e679fcb9698340055068726d1cb08b1e6714f7fc Author: Michael Chase-Salerno <br...@li...> Date: Tue Apr 3 17:03:19 2012 -0400 [ 3512425 ] SequenceContext needs to be set at startup ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 5922c5b..373deb1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-04-03 Michael Chase-Salerno <br...@li...> + + * interopProvider.c: + [ 3512425 ] SequenceContext needs to be set at startup + 2012-04-03 Chris Buccella <buc...@li...> * Makefile.am, configure.ac, default.reg.in, profileProvider.c, @@ -6,14 +11,14 @@ 2012-04-02 Narasimha Sharoff <nsh...@us...> - * indCIMXMLHandler.c: - [ 3485438 ] Segfault while retrying to deliver an indication + * indCIMXMLHandler.c: + [ 3485438 ] Segfault while retrying to deliver an indication - * sfcBroker.c: - [ 3462309 ] Do not allow multiple instances of sfcb + * sfcBroker.c: + [ 3462309 ] Do not allow multiple instances of sfcb - * cimXmlParser.c: - [ 3486814 ] sfcb crashes while freeing the cimxml response + * cimXmlParser.c: + [ 3486814 ] sfcb crashes while freeing the cimxml response 2012-04-02 Michael Chase-Salerno <br...@li...> diff --git a/NEWS b/NEWS index 4396020..ef47b90 100644 --- a/NEWS +++ b/NEWS @@ -132,6 +132,7 @@ Bugs Fixed: - 3505407 Client openlog changes settings - 3485830 SFCB Makes Redundant ActivateFilter Calls - 3483294 InternalProvider Should Handle SFCB_RegisteredProfile +- 3512425 SequenceContext needs to be set at startup Changes in 1.3.13 ================= diff --git a/interopProvider.c b/interopProvider.c index 1e8b3d8..e066599 100644 --- a/interopProvider.c +++ b/interopProvider.c @@ -795,12 +795,33 @@ initInterOp(const CMPIBroker * broker, const CMPIContext *ctx) enm = _broker->bft->enumerateInstances(_broker, ctx, op, NULL, &st); if (enm) { + // Get the IndicationService name for SequenceContext migration + CMPIObjectPath * isop = CMNewObjectPath(_broker, "root/interop", "CIM_IndicationService", NULL); + CMPIEnumeration * isenm = _broker->bft->enumerateInstances(_broker, ctx, isop, NULL, NULL); + CMPIData isinst = CMGetNext(isenm, NULL); + CMPIData mc = CMGetProperty(isinst.value.inst, "Name", NULL); + CMPIData ld; + // Loop through all the listeners + int ldcount=0; + char context[100]; while (enm->ft->hasNext(enm, &st) && (ci = (enm->ft->getNext(enm, &st)).value.inst)) { cop = CMGetObjectPath(ci, &st); if (RIEnabled) { - // Reset the sequence numbers on sfcb restart + // check and set context for migrated listeners. CMPIInstance *ldi = _broker->bft->getInstance(_broker, ctxLocal, cop, NULL, NULL); + ld = CMGetProperty(ldi, "SequenceContext", NULL); + if (ld.state != CMPI_goodValue) { + _SFCB_TRACE(1,("--- adding SequenceContext to migrated cim_listenerdestination")); + // build and set the context string, we can't know the actual creation + // time, so just use SFCB start time + index. + ldcount++; + sprintf (context,"%s#%sM%d#",mc.value.string->ft->getCharPtr(mc.value.string,NULL),sfcBrokerStart,ldcount); + CMPIValue scontext; + scontext.string = sfcb_native_new_CMPIString(context, NULL, 0); + CMSetProperty(ldi, "SequenceContext", &scontext, CMPI_string); + } + // Reset the sequence numbers on sfcb restart CMPIValue zarro = {.sint64 = -1 }; CMSetProperty(ldi, "LastSequenceNumber", &zarro, CMPI_sint64); CBModifyInstance(_broker, ctxLocal, cop, ldi, NULL); hooks/post-receive -- SFCB - Small Footprint CIM Broker |