diff options
| author | Dave Hibberd <hibby@debian.org> | 2026-09-29 21:39:24 +0100 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2026-09-29 21:39:24 +0100 |
| commit | 592e5967b8fcd79423802071319d0c646f2080df (patch) | |
| tree | 0eef3a28cfe1a939caf9d61e419a56d79b3c38e3 /WinRPR.c | |
| parent | 23de03a0c8bf8a564cc0442f49d050ed11e372b8 (diff) | |
New upstream version 6.0.25.41+repackupstream/6.0.25.41+repack
Diffstat (limited to 'WinRPR.c')
| -rw-r--r-- | WinRPR.c | 52 |
1 files changed, 15 insertions, 37 deletions
@@ -511,6 +511,10 @@ ok: }
}
+ DEDCheckRX(TNC);
+ DEDPoll(port);
+ DEDCheckRX(TNC);
+
return 0;
case 1: // poll
@@ -525,9 +529,6 @@ ok: }
}
- DEDCheckRX(TNC);
- DEDPoll(port);
- DEDCheckRX(TNC);
for (Stream = 0; Stream <= MaxStreams; Stream++)
{
@@ -718,33 +719,9 @@ ok: int WebProc(struct TNCINFO * TNC, char * Buff, BOOL LOCAL)
{
- int Interval = 15;
int Len;
- if (LOCAL)
- {
- if (TNC->WEB_CHANGED)
- Interval = 1;
- else
- Interval = 4;
- }
- else
- {
- if (TNC->WEB_CHANGED)
- Interval = 4;
- else
- Interval = 15;
- }
-
- if (TNC->WEB_CHANGED)
- {
- TNC->WEB_CHANGED -= Interval;
- if (TNC->WEB_CHANGED < 0)
- TNC->WEB_CHANGED = 0;
- }
-
- Len = sprintf(Buff, "<html><meta http-equiv=expires content=0><meta http-equiv=refresh content=%d>"
- "<head><title>WinRPR Status</title></head><body><h2>WinRPR Status</h2>", Interval);
+ Len = sprintf(Buff, "<h2>WinRPR Status</h2>");
Len += sprintf(&Buff[Len], "<table style=\"text-align: left; width: 480px; font-family: monospace; align=center \" border=1 cellpadding=2 cellspacing=2>");
@@ -1177,7 +1154,7 @@ VOID WinRPRProcessReceivedPacket(struct TNCINFO * TNC) TNC->Streams[0].ReportDISC = TRUE;
sprintf(TNC->WEB_COMMSSTATE, "Connection to TNC lost");
- MySetWindowText(TNC->xIDC_COMMSSTATE, TNC->WEB_COMMSSTATE);
+ MySetWindowText(TNC, TNC->xIDC_COMMSSTATE, TNC->WEB_COMMSSTATE);
return;
}
@@ -1533,10 +1510,11 @@ TNCRunning: // sinx.sin_addr.s_addr = INADDR_ANY;
// sinx.sin_port = 0;
- sprintf(TNC->WEB_COMMSSTATE, "Connecting to TNC");
- MySetWindowText(TNC->xIDC_COMMSSTATE, TNC->WEB_COMMSSTATE);
-
-
+ if (!TNC->Alerted)
+ {
+ sprintf(TNC->WEB_COMMSSTATE, "Connecting to TNC");
+ MySetWindowText(TNC, TNC->xIDC_COMMSSTATE, TNC->WEB_COMMSSTATE);
+ }
if (connect(TNC->TCPSock,(LPSOCKADDR) &TNC->destaddr,sizeof(TNC->destaddr)) == 0)
{
@@ -1556,9 +1534,9 @@ TNCRunning: sprintf(Msg, "Connect Failed for WinRPR socket - error code = %d Port %d\n",
WSAGetLastError(), htons(TNC->destaddr.sin_port));
- WritetoConsoleLocal(Msg);
+ // WritetoConsoleLocal(Msg);
sprintf(TNC->WEB_COMMSSTATE, "Connection to TNC failed");
- MySetWindowText(TNC->xIDC_COMMSSTATE, TNC->WEB_COMMSSTATE);
+ MySetWindowText(TNC, TNC->xIDC_COMMSSTATE, TNC->WEB_COMMSSTATE);
TNC->Alerted = TRUE;
}
@@ -1614,7 +1592,7 @@ TNCRunning: TNC->Alerted = TRUE;
sprintf(TNC->WEB_COMMSSTATE, "Connected to WinRPR TNC");
- MySetWindowText(TNC->xIDC_COMMSSTATE, TNC->WEB_COMMSSTATE);
+ MySetWindowText(TNC, TNC->xIDC_COMMSSTATE, TNC->WEB_COMMSSTATE);
FreeSemaphore(&Semaphore);
@@ -1666,7 +1644,7 @@ Lost: WritetoConsoleLocal(Msg);
sprintf(TNC->WEB_COMMSSTATE, "Connection to TNC lost");
- MySetWindowText(TNC->xIDC_COMMSSTATE, TNC->WEB_COMMSSTATE);
+ MySetWindowText(TNC, TNC->xIDC_COMMSSTATE, TNC->WEB_COMMSSTATE);
TNC->CONNECTED = FALSE;
TNC->Alerted = FALSE;
|
