osaf/libs/agents/saf/ntfa/ntfa_mds.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
When running ntftest suite, there's an issue that the messages of previous test coming after some of messages of current test. This issue can also happen in real application. The patch lowers mds priority of initialize msg so that the other messages have a chance to reach ntf server earlier. This is not a complete solution, since there could be a race condition between the other messages not just only with initialize messages. If it happens, priority of those messages can be considered in which race condition happens. diff --git a/osaf/libs/agents/saf/ntfa/ntfa_mds.c b/osaf/libs/agents/saf/ntfa/ntfa_mds.c --- a/osaf/libs/agents/saf/ntfa/ntfa_mds.c +++ b/osaf/libs/agents/saf/ntfa/ntfa_mds.c @@ -1177,7 +1177,14 @@ uint32_t ntfa_mds_msg_sync_send(ntfa_cb_ mds_info.info.svc_send.i_msg = (NCSCONTEXT)i_msg; mds_info.info.svc_send.i_to_svc = NCSMDS_SVC_ID_NTFS; mds_info.info.svc_send.i_sendtype = MDS_SENDTYPE_SNDRSP; - mds_info.info.svc_send.i_priority = MDS_SEND_PRIORITY_HIGH; /* fixme? */ + /* initialize_msg is lower priority than the others so that + * life cycle of agent will be pritorized to complete + */ + if (i_msg->info.api_info.type == NTFSV_INITIALIZE_REQ) { + mds_info.info.svc_send.i_priority = MDS_SEND_PRIORITY_MEDIUM; + } else { + mds_info.info.svc_send.i_priority = MDS_SEND_PRIORITY_HIGH; /* fixme? */ + } /* fill the sub send rsp strcuture */ mds_info.info.svc_send.info.sndrsp.i_time_to_wait = timeout; /* timeto wait in 10ms FIX!!! */ mds_info.info.svc_send.info.sndrsp.i_to_dest = cb->ntfs_mds_dest; ------------------------------------------------------------------------------ Mobile security can be enabling, not merely restricting. Employees who bring their own devices (BYOD) to work are irked by the imposition of MDM restrictions. Mobile Device Manager Plus allows you to control only the apps on BYO-devices by containerizing them, leaving personal data untouched! https://ad.doubleclick.net/ddm/clk/304595813;131938128;j _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel