mirror of
https://github.com/craigerl/aprsd.git
synced 2025-07-18 08:15:16 -04:00
Fixed issue not processing null msg ids
Fixed a problem where we weren't sending packets with no msg id to process.
This commit is contained in:
parent
e8ae3807db
commit
a17b80ddd8
@ -11,6 +11,7 @@ from aprsd.client import client_factory
|
|||||||
from aprsd.packets import collector
|
from aprsd.packets import collector
|
||||||
from aprsd.packets import log as packet_log
|
from aprsd.packets import log as packet_log
|
||||||
from aprsd.threads import APRSDThread, tx
|
from aprsd.threads import APRSDThread, tx
|
||||||
|
from aprsd.utils import trace
|
||||||
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
@ -92,6 +93,7 @@ class APRSDDupeRXThread(APRSDRXThread):
|
|||||||
to be processed.
|
to be processed.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@trace.trace
|
||||||
def process_packet(self, *args, **kwargs):
|
def process_packet(self, *args, **kwargs):
|
||||||
"""This handles the processing of an inbound packet.
|
"""This handles the processing of an inbound packet.
|
||||||
|
|
||||||
@ -104,7 +106,6 @@ class APRSDDupeRXThread(APRSDRXThread):
|
|||||||
PluginProcessPacketThread for processing.
|
PluginProcessPacketThread for processing.
|
||||||
"""
|
"""
|
||||||
packet = self._client.decode_packet(*args, **kwargs)
|
packet = self._client.decode_packet(*args, **kwargs)
|
||||||
# LOG.debug(raw)
|
|
||||||
packet_log.log(packet)
|
packet_log.log(packet)
|
||||||
pkt_list = packets.PacketList()
|
pkt_list = packets.PacketList()
|
||||||
|
|
||||||
@ -229,13 +230,11 @@ class APRSDProcessPacketThread(APRSDThread):
|
|||||||
self.process_piggyback_ack(packet)
|
self.process_piggyback_ack(packet)
|
||||||
# Only ack messages that were sent directly to us
|
# Only ack messages that were sent directly to us
|
||||||
if isinstance(packet, packets.MessagePacket):
|
if isinstance(packet, packets.MessagePacket):
|
||||||
if (
|
if to_call and to_call.lower() == our_call:
|
||||||
to_call and to_call.lower() == our_call
|
|
||||||
and msg_id
|
|
||||||
):
|
|
||||||
# It's a MessagePacket and it's for us!
|
# It's a MessagePacket and it's for us!
|
||||||
# let any threads do their thing, then ack
|
# let any threads do their thing, then ack
|
||||||
# send an ack last
|
# send an ack last
|
||||||
|
if msg_id:
|
||||||
tx.send(
|
tx.send(
|
||||||
packets.AckPacket(
|
packets.AckPacket(
|
||||||
from_call=CONF.callsign,
|
from_call=CONF.callsign,
|
||||||
@ -262,7 +261,7 @@ class APRSDProcessPacketThread(APRSDThread):
|
|||||||
def process_other_packet(self, packet, for_us=False):
|
def process_other_packet(self, packet, for_us=False):
|
||||||
"""Process an APRS Packet that isn't a message or ack"""
|
"""Process an APRS Packet that isn't a message or ack"""
|
||||||
if not for_us:
|
if not for_us:
|
||||||
LOG.info("Got a packet not meant for us.")
|
LOG.info("Got a packet meant for someone else '{packet.to_call}'")
|
||||||
else:
|
else:
|
||||||
LOG.info("Got a non AckPacket/MessagePacket")
|
LOG.info("Got a non AckPacket/MessagePacket")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user