osaf/libs/agents/saf/imma/imma_mds.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)


The variable is_immnd_up is read in API calls without holding a lock. In the
MDS IMMND UP callback it was set to true _before_ registration with the "auth
 server". This could allow clients sitting in a TRYAGAIN loop to proceed before
auth server registration has finished.

Auth server registration is now done before setting is_immnd_up to true.

diff --git a/osaf/libs/agents/saf/imma/imma_mds.c 
b/osaf/libs/agents/saf/imma/imma_mds.c
--- a/osaf/libs/agents/saf/imma/imma_mds.c
+++ b/osaf/libs/agents/saf/imma/imma_mds.c
@@ -419,9 +419,6 @@ static uint32_t imma_mds_svc_evt(IMMA_CB
 
                case NCSMDS_UP:
                        TRACE_3("IMMND UP");
-                       
m_NCS_LOCK(&cb->immnd_sync_lock,NCS_LOCK_WRITE);/*special sync lock*/
-                       cb->is_immnd_up = true;
-                       cb->immnd_mds_dest = svc_evt->i_dest;
 
                        /* (Re-)connect and register our MDS dest with auth 
server in immnd */
                        if (mds_auth_server_connect(sockname,
@@ -430,6 +427,10 @@ static uint32_t imma_mds_svc_evt(IMMA_CB
                                LOG_WA("%s: mds_auth_server_connect failed", 
__FUNCTION__);
                        }
 
+                       
m_NCS_LOCK(&cb->immnd_sync_lock,NCS_LOCK_WRITE);/*special sync lock*/
+                       cb->immnd_mds_dest = svc_evt->i_dest;
+                       cb->is_immnd_up = true;
+
                        if (cb->immnd_sync_awaited == true)
                                m_NCS_SEL_OBJ_IND(&cb->immnd_sync_sel);
                        
m_NCS_UNLOCK(&cb->immnd_sync_lock,NCS_LOCK_WRITE);/*special sync lock*/

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to