Ack with minor comments inline. 782 is needed to verify this patch, please review asap. It has critical severity! /Hans
> -----Original Message----- > From: [email protected] [mailto:[email protected]] > Sent: den 13 februari 2014 10:19 > To: Hans Feldt; Hans Nordebäck; [email protected]; > [email protected] > Cc: [email protected] > Subject: [PATCH 1 of 1] amf: add check for middleware component for automatic > comp instantiation and deletion [#780] > > osaf/services/saf/amf/amfd/comp.cc | 4 +++- > osaf/services/saf/amf/amfnd/compdb.cc | 34 > ++++++++++++++++++---------------- > 2 files changed, 21 insertions(+), 17 deletions(-) > > > diff --git a/osaf/services/saf/amf/amfd/comp.cc > b/osaf/services/saf/amf/amfd/comp.cc > --- a/osaf/services/saf/amf/amfd/comp.cc > +++ b/osaf/services/saf/amf/amfd/comp.cc > @@ -228,7 +228,9 @@ static void comp_add_to_model(AVD_COMP * > are added, it is sent to Amfnd for instantiation and Amfnd > instantiates it. Amfnd has capability for finding which component > has been added newly. */ > - if ((su->saAmfSUAdminState != SA_AMF_ADMIN_LOCKED_INSTANTIATION) && > + /* Allow this only for middleware component to support older campaign to > + work for application in compatible manner.*/ merge above comment blocks into one, change "this" into e.g. "live component instantiation" > + if ((su->sg_of_su->sg_ncs_spec == true) && (su->saAmfSUAdminState != > SA_AMF_ADMIN_LOCKED_INSTANTIATION) && Add line break after first logical expr, line got too long > (su->saAmfSUPresenceState == > SA_AMF_PRESENCE_INSTANTIATED) && > (avd_cb->avail_state_avd == SA_AMF_HA_ACTIVE)) { > AVD_AVND *node = su->su_on_node; > diff --git a/osaf/services/saf/amf/amfnd/compdb.cc > b/osaf/services/saf/amf/amfnd/compdb.cc > --- a/osaf/services/saf/amf/amfnd/compdb.cc > +++ b/osaf/services/saf/amf/amfnd/compdb.cc > @@ -851,23 +851,25 @@ uint32_t avnd_comp_oper_req(AVND_CB *cb, > param->name.value); > goto done; > } > + if (comp->su->is_ncs == true) { > + /* Terminate the pi comp. It will terminate the > + component and delete the comp record. */ > + if (m_AVND_COMP_TYPE_IS_PREINSTANTIABLE(comp) && > + (comp->pres == > SA_AMF_PRESENCE_INSTANTIATED)) { > + comp->pending_delete = true; > + rc = avnd_comp_clc_fsm_run(cb, comp, > + > AVND_COMP_CLC_PRES_FSM_EV_TERM); > + goto done; > + } > > - /* Terminate the pi comp. It will terminate the > - component and delete the comp record. */ > - if (m_AVND_COMP_TYPE_IS_PREINSTANTIABLE(comp) && > (comp->pres == > SA_AMF_PRESENCE_INSTANTIATED)) { > - comp->pending_delete = true; > - rc = avnd_comp_clc_fsm_run(cb, comp, > - AVND_COMP_CLC_PRES_FSM_EV_TERM); > - goto done; > - } > - > - /* Terminate the Npi comp. After deleting the csi, comp > - will be already terminated, so we just want to delete > - the comp record.*/ > - if (!m_AVND_COMP_TYPE_IS_PREINSTANTIABLE(comp)) { > - m_AVND_SEND_CKPT_UPDT_ASYNC_RMV(cb, comp, > AVND_CKPT_COMP_CONFIG); > - rc = avnd_compdb_rec_del(cb, ¶m->name); > - goto done; > + /* Terminate the Npi comp. After deleting the > csi, comp > + will be already terminated, so we just want > to delete > + the comp record.*/ > + if (!m_AVND_COMP_TYPE_IS_PREINSTANTIABLE(comp)) > { > + m_AVND_SEND_CKPT_UPDT_ASYNC_RMV(cb, > comp, AVND_CKPT_COMP_CONFIG); > + rc = avnd_compdb_rec_del(cb, > ¶m->name); > + goto done; > + } > } > /* Delete the component in case, it is in term failed > or so. */ > m_AVND_SEND_CKPT_UPDT_ASYNC_RMV(cb, comp, > AVND_CKPT_COMP_CONFIG); ------------------------------------------------------------------------------ Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
