diff options
Diffstat (limited to 'L4Code.c')
| -rw-r--r-- | L4Code.c | 27 |
1 files changed, 18 insertions, 9 deletions
@@ -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;
|
