Treat adif record values as byte length vs string length

pipelines/383202222
Matthew Chambers 2021-09-27 18:00:48 +00:00
rodzic 8e7dc14111
commit 82cae420c1
3 zmienionych plików z 9 dodań i 10 usunięć

7
debian/changelog vendored
Wyświetl plik

@ -1,9 +1,8 @@
gridtracker (1.21.0917) unstable; urgency=medium gridtracker (1.21.0926) unstable; urgency=low
[Bug Fixes] [Bug Fixes]
- Fixes issues with fetching from LoTW - This is a test beta to test treating adif records as byte length vs string length
-- Matthew Chambers <nr0q@gridtracker.org> Fri, 16 Sept 2021 01:34:49 -0000
-- Matthew Chambers <nr0q@gridtracker.org> Sund, 26 Sept 2021 19:03:30 -0000
gridtracker (1.21.0620) unstable; urgency=medium gridtracker (1.21.0620) unstable; urgency=medium
[Bug Fixes] [Bug Fixes]
- Fix pulling down of LoTW logs at start-up with a differential log syncing mechanism that only get's changes since last sync, also cool down timer to prevent rapid reloading of LoTW log. - Fix pulling down of LoTW logs at start-up with a differential log syncing mechanism that only get's changes since last sync, also cool down timer to prevent rapid reloading of LoTW log.

Wyświetl plik

@ -1638,7 +1638,7 @@ function sendTcpMessage(msg, length, port, address)
client.setTimeout(30000); client.setTimeout(30000);
client.connect(port, address, function () client.connect(port, address, function ()
{ {
client.write(msg); client.write(Buffer.from(msg, "utf-8"));
}); });
client.on("close", function () {}); client.on("close", function () {});
@ -1647,7 +1647,7 @@ function sendTcpMessage(msg, length, port, address)
function valueToAdiField(field, value) function valueToAdiField(field, value)
{ {
var adi = "<" + field + ":"; var adi = "<" + field + ":";
adi += String(value).length + ">"; adi += Buffer.byteLength(String(value)) + ">";
adi += String(value) + " "; adi += String(value) + " ";
return adi; return adi;
} }
@ -1927,7 +1927,7 @@ function finishSendingReport(record, localMode)
for (let key in record) for (let key in record)
{ {
report += "<" + key + ":" + record[key].length + ">" + record[key] + " "; report += "<" + key + ":" + Buffer.byteLength(record[key]) + ">" + record[key] + " ";
} }
report += "<EOR>"; report += "<EOR>";
@ -2109,7 +2109,7 @@ function finishSendingReport(record, localMode)
for (var key in record) for (var key in record)
{ {
report += report +=
"<" + key + ":" + record[key].length + ">" + record[key] + " "; "<" + key + ":" + Buffer.byteLength(record[key]) + ">" + record[key] + " ";
} }
report += "<EOR>"; report += "<EOR>";
} }

Wyświetl plik

@ -1,8 +1,8 @@
{ {
"name": "GridTracker", "name": "GridTracker",
"product_string_do_not_use": "gridtracker", "product_string_do_not_use": "gridtracker",
"version": "1.21.0917", "version": "1.21.0926",
"betaVersion": "LoTW Fetch Fix 1", "betaVersion": "utf8",
"description": "GridTracker, an amateur radio companion", "description": "GridTracker, an amateur radio companion",
"author": "Stephen Loomis (N0TTL) and GridTracker.org", "author": "Stephen Loomis (N0TTL) and GridTracker.org",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",