From: Chris B. <buc...@us...> - 2012-04-02 20:50:26
|
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 573a60bec68c3c0113b3a27809423cccf92d4e4d (commit) from 4341649409e43df07f647d6e2d1b4b044b6cedb2 (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 573a60bec68c3c0113b3a27809423cccf92d4e4d Author: buccella <buc...@li...> Date: Mon Apr 2 16:50:23 2012 -0400 [ 3485830 ] SFCB Makes Redundant ActivateFilter Calls ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 3051bfb..035039e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-04-02 Chris Buccella <buc...@li...> + + * interopProvider.c: + [ 3485830 ] SFCB Makes Redundant ActivateFilter Calls + 2012-03-29 Chris Buccella <buc...@li...> * providerDrv.c: diff --git a/NEWS b/NEWS index e7cf262..eb22b0c 100644 --- a/NEWS +++ b/NEWS @@ -129,6 +129,7 @@ Bugs Fixed: - 3487419 TestIndication Provider Does Not Enable Correctly - 3441028 sblim-sfcb fails on large https requests - 3416054 Provider continues despite SIGSEGV +- 3485830 SFCB Makes Redundant ActivateFilter Calls Changes in 1.3.13 ================= diff --git a/interopProvider.c b/interopProvider.c index be285ca..1e8b3d8 100644 --- a/interopProvider.c +++ b/interopProvider.c @@ -705,26 +705,28 @@ processSubscription(const CMPIBroker * broker, CMPI_dateTime); su = addSubscription(ci, skey, fi, ha); - fowardSubscription(ctx, fi, OPS_ActivateFilter, &st); - if (st.rc != CMPI_RC_OK) - removeSubscription(su, skey); - // activation succesful, try to enable it - else { - // check property - CMPIData d = CMGetProperty(ci, "SubscriptionState", &st); - if (d.state == CMPI_goodValue) { - if (d.value.uint16 == 2) { // ==enabled - fowardSubscription(ctx, fi, OPS_EnableIndications, &st); - } + /* send Activate filter request only if we haven't aleady */ + if (fi->useCount == 1) { + fowardSubscription(ctx, fi, OPS_ActivateFilter, &st); + if (st.rc != CMPI_RC_OK) removeSubscription(su, skey); + } + + /* activation succesful, try to enable it */ + if (st.rc == CMPI_RC_OK) { + /* only enable if state is 2 (default) */ + CMPIData d = CMGetProperty(ci, "SubscriptionState", &st); + if(d.state == CMPI_goodValue) { + if(d.value.uint16 == 2 && fi->useCount == 1) { + fowardSubscription(ctx, fi, OPS_EnableIndications, &st); + } } else { - /* - * property not set, assume "enable" by default - */ + /* property not set, assume "enable" by default */ val.uint16 = 2; - st = CMSetProperty((CMPIInstance *) ci, "SubscriptionState", &val, - CMPI_uint16); - fowardSubscription(ctx, fi, OPS_EnableIndications, &st); + st = CMSetProperty((CMPIInstance*)ci, "SubscriptionState", &val, CMPI_uint16); + if (fi->useCount == 1) { + fowardSubscription(ctx, fi, OPS_EnableIndications, &st); + } } } hooks/post-receive -- SFCB - Small Footprint CIM Broker |