I forgot.... ack from me.

Thanks,
Zoran

-----Original Message-----
From: Zoran Milinkovic 
Sent: Tuesday, March 29, 2016 3:09 PM
To: 'reddy.neelaka...@oracle.com'; Hung Duc Nguyen
Cc: opensaf-devel@lists.sourceforge.net
Subject: RE: [PATCH 1 of 1] imm: honour return code when ncs_sel_obj_create is 
called in imm initialize [#1713]

Hi Neelakanta,

Reviewed the patch.
I agree with Hung's comments.

Thanks,
Zoran

-----Original Message-----
From: reddy.neelaka...@oracle.com [mailto:reddy.neelaka...@oracle.com] 
Sent: Tuesday, March 29, 2016 12:04 PM
To: Zoran Milinkovic; Hung Duc Nguyen
Cc: opensaf-devel@lists.sourceforge.net
Subject: [PATCH 1 of 1] imm: honour return code when ncs_sel_obj_create is 
called in imm initialize [#1713]

 osaf/libs/agents/saf/imma/imma_init.c |  16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)


diff --git a/osaf/libs/agents/saf/imma/imma_init.c 
b/osaf/libs/agents/saf/imma/imma_init.c
--- a/osaf/libs/agents/saf/imma/imma_init.c
+++ b/osaf/libs/agents/saf/imma/imma_init.c
@@ -59,7 +59,7 @@ IMMA_CB imma_cb;
    Code cloned from CkpSv. 
 **********************************************************************/
 
-static void imma_sync_with_immnd(IMMA_CB *cb)
+static uint32_t imma_sync_with_immnd(IMMA_CB *cb)
 {
        TRACE_ENTER();
 
@@ -68,11 +68,13 @@ static void imma_sync_with_immnd(IMMA_CB
        if (cb->is_immnd_up)
        {
                m_NCS_UNLOCK(&cb->immnd_sync_lock,NCS_LOCK_WRITE);
-               return;
+               return NCSCC_RC_SUCCESS;
        }
        TRACE("Blocking first client");
        cb->immnd_sync_awaited = true;
-       m_NCS_SEL_OBJ_CREATE(&cb->immnd_sync_sel);
+       if(m_NCS_SEL_OBJ_CREATE(&cb->immnd_sync_sel) != NCSCC_RC_SUCCESS){
+               return NCSCC_RC_FAILURE;
+       }
        m_NCS_UNLOCK(&cb->immnd_sync_lock,NCS_LOCK_WRITE);
 
        /* Await indication from MDS saying IMMND is up */ @@ -88,7 +90,7 @@ 
static void imma_sync_with_immnd(IMMA_CB
        m_NCS_UNLOCK(&cb->immnd_sync_lock, NCS_LOCK_WRITE);
 
        TRACE_LEAVE();
-       return;
+       return NCSCC_RC_SUCCESS;
 }
 
 
@@ -162,8 +164,10 @@ static uint32_t imma_create(NCSMDS_SVC_I
                goto mds_reg_fail;
        }
 
-       imma_sync_with_immnd(cb); /* Needed to prevent endless TRY_AGAIN loop
-                                                                for first 
client. */
+       if (imma_sync_with_immnd(cb) != NCSCC_RC_SUCCESS) {
+               /* Needed to prevent endless TRY_AGAIN loop for first client. 
*/ 
+               goto mds_reg_fail;
+       }
 
        /* EDU initialisation ABT: Dont exactly know why we need this but... */
        if (m_NCS_EDU_HDL_INIT(&cb->edu_hdl) != NCSCC_RC_SUCCESS) {

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to