Reviewed, but not tested. Ack from me. One comment not related to the ticket. Looking at the code after this change, "while" loop can be improved, and save some time in execution. "while(1)" can be replaced with "while(callback)", then "if (callback) {" and the false branch are not needed. With this small change, unnecessary lock/unlock and table lookup can be skipped if the first "callback" is NULL.
Best regards, Zoran -----Original Message----- From: reddy.neelaka...@oracle.com [mailto:reddy.neelaka...@oracle.com] Sent: den 4 september 2014 15:19 To: Anders Björnerstedt; Zoran Milinkovic; surender.khethav...@oracle.com Cc: opensaf-devel@lists.sourceforge.net Subject: [PATCH 1 of 1] imm:Return AIS_OK when m_NCS_IPC_RECEIVE receives NULL in dispatch block[#937] osaf/libs/agents/saf/imma/imma_proc.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) callbk_mbx can fail only when handle is finalized.If a NULL is returned by m_NCS_IPC_RECEIVE then handle is considered as finalized and is a valid case.so, SA_AIS_OK will be returned*/ diff --git a/osaf/libs/agents/saf/imma/imma_proc.c b/osaf/libs/agents/saf/imma/imma_proc.c --- a/osaf/libs/agents/saf/imma/imma_proc.c +++ b/osaf/libs/agents/saf/imma/imma_proc.c @@ -1758,7 +1758,11 @@ uint32_t imma_hdl_callbk_dispatch_block( } } else { m_NCS_UNLOCK(&cb->cb_lock, NCS_LOCK_WRITE); - return SA_AIS_ERR_LIBRARY; + /* callbk_mbx can fail only when handle is finalized + If a NULL is returned by m_NCS_IPC_RECEIVE then handle is + considered as finalized and is a valid case. + so, SA_AIS_OK will be returned*/ + return SA_AIS_OK; } callback = (IMMA_CALLBACK_INFO *)m_NCS_IPC_RECEIVE(callbk_mbx, NULL); ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel