diff options
| author | Dave Hibberd <hibby@debian.org> | 2024-11-05 21:03:15 +0000 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2024-11-05 21:03:15 +0000 |
| commit | 424c0bd3e14d3ddda6c2d945b6465d51c462c76b (patch) | |
| tree | 80b44cbe3f5fc19de1c057e37c761a95a0518a44 /ARDOP.c | |
| parent | eb0d36d3f67be13de74023adb6d30362d47805fe (diff) | |
New upstream version 6.0.24.49upstream/6.0.24.49
Diffstat (limited to 'ARDOP.c')
| -rw-r--r-- | ARDOP.c | 45 |
1 files changed, 16 insertions, 29 deletions
@@ -314,7 +314,7 @@ void SendARDOPorPacketData(struct TNCINFO * TNC, int Stream, UCHAR * Buff, int t if (Stream == 0)
{
ARDOPSendData(TNC, Buff, txlen);
- STREAM->BytesTXed += txlen;
+ STREAM->bytesTXed += txlen;
WritetoTrace(TNC, Buff, txlen);
}
else
@@ -1274,7 +1274,7 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff) UCHAR * data = &buffptr->Data[0];
STREAM->FramesQueued--;
txlen = (int)buffptr->Len;
- STREAM->BytesTXed += txlen;
+ STREAM->bytesTXed += txlen;
if (Stream == 0)
{
@@ -1381,7 +1381,7 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff) {
bytes=ARDOPSendData(TNC, &buff->L2DATA[0], txlen);
TNC->Streams[Stream].BytesOutstanding += bytes; // So flow control works - will be updated by BUFFER response
- STREAM->BytesTXed += bytes;
+ STREAM->bytesTXed += bytes;
WritetoTrace(TNC, &buff->L2DATA[0], txlen);
}
else
@@ -1627,6 +1627,8 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff) ARDOPChangeMYC(TNC, TNC->Streams[0].MyCall);
+ hookL4SessionAttempt(STREAM, &buff->L2DATA[2], TNC->Streams[0].MyCall);
+
// See if Busy
if (InterlockedCheckBusy(TNC))
@@ -2263,7 +2265,7 @@ VOID TNCLost(struct TNCINFO * TNC) if (Stream == 0)
{
sprintf(TNC->WEB_TRAFFIC, "Sent %d RXed %d Queued %d",
- STREAM->BytesTXed - STREAM->BytesOutstanding, STREAM->BytesRXed, STREAM->BytesOutstanding);
+ STREAM->bytesTXed - STREAM->BytesOutstanding, STREAM->bytesRXed, STREAM->BytesOutstanding);
MySetWindowText(TNC->xIDC_TRAFFIC, TNC->WEB_TRAFFIC);
}
@@ -3063,7 +3065,7 @@ VOID ARDOPProcessResponse(struct TNCINFO * TNC, UCHAR * Buffer, int MsgLen) }
sprintf(TNC->WEB_TRAFFIC, "Sent %d RXed %d Queued %d",
- STREAM->BytesTXed - STREAM->BytesOutstanding, STREAM->BytesRXed, STREAM->BytesOutstanding);
+ STREAM->bytesTXed - STREAM->BytesOutstanding, STREAM->bytesRXed, STREAM->BytesOutstanding);
MySetWindowText(TNC->xIDC_TRAFFIC, TNC->WEB_TRAFFIC);
return;
}
@@ -3083,7 +3085,7 @@ VOID ARDOPProcessResponse(struct TNCINFO * TNC, UCHAR * Buffer, int MsgLen) WritetoTrace(TNC, Buffer, MsgLen - 1);
STREAM->ConnectTime = time(NULL);
- STREAM->BytesRXed = STREAM->BytesTXed = STREAM->PacketsSent = 0;
+ STREAM->bytesRXed = STREAM->bytesTXed = STREAM->PacketsSent = 0;
memcpy(Call, &Buffer[10], 10);
@@ -3260,7 +3262,7 @@ VOID ARDOPProcessResponse(struct TNCINFO * TNC, UCHAR * Buffer, int MsgLen) STREAM->NeedDisc = 100; // 10 secs
}
}
-
+ strcpy(STREAM->MyCall, TNC->TargetCall);
return;
}
else
@@ -3347,29 +3349,13 @@ VOID ARDOPProcessResponse(struct TNCINFO * TNC, UCHAR * Buffer, int MsgLen) WritetoTrace(TNC, Buffer, MsgLen - 1);
- // Release Session3
+ // Release Session
if (TNC->Streams[0].Connected)
{
// Create a traffic record
- char logmsg[120];
- time_t Duration;
-
- Duration = time(NULL) - STREAM->ConnectTime;
-
- if (Duration == 0)
- Duration = 1;
-
- sprintf(logmsg,"Port %2d %9s Bytes Sent %d BPS %d Bytes Received %d BPS %d Time %d Seconds",
- TNC->Port, STREAM->RemoteCall,
- STREAM->BytesTXed, (int)(STREAM->BytesTXed/Duration),
- STREAM->BytesRXed, (int)(STREAM->BytesRXed/Duration), (int)Duration);
-
- Debugprintf(logmsg);
-
- STREAM->ConnectTime = 0; // Prevent retrigger
-
+ hookL4SessionDeleted(TNC, STREAM);
}
@@ -3850,13 +3836,12 @@ VOID ARDOPProcessDataPacket(struct TNCINFO * TNC, UCHAR * Type, UCHAR * Data, in return;
}
- STREAM->BytesRXed += Length;
+ STREAM->bytesRXed += Length;
Data[Length] = 0;
- Debugprintf("ARDOP: RXD %d bytes", Length);
sprintf(TNC->WEB_TRAFFIC, "Sent %d RXed %d Queued %d",
- STREAM->BytesTXed - STREAM->BytesOutstanding, STREAM->BytesRXed, STREAM->BytesOutstanding);
+ STREAM->bytesTXed - STREAM->BytesOutstanding, STREAM->bytesRXed, STREAM->BytesOutstanding);
MySetWindowText(TNC->xIDC_TRAFFIC, TNC->WEB_TRAFFIC);
@@ -3959,6 +3944,8 @@ VOID ARDOPProcessDataPacket(struct TNCINFO * TNC, UCHAR * Type, UCHAR * Data, in BPQTRACE((MESSAGE *)buffptr, TRUE);
+ ReleaseBuffer(buffptr);
+
}
else
{
@@ -5003,7 +4990,7 @@ tcpHostFrame: WritetoTrace(TNC, Buffer, len);
STREAM->ConnectTime = time(NULL);
- STREAM->BytesRXed = STREAM->BytesTXed = STREAM->PacketsSent = 0;
+ STREAM->bytesRXed = STREAM->bytesTXed = STREAM->PacketsSent = 0;
memcpy(Call, &Buffer[19], 10);
ptr = strchr(Call, ' ');
|
