From ea93adeffbb191c502e9b27be4e7a4c8cdd332a5 Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Tue, 20 Oct 2026 22:17:41 +0100 Subject: New upstream version 6.0.26.1+repack --- BPQTermTCP.ini | 20 ---------------- BPQWinAPP.c | 67 +++++++++++++++++++++++++++++++++++++--------------- BPQWinAPP.rc | 4 ++-- Bpq32.c | 53 +++++++++++++++++++++-------------------- CMakeLists.txt | 24 ------------------- Cmd.c | 8 +++++-- CommonCode.c | 10 ++++---- L4Code.c | 2 +- LinBPQ.c | 52 +++++++++++++++++++++++++++++----------- RTKnown.txt | 0 RigControl.c | 12 +++++++++- Versions.h | 18 +++++++++++--- Win32bits/bpq32.exp | Bin 18680 -> 18680 bytes kiss.c | 8 ++++++- 14 files changed, 162 insertions(+), 116 deletions(-) delete mode 100644 BPQTermTCP.ini delete mode 100644 CMakeLists.txt delete mode 100644 RTKnown.txt diff --git a/BPQTermTCP.ini b/BPQTermTCP.ini deleted file mode 100644 index 3fe4d61..0000000 --- a/BPQTermTCP.ini +++ /dev/null @@ -1,20 +0,0 @@ -[Session 1] -PortMask=0 -Bells=0 -StripLF=0 -MTX=1 -MCOM=1 -MUIONLY=0 -Split=50 -MONColour=0 -MonNODES=1 -MonPorts=0 -ChatMode=0 -CurrentHost=0 -Size=34,650,47,669 -FontName=Courier New -CharSet=0 -CodePage=437 -FontSize=20 -FontWidth=8 -AlertInterval=3600 diff --git a/BPQWinAPP.c b/BPQWinAPP.c index d70ef68..12bcf81 100644 --- a/BPQWinAPP.c +++ b/BPQWinAPP.c @@ -31,6 +31,12 @@ //#define DYNLOADBPQ // Dynamically Load BPQ32.dll #include "bpq32.h" +#define WinApp +#include "Versions.h" + +#include "GetVersion.h" + + VOID APIENTRY SetFrameWnd(HWND hWnd); #define BPQICON 400 @@ -134,12 +140,13 @@ LONG WINAPI UnhandledExcepFilter(PEXCEPTION_POINTERS pExcepPointers) DWORD dwDisplacement; IMAGEHLP_LINE64 line; char * fptr; + DWORD ExceptionCode = pExcepPointers->ExceptionRecord->ExceptionCode; time_t T; struct tm * tm; - char buffer[sizeof(SYMBOL_INFO) + MAX_SYM_NAME * sizeof(TCHAR)]; + char buffer[sizeof(SYMBOL_INFO) + MAX_SYM_NAME * sizeof(TCHAR)] = ""; PSYMBOL_INFO symbol = (PSYMBOL_INFO)buffer; symbol->SizeOfStruct = sizeof(SYMBOL_INFO); @@ -155,29 +162,49 @@ LONG WINAPI UnhandledExcepFilter(PEXCEPTION_POINTERS pExcepPointers) exit(0); } + + switch (ExceptionCode) + { - inErrorhandling = 1; - - if(pExcepPointers->ExceptionRecord->ExceptionCode == DBG_PRINTEXCEPTION_C) + case DBG_PRINTEXCEPTION_C: return EXCEPTION_CONTINUE_EXECUTION; - SymFromAddr( process, ((DWORD)pExcepPointers->ExceptionRecord->ExceptionAddress), 0, symbol ); + case STATUS_INTEGER_DIVIDE_BY_ZERO: + case STATUS_ACCESS_VIOLATION: + case STATUS_STACK_OVERFLOW: + case STATUS_FLOAT_DIVIDE_BY_ZERO: + + break; + + // ignore others - Debugprintf("\r\n\r\nProgram error trapped at %02d:%02d:%02d\r\n", tm->tm_hour, tm->tm_min, tm->tm_sec); + default: - SymGetLineFromAddr64(process, (DWORD)pExcepPointers->ExceptionRecord->ExceptionAddress, &dwDisplacement, &line); + return EXCEPTION_CONTINUE_SEARCH; + } + + inErrorhandling = 1; - if (line.FileName) + if (SymFromAddr(process, ((DWORD)pExcepPointers->ExceptionRecord->ExceptionAddress), 0, symbol)) { - fptr = line.FileName + (int)strlen(line.FileName); // remove path - while (*fptr != '\\' && *fptr != '/') - fptr--; - - fptr++; - Debugprintf("In Procedure %s - %s Line %d Addr %p\r\n", symbol->Name, fptr, line.LineNumber, symbol->Address ); + Debugprintf("\r\n\r\nException %x trapped at %02d:%02d:%02d\r\n", ExceptionCode, tm->tm_hour, tm->tm_min, tm->tm_sec); + + line.SizeOfStruct = sizeof(IMAGEHLP_LINE64); + + SymGetLineFromAddr64(process, (DWORD)pExcepPointers->ExceptionRecord->ExceptionAddress, &dwDisplacement, &line); + + if (line.FileName) + { + fptr = line.FileName + (int)strlen(line.FileName); // remove path + while (*fptr != '\\' && *fptr != '/') + fptr--; + + fptr++; + + Debugprintf("In Procedure %s - %s Line %d Addr %p\r\n", symbol->Name, fptr, line.LineNumber, symbol->Address ); + } } - printStack(); CloseDebugLog(); @@ -205,12 +232,14 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi MSG msg; int Running = 1; - Debugprintf("BPQ32.exe %s Entered", lpCmdLine); + GetVersionInfo("bpq32.exe"); - process = GetCurrentProcess(); + Debugprintf("BPQ32.exe %s Version %s", lpCmdLine, TextVerstring); - SymSetOptions(SYMOPT_LOAD_LINES); - SymInitialize( process, NULL, TRUE ); + process = GetCurrentProcess(); + + SymSetOptions(SYMOPT_LOAD_LINES); + SymInitialize( process, NULL, TRUE ); AddVectoredExceptionHandler(1, UnhandledExcepFilter); diff --git a/BPQWinAPP.rc b/BPQWinAPP.rc index 915f39d..aca7063 100644 --- a/BPQWinAPP.rc +++ b/BPQWinAPP.rc @@ -30,8 +30,8 @@ BPQICON ICON DISCARDABLE "bpqicon.ico" // // Version // -#define TEXTVER "2. 0. 1. 2\0" -#define BINVER 2, 0, 1, 2 +#define TEXTVER "6. 0. 26. 1\0" +#define BINVER 6, 0, 26, 1 VS_VERSION_INFO VERSIONINFO FILEVERSION BINVER diff --git a/Bpq32.c b/Bpq32.c index 5652e1f..937ccd8 100644 --- a/Bpq32.c +++ b/Bpq32.c @@ -1345,6 +1345,7 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses // Add Telnet Server config option "noWebSocks" to disable use of Websocks for Terminal and Driver windows (41) // Log outpur from running disconnect script (41) // Prevent Rigcontrol scan from changing frequency when PTT is active (41) +// Fix possible race condition on kiss tcp port startup (42) #define CKernel @@ -2138,38 +2139,40 @@ void Semaphored100msCode() // code that doesn't need to run every tick - run every 100 mS // Runs under semaphore - if (IPActive) Poll_IP(); - if (PMActive) Poll_PM(); - if (RigActive) Rig_Poll(); - if (APRSActive)Poll_APRS(); + if (!Closing) + { + if (IPActive) Poll_IP(); + if (PMActive) Poll_PM(); + if (RigActive) Rig_Poll(); + if (APRSActive)Poll_APRS(); - if (NeedWebMailRefresh) - DoRefreshWebMailIndex(); + if (NeedWebMailRefresh) + DoRefreshWebMailIndex(); - CheckWL2KReportTimer(); + CheckWL2KReportTimer(); - while (WINMORTraceQ) - { - UINT * Buffer = Q_REM(&WINMORTraceQ); - struct TNCINFO * TNC = (struct TNCINFO * )Buffer[1]; - int Len = Buffer[2]; - char * Msg = (char *)&Buffer[3]; + while (WINMORTraceQ) + { + UINT * Buffer = Q_REM(&WINMORTraceQ); + struct TNCINFO * TNC = (struct TNCINFO * )Buffer[1]; + int Len = Buffer[2]; + char * Msg = (char *)&Buffer[3]; - WritetoTraceSupport(TNC, Msg, Len); - RelBuff(Buffer); - } + WritetoTraceSupport(TNC, Msg, Len); + RelBuff(Buffer); + } - if (SetWindowTextQ) - SetWindowTextSupport(); - - while (WritetoConsoleQ) - { - UINT * Buffer = Q_REM_NP(&WritetoConsoleQ); - WritetoConsoleSupport((char *)&Buffer[2]); - free(Buffer); - } + if (SetWindowTextQ) + SetWindowTextSupport(); + while (WritetoConsoleQ) + { + UINT * Buffer = Q_REM_NP(&WritetoConsoleQ); + WritetoConsoleSupport((char *)&Buffer[2]); + free(Buffer); + } + } if (trayMenu == NULL) SetupTrayIcon(); diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 9dcfb88..0000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -cmake_minimum_required(VERSION 3.18) - -project(LinBPQ) - -# Our Project - -set(CMAKE_C_FLAGS "-DLINBPQ -g -fcommon -fasynchronous-unwind-tables") - -set(SOURCE_FILES -pngwtran.c pngrtran.c pngset.c pngrio.c pngwio.c pngtrans.c pngrutil.c pngwutil.c - pngread.c pngwrite.c png.c pngerror.c pngget.c pngmem.c APRSIconData.c AISCommon.c - upnp.c APRSStdPages.c HSMODEM.c WinRPR.c KISSHF.c TNCEmulators.c bpqhdlc.c SerialPort.c - adif.c WebMail.c utf8Routines.c VARA.c LzFind.c Alloc.c LzmaDec.c LzmaEnc.c LzmaLib.c - Multicast.c ARDOP.c IPCode.c FLDigi.c linether.c CMSAuth.c APRSCode.c BPQtoAGW.c KAMPactor.c - AEAPactor.c HALDriver.c MULTIPSK.c BBSHTMLConfig.c ChatHTMLConfig.c BBSUtilities.c bpqaxip.c - BPQINP3.c BPQNRR.c cMain.c Cmd.c CommonCode.c HTMLCommonCode.c compatbits.c config.c datadefs.c - FBBRoutines.c HFCommon.c Housekeeping.c HTTPcode.c kiss.c L2Code.c L3Code.c L4Code.c lzhuf32.c - MailCommands.c MailDataDefs.c LinBPQ.c MailRouting.c MailTCP.c MBLRoutines.c md5.c Moncode.c - NNTPRoutines.c RigControl.c TelnetV6.c WINMOR.c TNCCode.c UZ7HODrv.c WPRoutines.c - SCSTrackeMulti.c SCSPactor.c SCSTracker.c HanksRT.c UIRoutines.c AGWAPI.c AGWMoncode.c - DRATS.c FreeDATA.c base64.c Events.c nodeapi.c mailapi.c mqtt.c RHP.c NETROMTCP.c) - -add_executable(${PROJECT_NAME} ${SOURCE_FILES}) - diff --git a/Cmd.c b/Cmd.c index a4d8c02..defac9f 100644 --- a/Cmd.c +++ b/Cmd.c @@ -468,9 +468,13 @@ VOID RIGRECONFIG(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, str VOID REBOOT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD) { - char * ptr = 0; + char * ptr = 0; - *(ptr) = 0; + int i = 1; + int j = 0; + int k = i/j; + + //*(ptr) = 0; if (Reboot()) diff --git a/CommonCode.c b/CommonCode.c index 3559135..70ba8ee 100644 --- a/CommonCode.c +++ b/CommonCode.c @@ -4308,9 +4308,9 @@ VOID SendUIBeacon(int Port) if (hFile == 0) return; - Len = (int)fread(UIMessage, 1, 1024, hFile); - + Len = (int)fread(UIMessage, 1, 1023, hFile); fclose(hFile); + UIMessage[Len] = 0; } else @@ -4736,8 +4736,10 @@ INT_PTR CALLBACK ChildDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM { case IDC_FILE: - memset(&ofn, 0, sizeof (OPENFILENAME)); - ofn.lStructSize = sizeof (OPENFILENAME); + memset(&ofn, 0, sizeof (ofn)); + + + ofn.lStructSize = sizeof (ofn); ofn.hwndOwner = hDlg; ofn.lpstrFile = &FN[Port][0]; ofn.nMaxFile = 250; diff --git a/L4Code.c b/L4Code.c index 76f66de..ac0a57b 100644 --- a/L4Code.c +++ b/L4Code.c @@ -258,7 +258,7 @@ VOID NETROMMSG(struct _LINKTABLE * LINK, L3MESSAGEBUFFER * L3MSG) if (FindDestination(L3MSG->L3DEST, &DEST) == 0) { - // Return NCMP Dest Unreachable Host Ubknown (0) + // Return NCMP Dest Unreachable Host Unknown (0) SendNCMPDestunreachable(L3MSG, 0); return; diff --git a/LinBPQ.c b/LinBPQ.c index 8515119..bfee707 100644 --- a/LinBPQ.c +++ b/LinBPQ.c @@ -1169,6 +1169,7 @@ LONG WINAPI UnhandledExcepFilter(PEXCEPTION_POINTERS pExcepPointers) DWORD dwDisplacement; IMAGEHLP_LINE64 line; char * fptr; + DWORD ExceptionCode = pExcepPointers->ExceptionRecord->ExceptionCode; time_t T; @@ -1190,29 +1191,52 @@ LONG WINAPI UnhandledExcepFilter(PEXCEPTION_POINTERS pExcepPointers) exit(0); } + + switch (ExceptionCode) + { - inErrorhandling = 1; - - if(pExcepPointers->ExceptionRecord->ExceptionCode == DBG_PRINTEXCEPTION_C) + case DBG_PRINTEXCEPTION_C: return EXCEPTION_CONTINUE_EXECUTION; - SymFromAddr( process, ((DWORD)pExcepPointers->ExceptionRecord->ExceptionAddress), 0, symbol ); + case STATUS_INTEGER_DIVIDE_BY_ZERO: + case STATUS_ACCESS_VIOLATION: + case STATUS_STACK_OVERFLOW: + case STATUS_FLOAT_DIVIDE_BY_ZERO: - Debugprintf("\r\n\r\nProgram error trapped at %02d:%02d:%02d\r\n", tm->tm_hour, tm->tm_min, tm->tm_sec); + break; - SymGetLineFromAddr64(process, (DWORD)pExcepPointers->ExceptionRecord->ExceptionAddress, &dwDisplacement, &line); + // ignore others - if (line.FileName) - { - fptr = line.FileName + (int)strlen(line.FileName); // remove path - while (*fptr != '\\' && *fptr != '/') - fptr--; - - fptr++; + default: - Debugprintf("In Procedure %s - %s Line %d Addr %p\r\n", symbol->Name, fptr, line.LineNumber, symbol->Address ); + return EXCEPTION_CONTINUE_SEARCH; } + inErrorhandling = 1; + + SymFromAddr( process, ((DWORD)pExcepPointers->ExceptionRecord->ExceptionAddress), 0, symbol ); + + Debugprintf("\r\n\r\nProgram error trapped at %02d:%02d:%02d\r\n", tm->tm_hour, tm->tm_min, tm->tm_sec); + + if (SymFromAddr(process, ((DWORD)pExcepPointers->ExceptionRecord->ExceptionAddress), 0, symbol)) + { + Debugprintf("\r\n\r\nException %x trapped at %02d:%02d:%02d\r\n", ExceptionCode, tm->tm_hour, tm->tm_min, tm->tm_sec); + + line.SizeOfStruct = sizeof(IMAGEHLP_LINE64); + + SymGetLineFromAddr64(process, (DWORD)pExcepPointers->ExceptionRecord->ExceptionAddress, &dwDisplacement, &line); + + if (line.FileName) + { + fptr = line.FileName + (int)strlen(line.FileName); // remove path + while (*fptr != '\\' && *fptr != '/') + fptr--; + + fptr++; + + Debugprintf("In Procedure %s - %s Line %d Addr %p\r\n", symbol->Name, fptr, line.LineNumber, symbol->Address ); + } + } printStack(); CloseDebugLog(); diff --git a/RTKnown.txt b/RTKnown.txt deleted file mode 100644 index e69de29..0000000 diff --git a/RigControl.c b/RigControl.c index c485792..2c8e68b 100644 --- a/RigControl.c +++ b/RigControl.c @@ -8308,7 +8308,17 @@ void HLSetPTT(SOCKET Sock, struct RIGINFO * RIG, unsigned char * Msg, char sep) { char Resp[80]; int Len; - int ptt = atoi(&Msg[1]); + int ptt; + + // Might be T VFOA 2 or just T 2 + + + if (strlen(Msg) > 6) + ptt = atoi(&Msg[6]); + else + ptt = atoi(&Msg[1]); + + printf("%s %d %d\n", Msg, strlen(Msg), ptt); if (ptt) Rig_PTTEx(RIG, 1, NULL); diff --git a/Versions.h b/Versions.h index d8cfb21..d76c991 100644 --- a/Versions.h +++ b/Versions.h @@ -9,15 +9,15 @@ #endif -#define KVers 6,0,25,41 -#define KVerstring "6.0.25.41\0" +#define KVers 6,0,26,1 +#define KVerstring "6.0.26.1\0" #ifdef CKernel #define Vers KVers #define Verstring KVerstring -#define Datestring "September 2026" +#define Datestring "October 2026" #define VerComments "G8BPQ Packet Switch (C Version)" KVerstring #define VerCopyright "Copyright © 2001-2026 John Wiseman G8BPQ\0" #define VerDesc "BPQ32 Switch\0" @@ -25,6 +25,18 @@ #endif +#ifdef WinApp + +#define Vers KVers +#define Verstring KVerstring +#define Datestring "October 2026" +#define VerComments "G8BPQ Packet Switch Control Program" KVerstring +#define VerCopyright "Copyright © 2001-2026 John Wiseman G8BPQ\0" +#define VerDesc "BPQ32APP\0" +#define VerProduct "BPQ32" + +#endif + #ifdef TermTCP #define Vers 1,0,16,2 diff --git a/Win32bits/bpq32.exp b/Win32bits/bpq32.exp index 3cb06aa..63d9618 100644 Binary files a/Win32bits/bpq32.exp and b/Win32bits/bpq32.exp differ diff --git a/kiss.c b/kiss.c index b720485..dc8a8a6 100644 --- a/kiss.c +++ b/kiss.c @@ -299,6 +299,9 @@ int ASYINIT(int comport, int speed, struct PORTCONTROL * PortVector, char Channe npKISSINFO->idComDev = fd; + npKISSINFO->Portvector = PortVector; + + if (PortVector->KISSFLAGS & PITNC) { @@ -354,6 +357,9 @@ int ASYINIT(int comport, int speed, struct PORTCONTROL * PortVector, char Channe npKISSINFO->destaddr.sin_addr.s_addr = PortVector->PORTIPADDR.s_addr; npKISSINFO->destaddr.sin_port = htons(PortVector->IOBASE); + npKISSINFO->Portvector = PortVector; + + if (PortVector->KISSTCP) { if (PortVector->KISSSLAVE) @@ -435,11 +441,11 @@ int ASYINIT(int comport, int speed, struct PORTCONTROL * PortVector, char Channe npKISSINFO->MSGREADY=FALSE; npKISSINFO->RXBPTR=&npKISSINFO->RXBUFFER[0]; npKISSINFO->RXMPTR=&npKISSINFO->RXMSG[0]; + npKISSINFO->Portvector = PortVector; OpenConnection(PortVector); } - npKISSINFO->Portvector = PortVector; WritetoConsoleLocal("\n"); -- cgit v1.2.3