Open W6HBR opened 1 week ago
From some searching, it looks like the ctime() function adds the CRLF to the returned value. If that is the case, then the extra CRLF on lines 27 & 28 should be removed.
Do you have any code / commands / scripts that could be used to show (reproduce) the output?
And, yes, the ctime() strings ends in '\n'. Easy enough to fix.
I can capture the raw AMI traffic if that is what you're asking for. That's how I was able to figure out where the output was incorrect.
I was looking for some code, command, or script that I could run to see the output before making a change and confirming the expected/improved output afterwards. Think "test code" :-)
I've been doing data captures from the AMI and found a couple of inconsistencies with a couple of the data items being reported.
First is for RPT_RXKEYED - there are two extra CRLF's added which cause the last line of the reported data to be orphaned into its own message as well as adding an extra unnecessary end-of-message terminator. AMI messages are terminated with a double CRLF (\r\n\r\n). In this case, the LastTxKeyedTime has an extra CRLF before and after the reported line. (see image)
Not sure where the extra CRLF's in RPT_RXKEYED are coming from as the rpt_manager_trigger function appears correct. Possibly the date/time value being passed already has a CRLF at the end causing this. The second issue is purely cosmetic, but also adds an extra unnecessary end-of-message terminator to the xstat message.
This extra CRLF can be found on line 333 of rpt_manager.c