From f4bc43f75d0ee3bea207e99f745fb5585b192f48 Mon Sep 17 00:00:00 2001 From: g8bpq Date: Mon, 14 Nov 2022 14:02:28 +0000 Subject: 6.0.23.26 --- TNCCode.c | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) (limited to 'TNCCode.c') diff --git a/TNCCode.c b/TNCCode.c index 96b6851..8b73e91 100644 --- a/TNCCode.c +++ b/TNCCode.c @@ -1,5 +1,5 @@ /* -Copyright 2001-2018 John Wiseman G8BPQ +Copyright 2001-2022 John Wiseman G8BPQ This file is part of LinBPQ/BPQ32. @@ -97,6 +97,43 @@ VOID TNCTimerProc() } } +VOID SendSmartID(struct PORTCONTROL * PORT) +{ + struct _MESSAGE * ID = IDMSG; + struct _MESSAGE * Buffer; + + PORT->SmartIDNeeded = 0; + + Buffer = GetBuff(); + + if (Buffer) + { + memcpy(Buffer, ID, ID->LENGTH); + + Buffer->PORT = PORT->PORTNUMBER; + + // IF PORT HAS A CALLSIGN DEFINED, SEND THAT INSTEAD + + if (PORT->PORTCALL[0] > 0x40) + { + memcpy(Buffer->ORIGIN, PORT->PORTCALL, 7); + Buffer->ORIGIN[6] |= 1; // SET END OF CALL BIT + } + + // If Pactor Style add to UI_Q + + if (PORT->PROTOCOL == 10 && PORT->TNC && PORT->TNC->Hardware != H_KISSHF && PORT->UICAPABLE) + { + EXTPORTDATA * EXTPORT = (EXTPORTDATA *) PORT; + + C_Q_ADD(&EXTPORT->UI_Q, Buffer); + return; + } + + PUT_ON_PORT_Q(PORT, Buffer); + } +} + VOID SENDIDMSG() { -- cgit v1.2.3