certi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[certi-dev] [Possible bug?] Label synchronization inside federations


From: VANNIER Clement
Subject: [certi-dev] [Possible bug?] Label synchronization inside federations
Date: Mon, 17 Jul 2017 16:08:23 +0000

Hi,


Actually writing non regression tests for the rtig, I came across what I think is a bug, or at least an unwanted (and undocumented) behavior.


It is revolving around rtig::Federation::registerSynchronization, the second version with a set.


If a set is provided to the function, the sync label is applied to the « source » handle and to every member of the set.

However, if the set is empty, no label is applied, even to the source handle, and despite the label being registered at the federation level.


The source of this issue is here :

   for (int i = 0; i < federate_setSize; i++) {
       //...

       if ((federate_set[i] == j->second.getHandle()) || (federate == j->second.getHandle()))

            j->second.addSynchronizationLabel(label);


Unless this is a wanted behavior, I think this has to be fixed by first setting the sync label, then apply it to each member of the set.


federate.addSynchronizationLabel(label);


   for (int i = 0; i < federate_setSize; i++) {
       //...

       if ((federate_set[i] == j->second.getHandle()))

            j->second.addSynchronizationLabel(label);


A test has been written describing this behavior. If it is indeed a bug, it will be converted to fail if the behavior remains and I will fix the issue.


Best regards,

Clément Vannier

reply via email to

[Prev in Thread] Current Thread [Next in Thread]