diff --git a/aprsd/cmds/webchat.py b/aprsd/cmds/webchat.py index 87c2cdc..29374ca 100644 --- a/aprsd/cmds/webchat.py +++ b/aprsd/cmds/webchat.py @@ -281,7 +281,9 @@ class SendMessageNamespace(Namespace): self.request = data data["from"] = CONF.callsign path = data.get("path", None) - if "," in path: + if not path: + path = [] + elif "," in path: path_opts = path.split(",") path = [x.strip() for x in path_opts] else: diff --git a/aprsd/conf/common.py b/aprsd/conf/common.py index 74b1abc..b29f52c 100644 --- a/aprsd/conf/common.py +++ b/aprsd/conf/common.py @@ -65,6 +65,11 @@ aprsd_opts = [ "2 means 1 packet every 2 seconds allowed." "5 means 1 pack packet every 5 seconds allowed", ), + cfg.IntOpt( + "packet_dupe_timeout", + default=60, + help="The number of seconds before a packet is not considered a duplicate.", + ), ] watch_list_opts = [ diff --git a/aprsd/threads/rx.py b/aprsd/threads/rx.py index 01ea308..4509909 100644 --- a/aprsd/threads/rx.py +++ b/aprsd/threads/rx.py @@ -105,7 +105,7 @@ class APRSDPluginRXThread(APRSDRXThread): # we send the 3 acks for the packet. pkt_list.rx(packet) self.packet_queue.put(packet) - elif packet.timestamp - found.timestamp < 60: + elif packet.timestamp - found.timestamp < CONF.packet_dupe_timeout: # If the packet came in within 60 seconds of the # Last time seeing the packet, then we drop it as a dupe. LOG.warning(f"Packet {packet.from_call}:{packet.msgNo} already tracked, dropping.")