From 9b5f7ccff68da51f53ea46ad2c85c9de8fbc2e56 Mon Sep 17 00:00:00 2001 From: John Wiseman Date: Sun, 23 Oct 2022 09:28:34 +0100 Subject: [PATCH] Version 6.0.23.24 --- BPQChat.vcproj.DESKTOP-TGEL8RC.John.user | 65 ---------- BPQChat.vcproj.SKIGACER.johnw.user | 65 ---------- BPQMail.vcproj.DESKTOP-TGEL8RC.John.user | 65 ---------- BPQMail.vcproj.HPLAPTOP.johnw.user | 65 ---------- BPQMail.vcproj.SKIGACER.johnw.user | 65 ---------- BPQRemotePTT.vcproj.DESKTOP-TGEL8RC.John.user | 65 ---------- BPQWinAPP.vcproj.DESKTOP-TGEL8RC.John.user | 65 ---------- BPQWinAPP.vcproj.SKIGACER.johnw.user | 65 ---------- Bpq32.c | 2 + CBPQ32.vcproj.DESKTOP-TGEL8RC.John.user | 65 ---------- CBPQ32.vcproj.HPLAPTOP.johnw.user | 65 ---------- CBPQ32.vcproj.SKIGACER.johnw.user | 65 ---------- CommonCode.c | 1 + ConfigDirewolf.vcxproj.user | 11 -- ConfigWinRPR.vcxproj.user | 4 - KISSHF.c | 8 +- L2Code.c | 113 ++++++++++++++++-- MailNode.vcproj.DESKTOP-TGEL8RC.John.user | 65 ---------- MailNode.vcproj.HPLAPTOP.johnw.user | 65 ---------- MailNode.vcproj.SKIGACER.johnw.user | 65 ---------- MailNode.vcxproj.user | 17 --- NodeMapTest.vcproj.SKIGACER.johnw.user | 65 ---------- Versions.h | 4 +- WinmorControl.vcproj.SKIGACER.johnw.user | 65 ---------- cMain.c | 15 ++- 25 files changed, 123 insertions(+), 1092 deletions(-) delete mode 100644 BPQChat.vcproj.DESKTOP-TGEL8RC.John.user delete mode 100644 BPQChat.vcproj.SKIGACER.johnw.user delete mode 100644 BPQMail.vcproj.DESKTOP-TGEL8RC.John.user delete mode 100644 BPQMail.vcproj.HPLAPTOP.johnw.user delete mode 100644 BPQMail.vcproj.SKIGACER.johnw.user delete mode 100644 BPQRemotePTT.vcproj.DESKTOP-TGEL8RC.John.user delete mode 100644 BPQWinAPP.vcproj.DESKTOP-TGEL8RC.John.user delete mode 100644 BPQWinAPP.vcproj.SKIGACER.johnw.user delete mode 100644 CBPQ32.vcproj.DESKTOP-TGEL8RC.John.user delete mode 100644 CBPQ32.vcproj.HPLAPTOP.johnw.user delete mode 100644 CBPQ32.vcproj.SKIGACER.johnw.user delete mode 100644 ConfigDirewolf.vcxproj.user delete mode 100644 ConfigWinRPR.vcxproj.user delete mode 100644 MailNode.vcproj.DESKTOP-TGEL8RC.John.user delete mode 100644 MailNode.vcproj.HPLAPTOP.johnw.user delete mode 100644 MailNode.vcproj.SKIGACER.johnw.user delete mode 100644 MailNode.vcxproj.user delete mode 100644 NodeMapTest.vcproj.SKIGACER.johnw.user delete mode 100644 WinmorControl.vcproj.SKIGACER.johnw.user diff --git a/BPQChat.vcproj.DESKTOP-TGEL8RC.John.user b/BPQChat.vcproj.DESKTOP-TGEL8RC.John.user deleted file mode 100644 index 40182c4..0000000 --- a/BPQChat.vcproj.DESKTOP-TGEL8RC.John.user +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - diff --git a/BPQChat.vcproj.SKIGACER.johnw.user b/BPQChat.vcproj.SKIGACER.johnw.user deleted file mode 100644 index b5b0536..0000000 --- a/BPQChat.vcproj.SKIGACER.johnw.user +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - diff --git a/BPQMail.vcproj.DESKTOP-TGEL8RC.John.user b/BPQMail.vcproj.DESKTOP-TGEL8RC.John.user deleted file mode 100644 index 40182c4..0000000 --- a/BPQMail.vcproj.DESKTOP-TGEL8RC.John.user +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - diff --git a/BPQMail.vcproj.HPLAPTOP.johnw.user b/BPQMail.vcproj.HPLAPTOP.johnw.user deleted file mode 100644 index f361c86..0000000 --- a/BPQMail.vcproj.HPLAPTOP.johnw.user +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - diff --git a/BPQMail.vcproj.SKIGACER.johnw.user b/BPQMail.vcproj.SKIGACER.johnw.user deleted file mode 100644 index b5b0536..0000000 --- a/BPQMail.vcproj.SKIGACER.johnw.user +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - diff --git a/BPQRemotePTT.vcproj.DESKTOP-TGEL8RC.John.user b/BPQRemotePTT.vcproj.DESKTOP-TGEL8RC.John.user deleted file mode 100644 index 40182c4..0000000 --- a/BPQRemotePTT.vcproj.DESKTOP-TGEL8RC.John.user +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - diff --git a/BPQWinAPP.vcproj.DESKTOP-TGEL8RC.John.user b/BPQWinAPP.vcproj.DESKTOP-TGEL8RC.John.user deleted file mode 100644 index 40182c4..0000000 --- a/BPQWinAPP.vcproj.DESKTOP-TGEL8RC.John.user +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - diff --git a/BPQWinAPP.vcproj.SKIGACER.johnw.user b/BPQWinAPP.vcproj.SKIGACER.johnw.user deleted file mode 100644 index b5b0536..0000000 --- a/BPQWinAPP.vcproj.SKIGACER.johnw.user +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - diff --git a/Bpq32.c b/Bpq32.c index 04c6804..c0da5ed 100644 --- a/Bpq32.c +++ b/Bpq32.c @@ -1115,6 +1115,8 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses // Fix processing C command if first port driver is SCSPACTROR (20) // Fix crash in UZ7HO driver if bad raw frame received (21) // Fix using FLARQ chat mode with FLDIGI ddriover (22) +// Fixed to KISSHF driver (23) +// Fix for application buffer loss (24) #define CKernel diff --git a/CBPQ32.vcproj.DESKTOP-TGEL8RC.John.user b/CBPQ32.vcproj.DESKTOP-TGEL8RC.John.user deleted file mode 100644 index 40b9267..0000000 --- a/CBPQ32.vcproj.DESKTOP-TGEL8RC.John.user +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - diff --git a/CBPQ32.vcproj.HPLAPTOP.johnw.user b/CBPQ32.vcproj.HPLAPTOP.johnw.user deleted file mode 100644 index 58f2ea6..0000000 --- a/CBPQ32.vcproj.HPLAPTOP.johnw.user +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - diff --git a/CBPQ32.vcproj.SKIGACER.johnw.user b/CBPQ32.vcproj.SKIGACER.johnw.user deleted file mode 100644 index 6a3e804..0000000 --- a/CBPQ32.vcproj.SKIGACER.johnw.user +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - diff --git a/CommonCode.c b/CommonCode.c index e074e5d..4aba2a1 100644 --- a/CommonCode.c +++ b/CommonCode.c @@ -536,6 +536,7 @@ VOID * _GetBuff(char * File, int Line) byteaddr = (unsigned char *)Msg; + memset(&byteaddr[0], 0, 64); // simplify debugging lost buffers memset(&byteaddr[400], 0, 64); // simplify debugging lost buffers sprintf(&byteaddr[400], "%s %d", fptr, Line); diff --git a/ConfigDirewolf.vcxproj.user b/ConfigDirewolf.vcxproj.user deleted file mode 100644 index b7d26ea..0000000 --- a/ConfigDirewolf.vcxproj.user +++ /dev/null @@ -1,11 +0,0 @@ - - - - Old Old - WindowsLocalDebugger - - - Old Old - WindowsLocalDebugger - - \ No newline at end of file diff --git a/ConfigWinRPR.vcxproj.user b/ConfigWinRPR.vcxproj.user deleted file mode 100644 index 6e2aec7..0000000 --- a/ConfigWinRPR.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/KISSHF.c b/KISSHF.c index 44b9071..6d84237 100644 --- a/KISSHF.c +++ b/KISSHF.c @@ -187,11 +187,9 @@ static int ProcessLine(char * buf, int Port) *ptr = 0; } - if (_memicmp(buf, "WL2KREPORT", 10) == 0) - TNC->WL2K = DecodeWL2KReportLine(buf); - else if (_memicmp(buf, "SESSIONTIMELIMIT", 16) == 0) - TNC->SessionTimeLimit = TNC->DefaultSessionTimeLimit = atoi(&buf[16]) * 60; - else + if (_memicmp(buf, "UPDATEMAP", 9) == 0) + TNC->PktUpdateMap = TRUE; + else if (standardParams(TNC, buf) == FALSE) strcat(TNC->InitScript, buf); } return (TRUE); diff --git a/L2Code.c b/L2Code.c index 252b167..d145b5f 100644 --- a/L2Code.c +++ b/L2Code.c @@ -1155,7 +1155,6 @@ VOID L2SABM(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE * Buffe return; } - // IF CONNECT TO APPL ADDRESS, SET UP APPL SESSION if (APPLMASK == 0) @@ -1170,10 +1169,6 @@ VOID L2SABM(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE * Buffe int Paclen= PORT->PORTPACLEN; UCHAR * ptr; - if (PORT->TNC && PORT->TNC->Hardware == H_KISSHF) - AttachKISSHF(PORT, Buffer); - - if (LogAllConnects) { char toCall[12], fromCall[12]; @@ -1184,6 +1179,9 @@ VOID L2SABM(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE * Buffe L2SENDUA(PORT, Buffer, ADJBUFFER); + if (PORT->TNC && PORT->TNC->Hardware == H_KISSHF) + AttachKISSHF(PORT, Buffer); + if (NO_CTEXT == 1) return; @@ -1291,9 +1289,56 @@ VOID L2SABM(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE * Buffe // ACCEPT THE CONNECT, THEN INVOKE THE ALIAS + L2SENDUA(PORT, Buffer, ADJBUFFER); + if (PORT->TNC && PORT->TNC->Hardware == H_KISSHF) + { + struct DATAMESSAGE * Msg; + int Totallen = 0; + int Paclen= PORT->PORTPACLEN; + UCHAR * ptr; + AttachKISSHF(PORT, Buffer); + // if Port CTEXT defined, use it + + if (PORT->CTEXT) + { + Totallen = strlen(PORT->CTEXT); + ptr = PORT->CTEXT; + } + else if (HFCTEXTLEN) + { + Totallen = HFCTEXTLEN; + ptr = HFCTEXT; + } + + if (Paclen == 0) + Paclen = PACLEN; + + while(Totallen) + { + Msg = GetBuff(); + + if (Msg == NULL) + break; // No Buffers + + Msg->PID = 0xf0; + + if (Paclen > Totallen) + Paclen = Totallen; + + memcpy(Msg->L2DATA, ptr, Paclen); + Msg->LENGTH = Paclen + MSGHDDRLEN + 1; + + C_Q_ADD(&LINK->TX_Q, Msg); + + ptr += Paclen; + Totallen -= Paclen; + } + + } + if (LogAllConnects) { char toCall[12], fromCall[12]; @@ -1302,13 +1347,10 @@ VOID L2SABM(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE * Buffe WriteConnectLog(fromCall, toCall, "AX.25"); } - L2SENDUA(PORT, Buffer, ADJBUFFER); - Msg = GetBuff(); if (Msg) { - Msg->PID = 0xf0; memcpy(Msg->L2DATA, APPL->APPLCMD, 12); @@ -1331,14 +1373,12 @@ VOID L2SABM(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE * Buffe if (PORT->TNC && PORT->TNC->Hardware == H_KISSHF) DetachKISSHF(PORT); + L2SENDDM(PORT, Buffer, ADJBUFFER); return; } - if (PORT->TNC && PORT->TNC->Hardware == H_KISSHF) - AttachKISSHF(PORT, Buffer); - if (LogAllConnects) { char toCall[12], fromCall[12]; @@ -1346,7 +1386,58 @@ VOID L2SABM(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE * Buffe fromCall[ConvFromAX25(ADJBUFFER->ORIGIN, fromCall)] = 0; WriteConnectLog(fromCall, toCall, "AX.25"); } + L2SENDUA(PORT, Buffer, ADJBUFFER); + + if (PORT->TNC && PORT->TNC->Hardware == H_KISSHF) + { + struct DATAMESSAGE * Msg; + int Totallen = 0; + int Paclen= PORT->PORTPACLEN; + UCHAR * ptr; + + AttachKISSHF(PORT, Buffer); + + // if Port CTEXT defined, use it + + if (PORT->CTEXT) + { + Totallen = strlen(PORT->CTEXT); + ptr = PORT->CTEXT; + } + else if (HFCTEXTLEN) + { + Totallen = HFCTEXTLEN; + ptr = HFCTEXT; + } + else + return; + + if (Paclen == 0) + Paclen = PACLEN; + + while(Totallen) + { + Msg = GetBuff(); + + if (Msg == NULL) + break; // No Buffers + + Msg->PID = 0xf0; + + if (Paclen > Totallen) + Paclen = Totallen; + + memcpy(Msg->L2DATA, ptr, Paclen); + Msg->LENGTH = Paclen + MSGHDDRLEN + 1; + + C_Q_ADD(&LINK->TX_Q, Msg); + + ptr += Paclen; + Totallen -= Paclen; + } + return; + } } VOID SETUPNEWL2SESSION(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE * Buffer, UCHAR MSGFLAG) diff --git a/MailNode.vcproj.DESKTOP-TGEL8RC.John.user b/MailNode.vcproj.DESKTOP-TGEL8RC.John.user deleted file mode 100644 index 7a49481..0000000 --- a/MailNode.vcproj.DESKTOP-TGEL8RC.John.user +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - diff --git a/MailNode.vcproj.HPLAPTOP.johnw.user b/MailNode.vcproj.HPLAPTOP.johnw.user deleted file mode 100644 index 4add25e..0000000 --- a/MailNode.vcproj.HPLAPTOP.johnw.user +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - diff --git a/MailNode.vcproj.SKIGACER.johnw.user b/MailNode.vcproj.SKIGACER.johnw.user deleted file mode 100644 index 7be11b6..0000000 --- a/MailNode.vcproj.SKIGACER.johnw.user +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - diff --git a/MailNode.vcxproj.user b/MailNode.vcxproj.user deleted file mode 100644 index 4442946..0000000 --- a/MailNode.vcxproj.user +++ /dev/null @@ -1,17 +0,0 @@ - - - - c:\linbpq - WindowsLocalDebugger - - - c:\linbpq - WindowsLocalDebugger - - - - - WindowsLocalDebugger - c:\linbpq - - \ No newline at end of file diff --git a/NodeMapTest.vcproj.SKIGACER.johnw.user b/NodeMapTest.vcproj.SKIGACER.johnw.user deleted file mode 100644 index b5b0536..0000000 --- a/NodeMapTest.vcproj.SKIGACER.johnw.user +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - diff --git a/Versions.h b/Versions.h index 14ddb81..11cbe15 100644 --- a/Versions.h +++ b/Versions.h @@ -10,8 +10,8 @@ #endif -#define KVers 6,0,23,22 -#define KVerstring "6.0.23.22\0" +#define KVers 6,0,23,24 +#define KVerstring "6.0.23.24\0" #ifdef CKernel diff --git a/WinmorControl.vcproj.SKIGACER.johnw.user b/WinmorControl.vcproj.SKIGACER.johnw.user deleted file mode 100644 index b5b0536..0000000 --- a/WinmorControl.vcproj.SKIGACER.johnw.user +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - diff --git a/cMain.c b/cMain.c index e436e1d..9eca342 100644 --- a/cMain.c +++ b/cMain.c @@ -102,7 +102,7 @@ struct DEST_LIST * ENDDESTLIST = NULL; // ; NODE LIST+1 ; VOID * BUFFERPOOL = NULL; // START OF BUFFER POOL -VOID * ENDBUFFERPOOL; +VOID * ENDBUFFERPOOL = NULL; int OBSINIT = 5; // INITIAL OBSOLESCENCE VALUE int OBSMIN = 4; // MINIMUM TO BROADCAST @@ -2465,6 +2465,9 @@ VOID FindLostBuffers() unsigned int rev; UINT CodeDump[16]; + char codeText[65] = ""; + unsigned char * codeByte = (unsigned char *) CodeDump; + PBPQVECSTRUC HOSTSESS = BPQHOSTVECTOR; struct _TRANSPORTENTRY * L4; // Pointer to Session @@ -2583,6 +2586,14 @@ VOID FindLostBuffers() memcpy(CodeDump, Bufferlist[n], 64); + for (i = 0; i < 64; i++) + { + if (codeByte[i] > 0x1f && codeByte[i] < 0x80) + codeText[i] = codeByte[i]; + else + codeText[i] = '.'; + } + for (i = 0; i < 16; i++) { rev = (CodeDump[i] & 0xff) << 24; @@ -2599,7 +2610,7 @@ VOID FindLostBuffers() Debugprintf(" %08x %08x %08x %08x %08x %08x %08x %08x %d", CodeDump[8], CodeDump[9], CodeDump[10], CodeDump[11], CodeDump[12], CodeDump[13], CodeDump[14], CodeDump[15], Msg->Process); - Debugprintf(" %s", &fileptr[400]); + Debugprintf(" %s %s", &fileptr[400], codeText); } }