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