From 85f200a46cf5e002e59e36b11ab4fba2f0422b33 Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Tue, 11 Nov 2025 21:50:47 +0000 Subject: New upstream version 6.0.25.11+repack --- L4Code.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'L4Code.c') diff --git a/L4Code.c b/L4Code.c index 4bb6e18..a319504 100644 --- a/L4Code.c +++ b/L4Code.c @@ -73,6 +73,7 @@ void OutgoingL4ConnectionEvent(TRANSPORTENTRY * L4); void IncomingL4ConnectionEvent(TRANSPORTENTRY * L4); void L4DisconnectEvent(TRANSPORTENTRY * L4, char * Direction, char * Reason); VOID TCPNETROMSend(struct ROUTE * Route, struct _L3MESSAGEBUFFER * Frame); +void L4StatusSeport(TRANSPORTENTRY * L4); static UINT APPLMASK; @@ -89,6 +90,8 @@ extern int L2Compress; extern int L2CompMaxframe; extern int L2CompPaclen; +int sessionStatusInterval = 300; // 5 mins + // L4 Flags Values #define DISCPENDING 8 // SEND DISC WHEN ALL DATA ACK'ED @@ -1128,6 +1131,7 @@ VOID L4TimerProc() TRANSPORTENTRY * L4 = L4TABLE; TRANSPORTENTRY * Partner; int MaxLinks = MAXLINKS; + time_t Now = time(NULL); while (n--) { @@ -1136,6 +1140,12 @@ VOID L4TimerProc() L4++; continue; } + + // Check for Status report time + + if (L4->lastStatusSentTime && (Now - L4->lastStatusSentTime) > sessionStatusInterval) + L4StatusSeport(L4); + // CHECK FOR L4BUSY SET AND NO LONGER BUSY @@ -1601,13 +1611,8 @@ VOID CONNECTREQUEST(struct _LINKTABLE * LINK, L3MESSAGEBUFFER * L3MSG, UINT Appl int Index; char APPLCMD[13] = ""; -<<<<<<< Updated upstream - memcpy(APPLCMD, APPL->APPLCMD, 13); -||||||| Stash base -======= if (APPL) memcpy(APPLCMD, APPL->APPLCMD, 13); ->>>>>>> Stashed changes memcpy(BPQPARAMS, &L4T1, 2); // SET DEFAULT T1 IN CASE NOT FROM ANOTHER BPQ NODE @@ -1680,12 +1685,8 @@ VOID CONNECTREQUEST(struct _LINKTABLE * LINK, L3MESSAGEBUFFER * L3MSG, UINT Appl { // At the moment I only handle connects to appls. May support other node commands later. -<<<<<<< Updated upstream -||||||| Stash base -======= memcpy(APPLCMD, CMD->String, 13); ->>>>>>> Stashed changes if (n < APPL1 + NumberofAppls) goto doAPPLConnect; } @@ -2270,6 +2271,14 @@ VOID FRAMEFORUS(struct _LINKTABLE * LINK, L3MESSAGEBUFFER * L3MSG, int ApplMask, return; } + // if connect to service don't send connected to node messsage as service will send own message + +// if (L4->Service) +// { +// ReleaseBuffer(L3MSG); +// return; +// } + Msg = (PDATAMESSAGE)L3MSG; // reuse input buffer Msg->PID = 0xf0; -- cgit v1.2.3