Ack from me.

Best regards,
Zoran

-----Original Message-----
From: Anders Bjornerstedt [mailto:[email protected]] 
Sent: den 19 september 2014 14:36
To: [email protected]
Cc: [email protected]
Subject: [devel] [PATCH 1 of 1] IMM: Extend osafassert check in 
ImmModel::adjustEpoch [#1090]

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


The existing assert in ImmModel::adjustEpoch is extended to cover the case of 
the object pointer being NULL. This should never be the case because an entry 
in the object-map (with the DN being the key) always means the object exists in 
the immsv and thus the pointer must be valid.

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
@@ -2514,7 +2514,7 @@ ImmModel::adjustEpoch(int suggestedEpoch
     ImmAttrValueMap::iterator avi;
     ObjectInfo* immObject = NULL;
     ObjectMap::iterator oi = sObjectMap.find(immObjectDn);
-    osafassert(oi != sObjectMap.end());
+    osafassert(oi != sObjectMap.end() && oi->second);
 
     immObject = oi->second;
     avi = immObject->mAttrValueMap.find(immAttrEpoch);

------------------------------------------------------------------------------
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

------------------------------------------------------------------------------
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to