Additional patch that resets the 'csi->single_csi_add_rem_in_si' state in case
of CSI add for PI SU.
Should be merged with the first "add" patch.
(I really don't like functions like avnd_comp_csi_assign_done that takes a pointer and does different things if the
pointer is NULL or not. Should be refactored into two functions!)
/Hans
On 11/07/2013 09:22 PM, Hans Feldt wrote:
osaf/services/saf/avsv/avnd/avnd_susm.c | 41 +++++++++++++++++++++++++++++++-
1 files changed, 39 insertions(+), 2 deletions(-)
# HG changeset patch
# Parent 14a6b2a46df025cd5be8d0a62415e18001287784
diff -r 14a6b2a46df0 osaf/services/saf/avsv/avnd/avnd_comp.c
--- a/osaf/services/saf/avsv/avnd/avnd_comp.c Thu Nov 07 21:17:11 2013 +0100
+++ b/osaf/services/saf/avsv/avnd/avnd_comp.c Mon Nov 11 09:47:11 2013 +0100
@@ -1533,13 +1533,21 @@
******************************************************************************/
uint32_t avnd_comp_csi_assign_done(AVND_CB *cb, AVND_COMP *comp, AVND_COMP_CSI_REC *csi)
{
- AVND_COMP_CSI_REC *curr_csi = 0;
+ AVND_COMP_CSI_REC *curr_csi;
uint32_t rc = NCSCC_RC_SUCCESS;
- char *csiname = csi ? (char*)csi->name.value : "all CSIs";
-
- TRACE_ENTER2("comp: '%s'", comp->name.value);
-
- curr_csi = (csi) ? csi : m_AVND_CSI_REC_FROM_COMP_DLL_NODE_GET(m_NCS_DBLIST_FIND_FIRST(&comp->csi_list));
+ const char *csiname;
+
+ TRACE_ENTER2("'%s', %p", comp->name.value, csi);
+
+ if (csi != NULL) {
+ csi->single_csi_add_rem_in_si = AVSV_SUSI_ACT_BASE;
+ curr_csi = csi;
+ csiname = (char*)csi->name.value;
+ } else {
+ curr_csi = m_AVND_CSI_REC_FROM_COMP_DLL_NODE_GET(m_NCS_DBLIST_FIND_FIRST(&comp->csi_list));
+ csiname = "all CSIs";
+ }
+
LOG_IN("Assigned '%s' %s to '%s'", csiname, ha_state[curr_csi->si->curr_state], comp->name.value);
/*
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel