[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[certi-cvs] certi/libCERTI ObjectClass.cc ObjectClassSet.cc
From: |
certi-cvs |
Subject: |
[certi-cvs] certi/libCERTI ObjectClass.cc ObjectClassSet.cc |
Date: |
Mon, 11 Apr 2011 11:44:11 +0000 |
CVSROOT: /sources/certi
Module name: certi
Changes by: Eric NOULARD <erk> 11/04/11 11:44:11
Modified files:
libCERTI : ObjectClass.cc ObjectClassSet.cc
Log message:
fix bug #32994 : unconditionalAttributeOwnershipDivestiture results in
RTIG crash
Sligtly modified version of the patch provided by Eugene.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectClass.cc?cvsroot=certi&r1=3.85&r2=3.86
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectClassSet.cc?cvsroot=certi&r1=3.52&r2=3.53
Patches:
Index: ObjectClass.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/ObjectClass.cc,v
retrieving revision 3.85
retrieving revision 3.86
diff -u -b -r3.85 -r3.86
--- ObjectClass.cc 11 Apr 2011 11:14:15 -0000 3.85
+++ ObjectClass.cc 11 Apr 2011 11:44:11 -0000 3.86
@@ -19,7 +19,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: ObjectClass.cc,v 3.85 2011/04/11 11:14:15 erk Exp $
+// $Id: ObjectClass.cc,v 3.86 2011/04/11 11:44:11 erk Exp $
// ----------------------------------------------------------------------------
#include "Object.hh"
@@ -1209,17 +1209,21 @@
RTIinternalError)
{
// Pre-conditions checking
- // Do all attribute handles exist ? It may throw AttributeNotDefined.
- for (unsigned index = 0 ; index < theAttributeList.size() ; index++)
+ // Do all attribute handles exist?
+ // If not then AttributeNotDefined will be thrown.
+ for (unsigned index = 0 ; index < theAttributeList.size() ; index++) {
getAttribute(theAttributeList[index]);
+ }
- //Le federe est-il proprietaire de tous les attributs
+ // Is the federate the owner of all the attributes?
ObjectAttribute * oa ;
for (unsigned i = 0 ; i < theAttributeList.size() ; i++) {
oa = object->getAttribute(theAttributeList[i]);
-
if (oa->getOwner() != theFederateHandle)
- throw AttributeNotOwned("");
+ throw AttributeNotOwned(stringize() << "federate <"
+ << theFederateHandle
+ << "> not owner of attribute <"
+ << oa->getHandle()<<">, it
is=<"<<oa->getOwner()<<">.");
}
int compteur_assumption = 0 ;
@@ -1284,8 +1288,9 @@
broadcastClassMessage(List);
}
- else
- delete AnswerAssumption ;
+ else {
+ delete AnswerAssumption;
+ }
if (compteur_acquisition != 0) {
NM_Attribute_Ownership_Acquisition_Notification AOAN;
@@ -1670,4 +1675,4 @@
} // namespace certi
-// $Id: ObjectClass.cc,v 3.85 2011/04/11 11:14:15 erk Exp $
+// $Id: ObjectClass.cc,v 3.86 2011/04/11 11:44:11 erk Exp $
Index: ObjectClassSet.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/ObjectClassSet.cc,v
retrieving revision 3.52
retrieving revision 3.53
diff -u -b -r3.52 -r3.53
--- ObjectClassSet.cc 19 Mar 2010 13:54:03 -0000 3.52
+++ ObjectClassSet.cc 11 Apr 2011 11:44:11 -0000 3.53
@@ -19,7 +19,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: ObjectClassSet.cc,v 3.52 2010/03/19 13:54:03 erk Exp $
+// $Id: ObjectClassSet.cc,v 3.53 2011/04/11 11:44:11 erk Exp $
// ----------------------------------------------------------------------------
// Project
@@ -560,6 +560,7 @@
// Broadcast ReflectAttributeValues message recursively
currentClass = objectClass->getSuperclass();
+ if (ocbList != NULL) {
while (currentClass != 0) {
D.Out(pdProtocol,
"Broadcasting UAOD msg to parent class %d for instance %d.",
@@ -568,12 +569,11 @@
// It may throw ObjectClassNotDefined
objectClass = getObjectFromHandle(currentClass);
objectClass->broadcastClassMessage(ocbList);
-
currentClass = objectClass->getSuperclass();
}
-
delete ocbList ;
-}
+ }
+} /* end of unconditionalAttributeOwnershipDivestiture */
// ----------------------------------------------------------------------------
//! attributeOwnershipAcquisition.
@@ -634,4 +634,4 @@
} // namespace certi
-// $Id: ObjectClassSet.cc,v 3.52 2010/03/19 13:54:03 erk Exp $
+// $Id: ObjectClassSet.cc,v 3.53 2011/04/11 11:44:11 erk Exp $
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [certi-cvs] certi/libCERTI ObjectClass.cc ObjectClassSet.cc,
certi-cvs <=