Ack,
Mathi.

> -----Original Message-----
> From: Lennart Lund [mailto:[email protected]]
> Sent: Friday, August 14, 2015 2:31 PM
> To: Mathivanan Naickan Palanivelu
> Cc: [email protected]
> Subject: [PATCH 1 of 1] log: Incorrect reading of stream configuration objects
> at startup [#1450]
> 
>  osaf/services/saf/logsv/lgs/lgs_imm.c |  16 +++++++++++++++-
>  1 files changed, 15 insertions(+), 1 deletions(-)
> 
> 
> Stream configuration IMM class has runtime attributes. Deadlock when using
> accessor get without specifying what attributes to read. Runtime attributes
> must be omitted.
> 
> diff --git a/osaf/services/saf/logsv/lgs/lgs_imm.c
> b/osaf/services/saf/logsv/lgs/lgs_imm.c
> --- a/osaf/services/saf/logsv/lgs/lgs_imm.c
> +++ b/osaf/services/saf/logsv/lgs/lgs_imm.c
> @@ -2415,6 +2415,19 @@ static SaAisErrorT stream_create_and_con
>       SaImmAttrValuesT_2 **attributes;
>       int i = 0;
>       log_stream_t *stream;
> +     char *attribute_names[] = {
> +             "saLogStreamFileName",
> +             "saLogStreamPathName",
> +             "saLogStreamMaxLogFileSize",
> +             "saLogStreamFixedLogRecordSize",
> +             "saLogStreamLogFullAction",
> +             "saLogStreamLogFullHaltThreshold",
> +             "saLogStreamMaxFilesRotated",
> +             "saLogStreamLogFileFormat",
> +             "saLogStreamSeverityFilter",
> +             "saLogStreamCreationTimestamp",
> +             NULL
> +     };
> 
>       TRACE_ENTER2("(%s)", dn);
> 
> @@ -2438,7 +2451,8 @@ static SaAisErrorT stream_create_and_con
>               stream->streamType = STREAM_TYPE_APPLICATION;
> 
>       /* Get all attributes of the object */
> -     if (immutil_saImmOmAccessorGet_2(accessorHandle, &objectName,
> NULL, &attributes) != SA_AIS_OK) {
> +     if (immutil_saImmOmAccessorGet_2(accessorHandle, &objectName,
> +                     attribute_names, &attributes) != SA_AIS_OK) {
>               LOG_ER("Configuration for %s not found",
> objectName.value);
>               rc = SA_AIS_ERR_NOT_EXIST;
>               goto done;

------------------------------------------------------------------------------
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to