Clear frequency band map when switching P25 control channels (#2404)

This commit is contained in:
Uğur Tafralı
2026-07-12 13:21:44 +03:00
committed by GitHub
parent b385a42b63
commit cbbbe3a131
2 changed files with 2 additions and 8 deletions

View File

@@ -199,6 +199,7 @@ public class P25TrafficChannelManager extends TrafficChannelManager implements I
mTS1ChannelGrantEventMap.clear();
mTS2ChannelGrantEventMap.clear();
mFrequencyBandMap.clear();
//Remove the control channel from the previous frequency
mAllocatedTrafficChannelMap.remove(previous);

View File

@@ -330,14 +330,7 @@ public class P25P1MessageProcessor implements Listener<IMessage>
if(message instanceof IFrequencyBand)
{
IFrequencyBand bandIdentifier = (IFrequencyBand)message;
//Only store the frequency band if it's new so we don't hold on to more than one instance of the
//frequency band message. Otherwise, we'll hold on to several instances of each message as they get
//injected into other messages with channel information.
if(!mFrequencyBandMap.containsKey(bandIdentifier.getIdentifier()))
{
mFrequencyBandMap.put(bandIdentifier.getIdentifier(), bandIdentifier);
}
mFrequencyBandMap.put(bandIdentifier.getIdentifier(), bandIdentifier);
}
}