The basic reason for returning SA_AIS_ERR_VERSION(3) from non-registered after 
finalise is that in Finalize(), pend_dis is zero  and ncs_ava_shutdown() is 
called, which in turn call ncs_ava_shutdown()->ava_destroy(). ava_destroy() 
deletes cb and makes gl_ava_hdl zero.
So, when ComponentErrorReport_4() is called ava_B4_ver_used(0) returns zero 
because neither cb nor gl_ava_hdl exists and then the following code returns 
SA_AIS_ERR_VERSION:
  /* Version is previously set in in initialize function */
  if (!ava_B4_ver_used(0)) {
    TRACE_2(
        "Invalid AMF version, set correct AMF version using saAmfInitialize_4. "
        "Required version is: ReleaseCode = 'B', majorVersion = 0x04");
    rc = SA_AIS_ERR_VERSION;
    goto done;
  }

WHen called from registered process in Dispatch context, pend_dis is not zero 
and ncs_ava_shutdown() is not called and hence ava_B4_ver_used(0) returns true 
and code proceeds and returns BAD_HANDLE from later point of call.


---

** [tickets:#248] "amf: Incorrect return code from saAmfComponentErrorReport_4 
() and saAmfComponentErrorClear_4()". **

**Status:** assigned
**Milestone:** 5.2.FC
**Created:** Thu May 16, 2013 06:41 AM UTC by Praveen
**Last Updated:** Wed Jul 19, 2017 06:41 AM UTC
**Owner:** Nagendra Kumar


Migrated from http://devel.opensaf.org/ticket/2817.

Changeset:3728
 When saAmfComponentErrorReport_4() and saAmfComponentErrorClear_4() are called 
after finalizing the amfHandle(calling saAmfFinalize()), both of them returns 
SA_AIS_ERR_VERSION instead of SA_AIS_ERR_BAD_HANDLE.



---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to