From 7904fc327576c02593a8bd614e5ddcc182510bf8 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Sun, 13 Oct 2019 17:56:09 +0200 Subject: [PATCH 1/6] HOTFIX pocsag decoder Fixes #413 --- includes/decoders/poc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/decoders/poc.py b/includes/decoders/poc.py index 6ab9aa0..6fd33e1 100644 --- a/includes/decoders/poc.py +++ b/includes/decoders/poc.py @@ -34,6 +34,7 @@ def isAllowed(poc_id): """ allowed = 0 + has_geo = False # 1.) If allowed RICs is set, only they will path, # If RIC is the right one return True, else False From a994381de1494c82b6339355309a810224fbbd71 Mon Sep 17 00:00:00 2001 From: Florian Date: Sun, 13 Oct 2019 23:18:03 +0200 Subject: [PATCH 2/6] HOTFIX pocsag decoder HOTFIX pocsag decoder to solve #413 ; definition of var in both functions. --- includes/decoders/poc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/decoders/poc.py b/includes/decoders/poc.py index 6fd33e1..e5b9b6d 100644 --- a/includes/decoders/poc.py +++ b/includes/decoders/poc.py @@ -99,6 +99,8 @@ def decode(freq, decoded): @return: nothing @exception: Exception if POCSAG decode failed """ + has_geo = False + try: bitrate = 0 From ca26f1dc9a71d166c3dc9612924781511fb97ae6 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Mon, 14 Oct 2019 09:17:26 +0200 Subject: [PATCH 3/6] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 689c99a..d5c49c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - POC-Decoder: Im POC-Text wird nach einem RegEx, welcher Koordinaten enthält, gesucht. Werden diese gefunden, so stehen zwei neu befüllte Data-Felder Lon bzw Lat zur Verfügung. ##### Fixed - Asynchrone Alarme: Bei asynchroner Verarbeitung von schnell aufeinander folgenden Alarmen, wurde der Inhalt der Objekte typ, freq und data bereits vor dem Abschluss der Verarbeitung eines Alarms wieder überschrieben. Ergebnis hiervon war die Vermischung von RICs und Texten unterschiedlicher Alarme. Lösung über copy.deepcopy() [#394](https://github.com/Schrolli91/BOSWatch/issues/394) +- POC-Decoder: Bug wegen nicht zugeweisener Variable 'has_geo' [#410](https://github.com/Schrolli91/BOSWatch/issues/413) [HOTFIX] ### __[v2.4.2]__ - 11.03.2019 From c631692bac16a6eb4079035d3f74d0ecb1eacc30 Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 17 Oct 2019 11:01:53 +0200 Subject: [PATCH 4/6] Refactoring RegEx Changing RegEx to check entry; FMS containing chars inbetween had not been loaded, so the RegEx (l. 46) has been changed to correct it. Also: removing semicolon in l 105 --- includes/descriptionList.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/descriptionList.py b/includes/descriptionList.py index 9e548fd..c61a46e 100644 --- a/includes/descriptionList.py +++ b/includes/descriptionList.py @@ -43,7 +43,7 @@ def loadCSV(typ, idField): for row in reader: logging.debug(row) # only import rows with an integer as id, allow subrics though - if re.match("^[0-9]+[A-D]?$", row[idField], re.IGNORECASE): + if re.match("^[0-9A-Fa-f]+$", row[idField], re.IGNORECASE): try: resultList[row[idField].lower()] = stringConverter.convertToUTF8(row['description']) except: @@ -102,7 +102,7 @@ def getDescription(typ, data): @return: description as string """ - resultStr = data; + resultStr = data logging.debug("look up description lists") try: if typ == "FMS": From dc00fbc7a0271198cfafd80e71185783a79135fc Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 17 Oct 2019 12:08:47 +0200 Subject: [PATCH 5/6] Update descriptionList.py Simplifying RegEx because of set IGNORECASE --- includes/descriptionList.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/descriptionList.py b/includes/descriptionList.py index c61a46e..11281fd 100644 --- a/includes/descriptionList.py +++ b/includes/descriptionList.py @@ -43,7 +43,7 @@ def loadCSV(typ, idField): for row in reader: logging.debug(row) # only import rows with an integer as id, allow subrics though - if re.match("^[0-9A-Fa-f]+$", row[idField], re.IGNORECASE): + if re.match("^[0-9A-F]+$", row[idField], re.IGNORECASE): try: resultList[row[idField].lower()] = stringConverter.convertToUTF8(row['description']) except: From 3761eb8e28b391b302f05c7b170a859d9e3bb130 Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 17 Oct 2019 12:51:35 +0200 Subject: [PATCH 6/6] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 659e00b..54a9483 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ##### Deprecated ##### Removed ##### Fixed +- Description-List: Buchstaben in FMS-Kennungen werden nun erkannt und zugelassen [#409](https://github.com/Schrolli91/BOSWatch/issues/409) ##### Security