From 1f40ff4a07793ecfa679a1384053451c4f3f536f Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Tue, 22 Jul 2025 20:56:59 +0100 Subject: New upstream version 6.0.24.77+repack --- CommonCode.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'CommonCode.c') diff --git a/CommonCode.c b/CommonCode.c index f00b8f6..9c0032d 100644 --- a/CommonCode.c +++ b/CommonCode.c @@ -77,6 +77,8 @@ char * stristr (char *ch1, char *ch2); extern VOID * ENDBUFFERPOOL; +extern int PoolBuilt; + // Read/Write length field in a buffer header @@ -363,7 +365,7 @@ BOK1: if (n > 1000) { - Debugprintf("Loop searching free chain - pointer = %p %p", debug, pointer); + Debugprintf("Releasebuffer Loop searching free chain - pointer = %p %p from %s Line %d", debug, pointer, File, Line); return 0; } } @@ -376,6 +378,11 @@ BOK1: QCOUNT++; + if (PoolBuilt && QCOUNT > MAXBUFFS) + { + Debugprintf("Releasebuffer QCOUNT > MAXBUFFS - pointer = %p from %s Line %d", pointer, File, Line); + return 0; + } return 0; } @@ -473,7 +480,7 @@ int C_Q_ADD_NP(VOID *PQ, VOID *PBUFF) next = Q[0]; while (next[0] != 0) - next=next[0]; // Chain to end of queue + next = next[0]; // Chain to end of queue next[0] = BUFF; // New one on end @@ -1061,6 +1068,7 @@ BOOL ReadConfigFile(int Port, int ProcLine(char * buf, int Port)) WritetoConsoleLocal("\n"); WritetoConsoleLocal("Bad config record "); WritetoConsoleLocal(errbuf); + WritetoConsoleLocal("\n"); } } } @@ -1124,6 +1132,11 @@ int CompareNode(struct DEST_LIST ** a, struct DEST_LIST ** b) return memcmp(a[0]->DEST_CALL, b[0]->DEST_CALL, 7); } +int CompareRoutes(struct ROUTE ** a, struct ROUTE ** b) +{ + return memcmp(a[0]->NEIGHBOUR_CALL, b[0]->NEIGHBOUR_CALL, 7); +} + DllExport int APIENTRY CountFramesQueuedOnStream(int Stream) { BPQVECSTRUC * PORTVEC = &BPQHOSTVECTOR[Stream-1]; // API counts from 1 @@ -2129,7 +2142,16 @@ int CanPortDigi(int Port) return TRUE; } -struct PORTCONTROL * APIENTRY GetPortTableEntryFromPortNum(int portnum) +DllExport int APIENTRY GetPortHardwareType(struct PORTCONTROL *PORT) +{ + if (PORT) + return PORT->Hardware; + + return 0; +} + + +DllExport struct PORTCONTROL * APIENTRY GetPortTableEntryFromPortNum(int portnum) { struct PORTCONTROL * PORTVEC = PORTTABLE; -- cgit v1.2.3