diff options
| author | Dave Hibberd <hibby@debian.org> | 2025-07-14 23:14:11 +0100 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2025-07-14 23:14:11 +0100 |
| commit | b2315840b26a7ae5c38b0f9ed25e597f320c545e (patch) | |
| tree | 4eaec3a3c8f5825155c5a94161dbd7e360a35c0e /BBSUtilities.c | |
| parent | 0d3ee7fd56efa24ba652fbc17f98dd10458e8054 (diff) | |
New upstream version 6.0.24.75+repackupstream/6.0.24.75+repack
Diffstat (limited to 'BBSUtilities.c')
| -rw-r--r-- | BBSUtilities.c | 58 |
1 files changed, 55 insertions, 3 deletions
diff --git a/BBSUtilities.c b/BBSUtilities.c index d7291d0..90b4c7b 100644 --- a/BBSUtilities.c +++ b/BBSUtilities.c @@ -69,6 +69,10 @@ extern BPQVECSTRUC ** BPQHOSTVECPTR; UCHAR * GetLogDirectory();
DllExport int APIENTRY SessionStateNoAck(int stream, int * state);
int RefreshWebMailIndex();
+struct PORTCONTROL * GetPortTableEntryFromSlot(int portslot);
+int GetPortHardwareType(struct PORTCONTROL *PORT);
+int GetNumberofPorts();
+
#else
__declspec(dllimport) BPQVECSTRUC ** BPQHOSTVECPTR;
typedef char * (WINAPI FAR *FARPROCZ)();
@@ -5252,7 +5256,6 @@ char * CheckToAddress(CIRCUIT * conn, char * Addr) return NewAddr;
}
}
- else
{
WPRecP WP = LookupWP(Addr);
@@ -5473,7 +5476,18 @@ BOOL DecodeSendParams(CIRCUIT * conn, char * Context, char ** From, char *To, ch }
else
{
- conn->LocalMsg = TRUE;
+ // See if a WP entry
+
+ WP = LookupWP(To);
+
+ if (WP)
+ {
+ *ATBBS = WP->first_homebbs;
+ nodeprintf(conn, "Address @%s added from WP\r", *ATBBS);
+ conn->LocalMsg = FALSE;
+ }
+ else
+ conn->LocalMsg = TRUE;
}
}
else
@@ -9052,6 +9066,10 @@ CheckForSID: return TRUE;
}
+#ifndef LINBPQ
+extern FARPROCX pGetPortHardwareType;
+#endif
+
VOID Parse_SID(CIRCUIT * conn, char * SID, int len)
{
ChangeSessionIdletime(conn->BPQStream, BBSIDLETIME); // Default Idletime for BBS Sessions
@@ -9108,10 +9126,44 @@ VOID Parse_SID(CIRCUIT * conn, char * SID, int len) {
// We should really only do this on Telnet Connections, as OpenBCM flag is used to remove relnet transparency
+ // See if Telnet
+
+ struct PORTCONTROL * PORT;
+ char Call[11] = "";
+ int port, dummy;
+
+ GetConnectionInfo(conn->BPQStream, Call, &port, &dummy, &dummy, &dummy, &dummy);
+
+ PORT = GetPortTableEntryFromSlot(0); // Get first entry
+
+ do
+ {
+ if (PORT->PORTNUMBER == port)
+ break;
+
+ PORT=PORT->PORTPOINTER;
+
+ } while (PORT);
+
+#define H_TELNET 6
+
+#ifndef LINBPQ
+
+ if (pGetPortHardwareType)
+ {
+ if (PORT && GetPortHardwareType(PORT) == H_TELNET)
+ conn->OpenBCM = TRUE;
+ }
+ else
+ conn->OpenBCM = TRUE; // Old Node version so follow old behavoiur and treat all as telnet
+#else
+ if (PORT && GetPortHardwareType(PORT) == H_TELNET)
+ conn->OpenBCM = TRUE;
+#endif
- conn->OpenBCM = TRUE;
}
+
if (_memicmp(SID, "PMS-3.2", 7) == 0)
{
// Paccom TNC that doesn't send newline prompt ater receiving subject
|
