diff --git a/BPQTermMDI.c b/BPQTermMDI.c index afdb4f5..9f9ba44 100644 --- a/BPQTermMDI.c +++ b/BPQTermMDI.c @@ -2973,6 +2973,30 @@ LRESULT APIENTRY InputProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return 0; } + + if (wParam == 0x7) // BEL (Ctrl/G) + { + // Get buffer, append 07 and write back + + Cinfo->kbptr = SendMessage(Cinfo->hwndInput, WM_GETTEXT, INPUTLEN-1, + (LPARAM) (LPCSTR)Cinfo->kbbuf); + + + Cinfo->kbbuf[Cinfo->kbptr++] = 7; + Cinfo->kbbuf[Cinfo->kbptr] = 0; + + SendMessage(Cinfo->hwndInput,WM_SETTEXT,0,(LPARAM)(LPCSTR) Cinfo->kbbuf); + + // Send cursor right + + for (i = 0; i < strlen(Cinfo->kbbuf); i++) + { + SendMessage(Cinfo->hwndInput, WM_KEYDOWN, VK_RIGHT, 0); + SendMessage(Cinfo->hwndInput, WM_KEYUP, VK_RIGHT, 0); + } + + return 0; + } } diff --git a/Bpq32.c b/Bpq32.c index 15304d4..f8e0878 100644 --- a/Bpq32.c +++ b/Bpq32.c @@ -1280,6 +1280,8 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses // Fix possible FRMR when RNR is cleared by SREJ (78) // Fix error in .77 L4Compress fix (mine, not Steve's!) (78) // Fix possible stuck L2 session when handling SREJ (79) +// Allow sending CTRL/G From console (Windows) (80) +// Fix Webmail autorefresh extra threads problem (websock connection lost handling) (82) #define CKernel diff --git a/ChatMultiConsole.c b/ChatMultiConsole.c index 78308c6..cc70f18 100644 --- a/ChatMultiConsole.c +++ b/ChatMultiConsole.c @@ -999,8 +999,11 @@ LRESULT APIENTRY InputProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) // Send cursor right - SendMessage(Cinfo->hwndInput, WM_KEYDOWN, VK_RIGHT, 0); - SendMessage(Cinfo->hwndInput, WM_KEYUP, VK_RIGHT, 0); + for (i = 0; i < strlen(Cinfo->kbbuf); i++) + { + SendMessage(Cinfo->hwndInput, WM_KEYDOWN, VK_RIGHT, 0); + SendMessage(Cinfo->hwndInput, WM_KEYUP, VK_RIGHT, 0); + } return 0; } diff --git a/ChatUsers.txt b/ChatUsers.txt new file mode 100644 index 0000000..4db7940 --- /dev/null +++ b/ChatUsers.txt @@ -0,0 +1,2 @@ +GM8BPQ 0 John ?_qth¬26¬0 +G8BPQ 0 John ?_qth¬26¬0 diff --git a/HTTPcode.c b/HTTPcode.c index 3145d80..385eca2 100644 --- a/HTTPcode.c +++ b/HTTPcode.c @@ -4839,7 +4839,14 @@ void ProcessWebmailWebSockThread(void * conn) Sent = send(sockptr->socket, _REPLYBUFFER, ReplyLen, 0); - while (Sent != ReplyLen && Loops++ < 3000) // 100 secs max + if (Sent == -1) // Connecton lost + { + closesocket(sockptr->socket); + free(conn); + return; + } + + while (Sent != ReplyLen && Loops++ < 3000) // 90 secs max { if (Sent > 0) // something sent { @@ -4885,11 +4892,16 @@ void ProcessWebmailWebSockThread(void * conn) CloseHandle(hPipe); - // ?? do we need a thread to handle write which may block - Sent = send(sockptr->socket, Reply, ReplyLen, 0); - while (Sent != ReplyLen && Loops++ < 3000) // 100 secs max + if (Sent == -1) // Connecton lost + { + free(conn); + closesocket(sockptr->socket); + return; + } + + while (Sent != ReplyLen && Loops++ < 3000) // 90 secs max { // Debugprintf("%d out of %d sent %d Loops", Sent, InputLen, Loops); diff --git a/HanksRT.c b/HanksRT.c index 89e03e2..8831faa 100644 --- a/HanksRT.c +++ b/HanksRT.c @@ -1229,7 +1229,7 @@ void chkctl(ChatCIRCUIT *ckt_from, char * Buffer, int Len) for (i = 1; i < (Len - 1); i++) { - if (Buffer[i] < 32) + if (Buffer[i] < 32 && Buffer[i] != 7) // Accept BELL { if (Buffer[i] == 9) { diff --git a/MultiConsole.c b/MultiConsole.c index f574b53..8b3ef35 100644 --- a/MultiConsole.c +++ b/MultiConsole.c @@ -944,6 +944,30 @@ LRESULT APIENTRY InputProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return 0; } + + if (wParam == 0x7) // BEL (Ctrl/G) + { + // Get buffer, append 07 and write back + + Cinfo->kbptr = SendMessage(Cinfo->hwndInput, WM_GETTEXT, INPUTLEN-1, + (LPARAM) (LPCSTR)Cinfo->kbbuf); + + + Cinfo->kbbuf[Cinfo->kbptr++] = 7; + Cinfo->kbbuf[Cinfo->kbptr] = 0; + + SendMessage(Cinfo->hwndInput,WM_SETTEXT,0,(LPARAM)(LPCSTR) Cinfo->kbbuf); + + // Send cursor right + + for (i = 0; i < strlen(Cinfo->kbbuf); i++) + { + SendMessage(Cinfo->hwndInput, WM_KEYDOWN, VK_RIGHT, 0); + SendMessage(Cinfo->hwndInput, WM_KEYUP, VK_RIGHT, 0); + } + + return 0; + } } diff --git a/RTKnown.txt b/RTKnown.txt new file mode 100644 index 0000000..5f639a8 --- /dev/null +++ b/RTKnown.txt @@ -0,0 +1 @@ +G8BPQ-1 1754642136 diff --git a/TelnetV6.c b/TelnetV6.c index a0a0272..0756447 100644 --- a/TelnetV6.c +++ b/TelnetV6.c @@ -5018,23 +5018,20 @@ int DataSocket_ReadHTTP(struct TNCINFO * TNC, struct ConnectionInfo * sockptr, S { // Failed or closed - clear connection - // if Websock connection till app + // if Websock connection tell app if (sockptr->WebSocks) { if (memcmp(sockptr->WebURL, "rhp", 3) == 0) - { ProcessRHPWebSockClosed(sockptr->socket); - DataSocket_Disconnect(TNC, sockptr); - return 0; - } - } - else - { - TNC->Streams[sockptr->Number].ReportDISC = TRUE; //Tell Node + DataSocket_Disconnect(TNC, sockptr); return 0; } + + TNC->Streams[sockptr->Number].ReportDISC = TRUE; //Tell Node + DataSocket_Disconnect(TNC, sockptr); + return 0; } MsgPtr = &sockptr->InputBuffer[0]; diff --git a/Versions.h b/Versions.h index 4595afc..34767b5 100644 --- a/Versions.h +++ b/Versions.h @@ -10,15 +10,15 @@ #endif -#define KVers 6,0,24,80 -#define KVerstring "6.0.24.80\0" +#define KVers 6,0,24,82 +#define KVerstring "6.0.24.82\0" #ifdef CKernel #define Vers KVers #define Verstring KVerstring -#define Datestring "July 2025" +#define Datestring "August 2025" #define VerComments "G8BPQ Packet Switch (C Version)" KVerstring #define VerCopyright "Copyright © 2001-2025 John Wiseman G8BPQ\0" #define VerDesc "BPQ32 Switch\0" diff --git a/bpqchat.c b/bpqchat.c index 31dcc3e..3fc9ab2 100644 --- a/bpqchat.c +++ b/bpqchat.c @@ -74,6 +74,7 @@ // Increase size of status display buffers (7) // Allow sending BEL (CTRL/G) (79) +// Fix sending BEL (CTRL/G) (81) #include "BPQChat.h" diff --git a/cMain.c b/cMain.c index 05732c7..c722147 100644 --- a/cMain.c +++ b/cMain.c @@ -52,6 +52,9 @@ int CanPortDigi(int Port); int KissEncode(UCHAR * inbuff, UCHAR * outbuff, int len); void MQTTTimer(); void SaveMH(); +VOID InformPartner(struct _LINKTABLE * LINK, int Reason); +VOID L2SENDCOMMAND(struct _LINKTABLE * LINK, int CMD); + #include "configstructs.h" diff --git a/chatconfig.cfg b/chatconfig.cfg index 49e3f4e..c990d97 100644 --- a/chatconfig.cfg +++ b/chatconfig.cfg @@ -18,5 +18,5 @@ Chat : MonitorSize = "828,1644,148,770"; DebugSize = "0,0,0,0"; WindowSize = "231,835,254,602"; - Version = "6,0,24,32"; + Version = "6,0,24,81"; };