summaryrefslogtreecommitdiff
path: root/SerialPort.c
diff options
context:
space:
mode:
Diffstat (limited to 'SerialPort.c')
-rw-r--r--SerialPort.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/SerialPort.c b/SerialPort.c
index d3b045b..a79475e 100644
--- a/SerialPort.c
+++ b/SerialPort.c
@@ -308,10 +308,6 @@ ok:
// 100 mS Timer. May now be needed, as Poll can be called more frequently in some circumstances
- SerialCheckRX(TNC);
- return 0;
-
- case 1: // poll
while (TNC->PortRecord->UI_Q)
{
@@ -353,6 +349,17 @@ ok:
SerialSendCommand(TNC, "DISCONNECT\r");
}
}
+ }
+
+ return 0;
+
+ case 1: // poll
+
+ SerialCheckRX(TNC);
+
+ for (Stream = 0; Stream <= 2; Stream++)
+ {
+ STREAM = &TNC->Streams[Stream];
if (TNC->PortRecord->ATTACHEDSESSIONS[Stream] && STREAM->Attached == 0)
{
@@ -376,7 +383,7 @@ ok:
SuspendOtherPorts(TNC);
//sprintf(TNC->WEB_TNCSTATE, "In Use by %s", TNC->Streams[0].MyCall);
- //MySetWindowText(TNC->xIDC_TNCSTATE, TNC->WEB_TNCSTATE);
+ //MySetWindowText(TNC, TNC->xIDC_TNCSTATE, TNC->WEB_TNCSTATE);
// Stop Scanning
@@ -574,7 +581,7 @@ ok:
// Save Command, and wait up to 10 secs
sprintf(TNC->WEB_TNCSTATE, "Waiting for clear channel");
- MySetWindowText(TNC->xIDC_TNCSTATE, TNC->WEB_TNCSTATE);
+ MySetWindowText(TNC, TNC->xIDC_TNCSTATE, TNC->WEB_TNCSTATE);
TNC->ConnectCmd = _strdup(Connect);
TNC->BusyDelay = TNC->BusyWait * 10; // BusyWait secs
@@ -589,7 +596,7 @@ ok:
sprintf(TNC->WEB_TNCSTATE, "%s Connecting to %s", STREAM->MyCall, STREAM->RemoteCall);
SerialSendCommand(TNC, Connect);
- MySetWindowText(TNC->xIDC_TNCSTATE, TNC->WEB_TNCSTATE);
+ MySetWindowText(TNC, TNC->xIDC_TNCSTATE, TNC->WEB_TNCSTATE);
STREAM->Connecting = TRUE;
return 0;