summaryrefslogtreecommitdiff
path: root/Moncode.c
diff options
context:
space:
mode:
authorDave Hibberd <hibby@debian.org>2026-03-08 02:27:14 +0000
committerDave Hibberd <hibby@debian.org>2026-03-08 02:27:14 +0000
commit7aa6cec9300c8a3e9ef98b19791ad324d487512e (patch)
tree18c0487da11274dc1c4b67787ef12b1cefa15ae8 /Moncode.c
parentdae2bbc7215a8361e7b9092e6c307491c7e5722a (diff)
New upstream version 6.0.25.33+repackupstream/6.0.25.33+repack
Diffstat (limited to 'Moncode.c')
-rw-r--r--Moncode.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/Moncode.c b/Moncode.c
index 6cbf95a..7e50701 100644
--- a/Moncode.c
+++ b/Moncode.c
@@ -866,6 +866,18 @@ char * DISPLAY_NETROM(MESSAGE * ADJBUFFER, UCHAR * Output, int MsgLen)
return Output;
}
+
+ if (Index == 0x0F) // NCMP
+ {
+ Output += sprintf((char *)Output, " NCMP %x %x Type %x Code %x", Index, ID, TXNO, RXNO);
+
+ MsgLen = MsgLen - (19 + sizeof(void *));
+
+ if (MsgLen < 0 || MsgLen > 257)
+ return Output;// Duff
+
+ return Output;
+ }
}
Output += sprintf((char *)Output, " <???\?>");
@@ -1021,6 +1033,7 @@ void WritePacketLogThread(void * param)
MESSAGE * MSG;
MESSAGE * Q;
char buffer[2048];
+ char * ptr;
while(1)
{
@@ -1074,7 +1087,14 @@ void WritePacketLogThread(void * param)
MsgLen = IntDecodeFrame(MSG, buffer, MSG->Timestamp, 0xffffffffffffffff, FALSE, FALSE);
IntSetTraceOptionsEx(MMASK, SaveMTX, SaveMCOM, SaveMUI);
- buffer[MsgLen++] = 0x0a; // Add lf
+ // lines are CR terminated. Replace with LF
+
+ ptr = buffer;
+
+ while (ptr = strchr(ptr, 0x0d))
+ *ptr = 0x0a;
+
+// buffer[MsgLen++] = 0x0a; // Add lf
fwrite(buffer , 1, MsgLen, Handle);