Ack (Reviewed only). Thanks -Nagu
> -----Original Message----- > From: Praveen Malviya > Sent: 15 January 2015 14:54 > To: [email protected]; Nagendra Kumar > Cc: [email protected] > Subject: [PATCH 1 of 1] amfd: adjust rank of all csis in SI if csidep is > deleted > [#1240] > > osaf/services/saf/amf/amfd/csi.cc | 17 +++++++++++------ > 1 files changed, 11 insertions(+), 6 deletions(-) > > > Before unlock and unlock-in operation, user deletes CSI dependency via CCB > modification. After this when unlock-in and unlock operations are performed, > AMF did not give callback to components for some CSIs. > > While deleting CSI dependency, AMF assigns rank 1 to the deleted CSI in SI > if this CSI has no further sponsor. But AMF is not cheking if this CSI > is sponsor to some other CSI recursively. Due to this there was no CSI with > rank 2 in this SI when this CSI of rank 2 was deleted. Now AMFND assigns CSI > of rank r+1 when csi of rank r is assigned. Since there was no CSI with rank > 2, > AMFND skipped assignments when CSI of rank 1 was assigned assuming there > are > no further CSIs to be assigned. Thus CSI of rank 3 remained unassigned. So > deletion > of CSI dependency requires recalculation of ranks of all the CSIs in SI. > > Patch fixed the problem by performing recalculation of ranks of all CSIs in a > SI when CSI dependency is deleted through CCB modification. > > diff --git a/osaf/services/saf/amf/amfd/csi.cc > b/osaf/services/saf/amf/amfd/csi.cc > --- a/osaf/services/saf/amf/amfd/csi.cc > +++ b/osaf/services/saf/amf/amfd/csi.cc > @@ -882,12 +882,17 @@ static void csi_ccb_apply_modify_hdlr(st > assert(attr_mod->modAttr.attrValuesNumber > == 1); > const SaNameT *required_dn = (SaNameT*) > attr_mod->modAttr.attrValues[0]; > csi_remove_csidep(csi, required_dn); > - si->remove_csi(csi); > - if (csi->saAmfCSIDependencies == NULL) > - csi->rank = 1; // indicate that there is > no dep to another CSI > - else > - csi->rank = 0; // indicate that add_csi > should recalculate rank > - si->add_csi(csi); > + > + //Mark rank of all the CSIs to 0. > + for (AVD_CSI *tmp_csi = > csi->si->list_of_csi; tmp_csi; > + tmp_csi = > tmp_csi->si_list_of_csi_next) { > + tmp_csi->rank = 0;// indicate that > there is a dep to another CSI > + } > + //Rearrange Rank of all the CSIs now. > + for (AVD_CSI *tmp_csi = > csi->si->list_of_csi; tmp_csi; > + tmp_csi = > tmp_csi->si_list_of_csi_next) { > + tmp_csi->si- > >arrange_dep_csi(tmp_csi); > + } > } else > assert(0); > } else { ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
