View Issue Details

IDProjectCategoryView StatusLast Update
0002206Ham Radio DeluxeBugpublic2017-09-18 00:08
ReporterPD9FERAssigned ToK7ZCZ 
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version6.4.0.787 
Summary0002206: Logbook API Truncating Record
DescriptionWhen a contact is logged via the Logbook API, and the ADDRESS field contains carriage return and line feed characters, any fields after the ADDRESS field in the command are ignored.

e.g. If the following 'db add' command is submitted to the command line interface on TCP port 7826, only the CALL, QSO_DATE fields and the first part of the ADDRESS field ("Line 1") are logged. The remaining fields (TIME_ON, BAND, MODE, RST_SENT and RST_RCVD) are ignored
Steps To Reproducedb add "My Logbook" { CALL="TESTING" QSO_DATE="20170201" ADDRESS="Line 1
Line 2" TIME_ON="0630" BAND="20m" MODE="USB" RST_SENT="59" RST_RCVD="59" }
Additional Information
TagsNo tags attached.
TestingNot Started



2017-08-15 05:47


Capture.jpg (305,628 bytes)
Test.jpg (96,603 bytes)
Test.jpg (96,603 bytes)
Protocol Analyser.jpg (105,155 bytes)
Protocol Analyser.jpg (105,155 bytes)


2017-08-30 00:34

developer   ~0004084

I'm kind of reluctant to fix this because it's a breaking change. It's a breaking change because the behavior of this interface is practically undocumented. If we take the little bit of documentation we do have and try to infer what this interface is meant to do, then we end up with the realization that the behaviour described in this bug is by design: the input command ends at a newline, as no provision for splitting input over multiple lines is provided.

To implement a fix, I have a couple of choices:

1) Decline to fix this until we version the interface. Maybe new code runs at a new port, and does specify how to put a newline in a value in one of these command strings.

2) Aggressively change the API so that if an un-closed quote-delimited string is open when a newline is encountered, the newline is considered literal and the code waits for more input before trying to process the completed command string. This breaks any app that sends such a string and waits for a response because it will wait forever.

3) Aggressively change the API so that a newline character can be expressed within a quoted string without using a literal newline. Most languages do this with '\n', for example. This breaks any application that wants to send "\n" to mean two characters (back-whack and enn) rather than a newline literal. Th

I've chosen number 3. This was my choice because it was easiest to implement and because it seems the safest, though any measure of safety seems speculative and subjective. #1 would've delayed the fix for a long time. #2 could work, but it involves moving three layers of parsing code around underneath the code which receives characters from the port -- which also does some parsing (because it looks for newline characters).

With that caveat, the fix is to is \n to represent the desired new line, like this:

db add "My Logbook" { CALL="TESTING" QSO_DATE="20170201" ADDRESS="Line 1\nLine 2" TIME_ON="0630" BAND="20m" MODE="USB" RST_SENT="59" RST_RCVD="59" }


2017-08-30 00:50

developer   ~0004085

fixed with this change set


2017-09-18 00:08

administrator   ~0004215

Closed as part of the release.

Issue History

Date Modified Username Field Change
2017-08-15 05:47 PD9FER New Issue
2017-08-15 05:47 PD9FER File Added: Capture.jpg
2017-08-15 05:47 PD9FER File Added: Test.jpg
2017-08-15 05:47 PD9FER File Added: Protocol Analyser.jpg
2017-08-30 00:34 K7ZCZ Note Added: 0004084
2017-08-30 00:50 K7ZCZ Assigned To => K7ZCZ
2017-08-30 00:50 K7ZCZ Status new => resolved
2017-08-30 00:50 K7ZCZ Resolution open => fixed
2017-08-30 00:50 K7ZCZ Testing => Not Started
2017-08-30 00:50 K7ZCZ Note Added: 0004085
2017-09-01 16:41 K7ZCZ Project 1 - Backlog => 3 - Current Dev List
2017-09-01 16:49 K7ZCZ Fixed in Version =>
2017-09-01 16:49 K7ZCZ Description Updated View Revisions
2017-09-01 16:49 K7ZCZ Steps to Reproduce Updated View Revisions
2017-09-07 18:18 K7ZCZ Fixed in Version =>
2017-09-11 21:32 K7ZCZ Fixed in Version =>
2017-09-14 19:23 K7ZCZ Fixed in Version =>
2017-09-18 00:06 WA9PIE Project 3 - Current Dev List => Ham Radio Deluxe
2017-09-18 00:08 WA9PIE Note Added: 0004215
2017-09-18 00:08 WA9PIE Status resolved => closed