From c15de2c7f7e70c97a89b591b3ece72c5047ab4fa Mon Sep 17 00:00:00 2001 From: John Wiseman Date: Wed, 25 Jan 2023 10:12:51 +0000 Subject: 6.0.23.42 --- VARA.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'VARA.c') diff --git a/VARA.c b/VARA.c index 271fcdd..5dddeca 100644 --- a/VARA.c +++ b/VARA.c @@ -918,8 +918,9 @@ char WebProcTemplate[] = "" "{location.reload()}\n" "\r\n" "%s\r\n" - "

%s

" - "" + "

%s

"; + +char Menubit[] = "" "\r\n" "" "Abort Session" @@ -942,6 +943,9 @@ static int WebProc(struct TNCINFO * TNC, char * Buff, BOOL LOCAL) { int Len = sprintf(Buff, WebProcTemplate, TNC->Port, TNC->Port, "VARA Status", "VARA Status"); + if (LOCAL) + Len += sprintf(&Buff[Len], Menubit, TNC->TXOffset, TNC->TXOffset); + if (TNC->TXFreq) Len += sprintf(&Buff[Len], sliderBit, TNC->TXOffset, TNC->TXOffset); @@ -2285,17 +2289,11 @@ VOID VARAProcessReceivedControl(struct TNCINFO * TNC) if (TNC->InputLen > 8000) // Shouldnt have packets longer than this TNC->InputLen=0; - - // I don't think it likely we will get packets this long, but be aware... - - // We can get pretty big ones in the faster InputLen=recv(TNC->TCPSock, &TNC->ARDOPBuffer[TNC->InputLen], 8192 - TNC->InputLen, 0); if (InputLen == 0 || InputLen == SOCKET_ERROR) - { - // Does this mean closed? - + { closesocket(TNC->TCPSock); TNC->TCPSock = 0; @@ -2324,7 +2322,7 @@ loop: if ((ptr2 - ptr) == 1) // CR { - // Usual Case - single meg in buffer + // Usual Case - single msg in buffer VARAProcessResponse(TNC, TNC->ARDOPBuffer, TNC->InputLen); TNC->InputLen=0; -- cgit v1.2.3