Skip to content

Commit

Permalink
#1867 Event logger ensures from identifier is the radio ID and not th…
Browse files Browse the repository at this point in the history
…e system transmitted radio alias. (#2050)

Co-authored-by: Dennis Sheirer <[email protected]>
  • Loading branch information
DSheirer and Dennis Sheirer authored Oct 27, 2024
1 parent 9e01cc4 commit 486ac01
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,29 +100,29 @@ private String toCSV(IDecodeEvent event)
cells.add(event.getProtocol());
cells.add(event.getEventType());

List<Identifier> fromIdentifiers = event.getIdentifierCollection().getIdentifiers(Role.FROM);
if(fromIdentifiers != null && !fromIdentifiers.isEmpty())
Identifier fromIdentifier = event.getIdentifierCollection().getFromIdentifier();
if(fromIdentifier != null)
{
cells.add(fromIdentifiers.get(0));
cells.add(fromIdentifier);
}
else
{
cells.add("");
}

List<Identifier> toIdentifiers = event.getIdentifierCollection().getIdentifiers(Role.TO);
Identifier toIdentifier = event.getIdentifierCollection().getToIdentifier();

if(toIdentifiers != null && !toIdentifiers.isEmpty())
if(toIdentifier != null)
{
Identifier identifier = event.getIdentifierCollection()
.getIdentifier(IdentifierClass.CONFIGURATION,Form.ALIAS_LIST,Role.ANY);
mAliasList = mAliasModel.getAliasList((AliasListConfigurationIdentifier)identifier);

if(mAliasList != null)
{
String mystring = (!mAliasList.getAliases(toIdentifiers.get(0)).isEmpty()) ?
mAliasList.getAliases(toIdentifiers.get(0)).get(0).toString() : "";
cells.add(mystring + " (" + toIdentifiers.get(0) + ")");
String mystring = (!mAliasList.getAliases(toIdentifier).isEmpty()) ?
mAliasList.getAliases(toIdentifier).toString() : "";
cells.add(mystring + " (" + toIdentifier + ")");
}
else
{
Expand Down

0 comments on commit 486ac01

Please sign in to comment.