bugCERTI - Bugs: bug #44635, Ownership acquisition messages can...

 
 

bug #44635: Ownership acquisition messages can have extra 0 attribute handles

Submitter:  Timi Tuohenmaa <timit>
Submitted:  Thu 26 Mar 2015 01:10:21 PM UTC
   
 
Category:  CERTI Severity:  * 4 - Important
Item Group:  Software error Status:  Fixed
Privacy:  Public Assigned to:  erk
Open/Closed:  Open Release:  * GIT-master
Reproducibility:  None Fixed Release:  * GIT-master
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 02 Apr 2015 12:12:54 PM UTC, comment #1: 

Thank you,

I've just pushed the fix to git master.
Eric

commit a11cc728d34a2c112bfd34415ddc1d9637618d08
Author: Eric NOULARD <eric.noulard@gmail.com>
Date:   Thu Apr 2 14:05:40 2015 +0200

Eric NOULARD <erk>
Group administrator
Thu 26 Mar 2015 01:10:21 PM UTC, original submission:  

I managed to find (and fix) a bug where it was possible to get attribute requests that had more attributes in AttributeHandleSet than should and they had values of 0.

This happens when two federates own attributes of one object and third federate requests ownerships for those attributes (in a way that one request contains attributes owned by both other federates).

Actual issue was in libCERTI/ObjectClass.cc ObjectClass::sendToOwners() function. It sets attribute size of answer to count of all attributes, but then it fills (correctly) handles that federate owns and that count is less than count of all attributes if some of the attributes are owned by other federate.

Fix is simple. Put this line
answer.setAttributesSize(index);
before sendToFederate() in that sendToOwners() function.

This problem can probably happen in other ownership related functions too as sendToOwners is used in them.

This similar thing is done in numerous places in code, but apparently forgotten here.

Timi Tuohenmaa <timit>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by erk (Posted a comment)
  • -email is unavailable- added by timit (Submitted the item)
  •  

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-04-02 erk StatusNone Fixed
        Assigned toNone erk
        ReleaseCVS GIT-master
        Fixed ReleaseUnknown GIT-master

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code