Hi Vu,

I don't think fix is required in LOG , unless we have BUG in IMM 
saImmOmInitialize()

According to  IMM spec the saImmOmFinalize() function closes the 
association represented by the
immHandle parameter between the invoking process and the IMM Service.

If the saImmOmFinalize() function completes successfully, it releases all
resources acquired when saImmOmInitialize() was called. Moreover, it 
implicitly
invokes:

• saImmOmAccessorFinalize() on all accessor handles initialized with
immHandle and not yet finalized.

-AVM


On 3/31/2017 4:37 PM, Vu Minh Nguyen wrote:
>   src/log/logd/lgs_imm.cc |  10 ++++++++--
>   1 files changed, 8 insertions(+), 2 deletions(-)
>
>
> In lgs_get_scAbsenceAllowed_attr(), did not finalize IMM OM object accessor
> handle after done getting scAbsenceAllowed.
>
> Has to finalize the accessor handle after done using.
>
> diff --git a/src/log/logd/lgs_imm.cc b/src/log/logd/lgs_imm.cc
> --- a/src/log/logd/lgs_imm.cc
> +++ b/src/log/logd/lgs_imm.cc
> @@ -3612,7 +3612,7 @@ SaUint32T *lgs_get_scAbsenceAllowed_attr
>     if (ais_rc != SA_AIS_OK) {
>       TRACE("%s\t saImmOmAccessorInitialize Fail '%s'",
>             __FUNCTION__, saf_error(ais_rc));
> -    goto done;
> +    goto done_fin_Om;
>     }
>   
>   
> @@ -3621,7 +3621,7 @@ SaUint32T *lgs_get_scAbsenceAllowed_attr
>     if (ais_rc != SA_AIS_OK) {
>       TRACE("%s\t saImmOmAccessorGet_2 Fail '%s'",
>             __FUNCTION__, saf_error(ais_rc));
> -    goto done_fin_Om;
> +    goto done_fin_ahandle;
>     }
>   
>   
> @@ -3637,6 +3637,12 @@ SaUint32T *lgs_get_scAbsenceAllowed_attr
>       }
>     }
>   
> +done_fin_ahandle:
> +  ais_rc = immutil_saImmOmAccessorFinalize(accessorHandle);
> +  if (ais_rc != SA_AIS_OK) {
> +    TRACE("%s immutil_saImmOmAccessorFinalize() Fail %d", __FUNCTION__, 
> ais_rc);
> +  }
> +
>   done_fin_Om:
>     /* Free Om resources */
>     ais_rc = immutil_saImmOmFinalize(immOmHandle);


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to