From: Chris B. <buc...@us...> - 2012-02-13 22:49:01
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv6009 Modified Files: interopProvider.c ChangeLog NEWS Log Message: [ 3485830 ] SFCB Makes Redundant ActivateFilter Calls Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.633 retrieving revision 1.634 diff -u -d -r1.633 -r1.634 --- NEWS 11 Feb 2012 19:43:56 -0000 1.633 +++ NEWS 13 Feb 2012 22:48:59 -0000 1.634 @@ -24,6 +24,7 @@ - 3483294 InternalProvider Should Handle SFCB_RegisteredProfile - 3485438 segfault while retrying to deliver an indication - 3486814 sfcb crashes while freeing the cimxml response +- 3485830 SFCB Makes Redundant ActivateFilter Calls Changes in 1.3.13 ================= Index: interopProvider.c =================================================================== RCS file: /cvsroot/sblim/sfcb/interopProvider.c,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- interopProvider.c 4 Feb 2012 01:03:31 -0000 1.50 +++ interopProvider.c 13 Feb 2012 22:48:59 -0000 1.51 @@ -590,24 +590,29 @@ CMSetProperty((CMPIInstance *)ci, "SubscriptionStartTime", &dt, 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); - } - } else { - /* property not set, assume "enable" by default */ - val.uint16 = 2; - st = CMSetProperty((CMPIInstance*)ci, "SubscriptionState", &val, CMPI_uint16); + /* 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 */ + val.uint16 = 2; + st = CMSetProperty((CMPIInstance*)ci, "SubscriptionState", &val, CMPI_uint16); + if (fi->useCount == 1) { + fowardSubscription(ctx, fi, OPS_EnableIndications, &st); + } + } + } _SFCB_RETURN(st); } Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.710 retrieving revision 1.711 diff -u -d -r1.710 -r1.711 --- ChangeLog 11 Feb 2012 19:44:20 -0000 1.710 +++ ChangeLog 13 Feb 2012 22:48:59 -0000 1.711 @@ -1,3 +1,8 @@ +2012-02-13 Chris Buccella <buc...@li...> + + * interopProvider.c + [ 3485830 ] SFCB Makes Redundant ActivateFilter Calls + 2012-02-11 Narasimha Sharoff <nsh...@us...> * cimXmlParser.c |