Ack from me.
Not tested.

I think the solution for this ticket also relates to ticket  #1313.
That ticket is about opensaf not starting in some cases when long DNs have been 
enabled in the database.
This because the LOGD gets into some problem.
That problem could be some lookup done by LOGD into the IMM that gets hit by 
the too strict check, fixed by this patch ?

/AndersBj


-----Original Message-----
From: [email protected] [mailto:[email protected]] 
Sent: den 31 juli 2015 17:25
To: Anders Björnerstedt; Zoran Milinkovic
Cc: [email protected]
Subject: [PATCH 1 of 1] imm: search for child objects must not return 
ERR_TOO_LONG when the child objects does not contain longdn [#1430]

 osaf/services/saf/immsv/immnd/ImmModel.cc |  14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)


diff --git a/osaf/services/saf/immsv/immnd/ImmModel.cc 
b/osaf/services/saf/immsv/immnd/ImmModel.cc
--- a/osaf/services/saf/immsv/immnd/ImmModel.cc
+++ b/osaf/services/saf/immsv/immnd/ImmModel.cc
@@ -10631,17 +10631,19 @@ ImmModel::searchInitialize(ImmsvOmSearch
 
         if (objectName.length() >= rootlen) {
             size_t pos = objectName.length() - rootlen;
-            if(nonExtendedNameCheck && objectName.length() >= 
SA_MAX_UNEXTENDED_NAME_LENGTH) {
-                TRACE("SEARCH_NON_EXTENDED_NAMES filter: Object name is too 
long: %s",
-                    objectName.c_str());
-                err = SA_AIS_ERR_NAME_TOO_LONG;
-                goto searchInitializeExit;
-            }
             if((objectName.rfind(rootName, pos) == pos)&&
                 (!pos //Object IS the current root
                     || !rootlen //Empty root => all objects are sub-root.
                     || (objectName[pos-1] == ',') //Root with subobject
                  )){
+
+                 if(nonExtendedNameCheck && objectName.length() >= 
SA_MAX_UNEXTENDED_NAME_LENGTH) {
+                     TRACE("SEARCH_NON_EXTENDED_NAMES filter: Object name is 
too long: %s",
+                           objectName.c_str());
+                     err = SA_AIS_ERR_NAME_TOO_LONG;
+                     goto searchInitializeExit;
+                 }
+
                 if(scope==SA_IMM_SUBTREE || checkSubLevel(objectName, pos)){
                     //Before adding the object to the result, check if there
                     //is any attribute match filter. If so check if there is a 

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

Reply via email to