6.0.23.21
This commit is contained in:
parent
9d98903fcc
commit
4a4271cb07
12
APRSCode.c
12
APRSCode.c
|
@ -1047,20 +1047,24 @@ VOID APRSClose()
|
|||
#endif
|
||||
}
|
||||
|
||||
time_t lastSecTimer = 0;
|
||||
|
||||
|
||||
Dll VOID APIENTRY Poll_APRS()
|
||||
{
|
||||
SecTimer--;
|
||||
time_t Now = time(NULL);
|
||||
|
||||
if (SecTimer == 0)
|
||||
if (lastSecTimer != Now)
|
||||
{
|
||||
SecTimer = 10;
|
||||
lastSecTimer = Now;
|
||||
|
||||
DoSecTimer();
|
||||
|
||||
MinTimer--;
|
||||
|
||||
if (MinTimer == 0)
|
||||
{
|
||||
MinTimer = 10;
|
||||
MinTimer = 60;
|
||||
DoMinTimer();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -443,8 +443,9 @@ BOOL CheckForTooManyErrors(ConnectionInfo * conn)
|
|||
|
||||
VOID __cdecl Debugprintf(const char * format, ...)
|
||||
{
|
||||
char Mess[1000];
|
||||
va_list(arglist);int Len;
|
||||
char Mess[16384];
|
||||
va_list(arglist);
|
||||
int Len;
|
||||
|
||||
va_start(arglist, format);
|
||||
Len = vsprintf(Mess, format, arglist);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
8
Bpq32.c
8
Bpq32.c
|
@ -1108,7 +1108,13 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
|||
// Fix length of commands sent via CMD_TO_APPL flag (14)
|
||||
// Add filter by quality option to N display (15)
|
||||
// Fix VARA Mode reporting to WL2K (16)
|
||||
// Add FLRIG POWER anf TUNE commands (18)
|
||||
// Add FLRIG POWER and TUNE commands (18)
|
||||
// Fix crash when processing "C " without a call in UZ7HO, FLDIGI or MULTIPSK drivers (19)
|
||||
// FLDIGI improvements (19)
|
||||
// Fix hang at start if Telnet port Number > Number of Telnet Streams (20)
|
||||
// Fix processing C command if first port driver is SCSPACTROR (20)
|
||||
// Fix crash in UZ7HO driver if bad raw frame received (21)
|
||||
|
||||
|
||||
#define CKernel
|
||||
|
||||
|
|
BIN
CBPQ32.ncb
BIN
CBPQ32.ncb
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
2
Cmd.c
2
Cmd.c
|
@ -2235,7 +2235,7 @@ NoPort:
|
|||
|
||||
// Skip call validation if using a ptc to allow 1:call, 2:call format
|
||||
|
||||
if (PORT->PROTOCOL == 10 && memcmp(EXTPORT->PORT_DLL_NAME, "SCSPACTOR", 9) == 0)
|
||||
if (Port && PORT->PROTOCOL == 10 && memcmp(EXTPORT->PORT_DLL_NAME, "SCSPACTOR", 9) == 0)
|
||||
{
|
||||
char * p;
|
||||
|
||||
|
|
76
CommonCode.c
76
CommonCode.c
|
@ -70,6 +70,8 @@ char * FormatMH(PMHSTRUC MH, char Format);
|
|||
void WriteConnectLog(char * fromCall, char * toCall, UCHAR * Mode);
|
||||
extern BOOL LogAllConnects;
|
||||
|
||||
extern VOID * ENDBUFFERPOOL;
|
||||
|
||||
// Read/Write length field in a buffer header
|
||||
|
||||
// Needed for Big/LittleEndian and ARM5 (unaligned operation problem) portability
|
||||
|
@ -231,12 +233,45 @@ UINT _ReleaseBuffer(VOID *pBUFF, char * File, int Line)
|
|||
int n = 0;
|
||||
void ** debug;
|
||||
PMESSAGE Test;
|
||||
UINT CodeDump[16];
|
||||
int i;
|
||||
unsigned int rev;
|
||||
|
||||
if (Semaphore.Flag == 0)
|
||||
Debugprintf("ReleaseBuffer called without semaphore from %s Line %d", File, Line);
|
||||
|
||||
// Make sure address is within pool
|
||||
|
||||
if ((uintptr_t)BUFF < (uintptr_t)BUFFERPOOL || (uintptr_t)BUFF > (uintptr_t)ENDBUFFERPOOL)
|
||||
{
|
||||
// Not pointing to a buffer . debug points to the buffer that this is chained from
|
||||
|
||||
// Dump first chunk and source tag
|
||||
|
||||
memcpy(CodeDump, BUFF, 64);
|
||||
|
||||
Debugprintf("Releasebuffer Buffer not in pool, ptr %p prev %d", BUFF, 0);
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
rev = (CodeDump[i] & 0xff) << 24;
|
||||
rev |= (CodeDump[i] & 0xff00) << 8;
|
||||
rev |= (CodeDump[i] & 0xff0000) >> 8;
|
||||
rev |= (CodeDump[i] & 0xff000000) >> 24;
|
||||
|
||||
CodeDump[i] = rev;
|
||||
}
|
||||
|
||||
Debugprintf("%08x %08x %08x %08x %08x %08x %08x %08x %08x ",
|
||||
Bufferlist[n], CodeDump[0], CodeDump[1], CodeDump[2], CodeDump[3], CodeDump[4], CodeDump[5], CodeDump[6], CodeDump[7]);
|
||||
|
||||
Debugprintf(" %08x %08x %08x %08x %08x %08x %08x %08x",
|
||||
CodeDump[8], CodeDump[9], CodeDump[10], CodeDump[11], CodeDump[12], CodeDump[13], CodeDump[14], CodeDump[15]);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Test = (PMESSAGE)pBUFF;
|
||||
|
||||
if (Test->GuardZone != 0)
|
||||
|
@ -259,17 +294,54 @@ BOK1:
|
|||
|
||||
n = 0;
|
||||
|
||||
// See if already on free Queue
|
||||
// validate free Queue
|
||||
|
||||
pointer = FREE_Q;
|
||||
debug = &FREE_Q;
|
||||
|
||||
while (pointer)
|
||||
{
|
||||
// Validate pointer to make sure it is in pool - it may be a duff address if Q is corrupt
|
||||
|
||||
Test = (PMESSAGE)pointer;
|
||||
|
||||
if (Test->GuardZone || (uintptr_t)pointer < (uintptr_t)BUFFERPOOL || (uintptr_t)pointer > (uintptr_t)ENDBUFFERPOOL)
|
||||
{
|
||||
// Not pointing to a buffer . debug points to the buffer that this is chained from
|
||||
|
||||
// Dump first chunk and source tag
|
||||
|
||||
memcpy(CodeDump, debug, 64);
|
||||
|
||||
Debugprintf("Releasebuffer Pool Corruption n = %d, ptr %p prev %p", n, pointer, debug);
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
rev = (CodeDump[i] & 0xff) << 24;
|
||||
rev |= (CodeDump[i] & 0xff00) << 8;
|
||||
rev |= (CodeDump[i] & 0xff0000) >> 8;
|
||||
rev |= (CodeDump[i] & 0xff000000) >> 24;
|
||||
|
||||
CodeDump[i] = rev;
|
||||
}
|
||||
|
||||
Debugprintf("%08x %08x %08x %08x %08x %08x %08x %08x %08x ",
|
||||
Bufferlist[n], CodeDump[0], CodeDump[1], CodeDump[2], CodeDump[3], CodeDump[4], CodeDump[5], CodeDump[6], CodeDump[7]);
|
||||
|
||||
Debugprintf(" %08x %08x %08x %08x %08x %08x %08x %08x",
|
||||
CodeDump[8], CodeDump[9], CodeDump[10], CodeDump[11], CodeDump[12], CodeDump[13], CodeDump[14], CodeDump[15]);
|
||||
|
||||
if (debug[400])
|
||||
Debugprintf(" %s", &debug[400]);
|
||||
|
||||
}
|
||||
|
||||
// See if already on free Queue
|
||||
|
||||
if (pointer == BUFF)
|
||||
{
|
||||
Debugprintf("Trying to free buffer %p when already on FREE_Q", BUFF);
|
||||
// WriteMiniDump();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
68
ConfigSDR.c
68
ConfigSDR.c
|
@ -27,6 +27,10 @@ int PlaybackCount = 0;
|
|||
int IndexA = -1; // Card number
|
||||
int IndexB = -1; // Card number
|
||||
int IndexC = -1; // Card number
|
||||
int IndexD = -1; // Card number
|
||||
int SPEAKERS = -1; // Card number
|
||||
|
||||
int Device = 0;
|
||||
|
||||
HWAVEOUT hWaveOut = 0;
|
||||
HWAVEIN hWaveIn = 0;
|
||||
|
@ -34,6 +38,24 @@ HWAVEIN hWaveIn = 0;
|
|||
char CaptureNames[16][MAXPNAMELEN + 2] = { "" };
|
||||
char PlaybackNames[16][MAXPNAMELEN + 2] = { "" };
|
||||
|
||||
char * strlop(char * buf, char delim)
|
||||
{
|
||||
// Terminate buf at delim, and return rest of string
|
||||
|
||||
char * ptr;
|
||||
|
||||
if (buf == NULL) return NULL; // Protect
|
||||
|
||||
ptr = strchr(buf, delim);
|
||||
|
||||
if (ptr == NULL) return NULL;
|
||||
|
||||
*(ptr)++ = 0;
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
void main(int argc, char * argv[])
|
||||
{
|
||||
int i;
|
||||
|
@ -41,7 +63,7 @@ void main(int argc, char * argv[])
|
|||
FILE *file;
|
||||
|
||||
char line[1024] = "";
|
||||
char index[16];
|
||||
char index[64];
|
||||
char * ptr;
|
||||
|
||||
|
||||
|
@ -78,8 +100,39 @@ void main(int argc, char * argv[])
|
|||
IndexB = i;
|
||||
else if (strstr(&PlaybackNames[i][0], "CABLE-C"))
|
||||
IndexC = i;
|
||||
else if (strstr(&PlaybackNames[i][0], "CABLE-D"))
|
||||
IndexD = i;
|
||||
else if (strstr(&PlaybackNames[i][0], "SPEAKERS"))
|
||||
SPEAKERS = i;
|
||||
}
|
||||
|
||||
if ((infile = fopen("C:\\Users\\johnw\\AppData\\Roaming\\SDRplay\\SDRuno.ini", "rb")) == NULL)
|
||||
return;
|
||||
|
||||
if ((file = fopen("C:\\Users\\johnw\\AppData\\Roaming\\SDRplay\\SDRuno.in.new", "wb")) == NULL)
|
||||
return;
|
||||
|
||||
while ((fgets(line, 1023, infile)))
|
||||
{
|
||||
if (ptr = strstr(line, "iOutputAudioDeviceID"))
|
||||
{
|
||||
char * ptr2 = strchr(ptr, '=');
|
||||
|
||||
*ptr2 = 0;
|
||||
|
||||
Device = atoi(ptr2 + 1);
|
||||
|
||||
sprintf(index, "=%s", &PlaybackNames[Device][0]);
|
||||
strlop(index, ' ');
|
||||
strcat(index, "\r\n");
|
||||
strcat(line, index);
|
||||
}
|
||||
fprintf(file, line);
|
||||
}
|
||||
|
||||
fclose(file);
|
||||
fclose(infile);
|
||||
|
||||
if ((infile = fopen("C:\\Users\\johnw\\AppData\\Roaming\\SDRplay\\SDRuno.in", "rb")) == NULL)
|
||||
return;
|
||||
|
||||
|
@ -106,6 +159,19 @@ void main(int argc, char * argv[])
|
|||
sprintf(index, "%d\r\n", IndexC);
|
||||
strcat(line, index);
|
||||
}
|
||||
if (ptr = strstr(line, "CABLE-D"))
|
||||
{
|
||||
*ptr = 0;
|
||||
sprintf(index, "%d\r\n", IndexD);
|
||||
strcat(line, index);
|
||||
}
|
||||
if (ptr = strstr(line, "SPEAKERS"))
|
||||
{
|
||||
*ptr = 0;
|
||||
sprintf(index, "%d\r\n", SPEAKERS);
|
||||
strcat(line, index);
|
||||
}
|
||||
|
||||
fprintf(file, line);
|
||||
}
|
||||
|
||||
|
|
200
FLDigi.c
200
FLDigi.c
|
@ -80,7 +80,7 @@ static int RestartTNC(struct TNCINFO * TNC);
|
|||
VOID ProcessFLDigiPacket(struct TNCINFO * TNC, char * Message, int Len);
|
||||
VOID ProcessFLDigiKISSPacket(struct TNCINFO * TNC, char * Message, int Len);
|
||||
struct TNCINFO * GetSessionKey(char * key, struct TNCINFO * TNC);
|
||||
VOID SendARQData(struct TNCINFO * TNC, UINT * Buffer);
|
||||
VOID SendARQData(struct TNCINFO * TNC, PMSGWITHLEN Buffer);
|
||||
static VOID DoMonitorHddr(struct TNCINFO * TNC, struct AGWHEADER * RXHeader, UCHAR * Msg);
|
||||
VOID SendRPBeacon(struct TNCINFO * TNC);
|
||||
VOID FLReleaseTNC(struct TNCINFO * TNC);
|
||||
|
@ -101,6 +101,7 @@ VOID SendKISSCommand(struct TNCINFO * TNC, char * Msg);
|
|||
int DoScanLine(struct TNCINFO * TNC, char * Buff, int Len);
|
||||
VOID SuspendOtherPorts(struct TNCINFO * ThisTNC);
|
||||
VOID ReleaseOtherPorts(struct TNCINFO * ThisTNC);
|
||||
VOID WritetoTrace(struct TNCINFO * TNC, char * Msg, int Len);
|
||||
|
||||
char * strlop(char * buf, char delim);
|
||||
|
||||
|
@ -168,6 +169,7 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
|||
int Stream = 0;
|
||||
struct STREAMINFO * STREAM;
|
||||
int TNCOK;
|
||||
size_t Param;
|
||||
|
||||
if (TNC == NULL)
|
||||
return 0; // Port not defined
|
||||
|
@ -264,11 +266,11 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
|||
{
|
||||
// Timed out - Send Error Response
|
||||
|
||||
UINT * buffptr = GetBuff();
|
||||
PMSGWITHLEN buffptr = GetBuff();
|
||||
|
||||
if (buffptr == 0) return (0); // No buffers, so ignore
|
||||
|
||||
buffptr[1]=39;
|
||||
buffptr->Len=39;
|
||||
memcpy(buffptr+2,"Sorry, Can't Connect - Channel is busy\r", 39);
|
||||
|
||||
C_Q_ADD(&TNC->Streams[0].PACTORtoBPQ_Q, buffptr);
|
||||
|
@ -321,7 +323,7 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
|||
lasttime[port]=ltime;
|
||||
}
|
||||
}
|
||||
|
||||
pollloop:
|
||||
FD_ZERO(&readfs);
|
||||
|
||||
if (TNC->CONNECTED)
|
||||
|
@ -355,6 +357,7 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
|||
// data available
|
||||
|
||||
ProcessReceivedData(port);
|
||||
goto pollloop;
|
||||
}
|
||||
|
||||
if (FD_ISSET(TNC->TCPSock,&readfs))
|
||||
|
@ -444,10 +447,11 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
|||
buff->PORT = Stream; // Compatibility with Kam Driver
|
||||
buff->PID = 0xf0;
|
||||
memcpy(&buff->L2DATA, &buffptr->Data[0], datalen); // Data goes to + 7, but we have an extra byte
|
||||
datalen += sizeof(void *) + 4;
|
||||
datalen += (MSGHDDRLEN + 1);
|
||||
|
||||
PutLengthinBuffer(buff, datalen);
|
||||
|
||||
WritetoTrace(TNC, &buffptr->Data[0], datalen - (MSGHDDRLEN + 1));
|
||||
ReleaseBuffer(buffptr);
|
||||
|
||||
return (1);
|
||||
|
@ -492,7 +496,7 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
|||
|
||||
// txlen=(buff[6]<<8) + buff[5] - 8;
|
||||
|
||||
txlen = GetLengthfromBuffer((PDATAMESSAGE)buff) - 8;
|
||||
txlen = GetLengthfromBuffer((PDATAMESSAGE)buff) - (MSGHDDRLEN + 1); // 1 as no PID;
|
||||
|
||||
if (STREAM->Connected)
|
||||
{
|
||||
|
@ -503,6 +507,8 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
|||
buffptr->Len = txlen;
|
||||
memcpy(buffptr->Data, buff->L2DATA, txlen);
|
||||
|
||||
WritetoTrace(TNC, buffptr->Data, txlen);
|
||||
|
||||
C_Q_ADD(&TNC->Streams[Stream].BPQtoPACTOR_Q, buffptr);
|
||||
|
||||
return (0);
|
||||
|
@ -669,11 +675,11 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
|||
|
||||
if (_memicmp(&buff->L2DATA[0], "MCAST", 5) == 0)
|
||||
{
|
||||
UINT * buffptr = GetBuff();
|
||||
PMSGWITHLEN buffptr = GetBuff();
|
||||
|
||||
TNC->FLInfo->MCASTMODE = TRUE;
|
||||
|
||||
buffptr[1] = sprintf((UCHAR *)&buffptr[2], "FLDigi} Ok\r");
|
||||
buffptr->Len = sprintf(buffptr->Data, "FLDigi} Ok\r");
|
||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||
|
||||
return 1;
|
||||
|
@ -683,7 +689,7 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
|||
{
|
||||
// Return Error if in use, OK if not
|
||||
|
||||
UINT * buffptr = GetBuff();
|
||||
PMSGWITHLEN buffptr = GetBuff();
|
||||
int s = 0;
|
||||
|
||||
while(s <= 1)
|
||||
|
@ -692,14 +698,14 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
|||
{
|
||||
if (TNC->PortRecord->ATTACHEDSESSIONS[s])
|
||||
{
|
||||
buffptr[1] = sprintf((UCHAR *)&buffptr[2], "FLDig} Error - In use\r");
|
||||
buffptr->Len = sprintf(buffptr->Data, "FLDig} Error - In use\r");
|
||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||
return 1; // Busy
|
||||
}
|
||||
}
|
||||
s++;
|
||||
}
|
||||
buffptr[1] = sprintf((UCHAR *)&buffptr[2], "FLDigi} Ok - Not in use\r");
|
||||
buffptr->Len = sprintf(buffptr->Data, "FLDigi} Ok - Not in use\r");
|
||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||
|
||||
return 1;
|
||||
|
@ -728,6 +734,23 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
|||
memset(STREAM->RemoteCall, 0, 10);
|
||||
|
||||
ptr = strtok_s(&buff->L2DATA[2], " ,\r", &context);
|
||||
|
||||
if (ptr == 0)
|
||||
{
|
||||
PMSGWITHLEN buffptr = (PMSGWITHLEN)GetBuff();
|
||||
|
||||
if (buffptr)
|
||||
{
|
||||
buffptr->Len = sprintf(buffptr->Data,
|
||||
"FLDigi} Error - Call missing from C command\r");
|
||||
|
||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||
}
|
||||
|
||||
STREAM->DiscWhenAllSent = 10;
|
||||
return 0;
|
||||
}
|
||||
|
||||
strcpy(STREAM->RemoteCall, ptr);
|
||||
|
||||
// See if Busy
|
||||
|
@ -763,6 +786,8 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
|||
ARQ->ARQTimerState = ARQ_CONNECTING;
|
||||
SaveAndSend(TNC, ARQ, TNC->TCPDataSock, Reply, SendLen);
|
||||
|
||||
Debugprintf("FLDIGI Connection %s", Reply);
|
||||
|
||||
STREAM->Connecting = TRUE;
|
||||
|
||||
sprintf(TNC->WEB_TNCSTATE, "%s Connecting to %s", STREAM->MyCall, STREAM->RemoteCall);
|
||||
|
@ -862,6 +887,47 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
|||
}
|
||||
|
||||
return 0;
|
||||
|
||||
case 6: // Scan Stop Interface
|
||||
|
||||
Param = (size_t)buff;
|
||||
|
||||
if (Param == 2) // Check Permission (shouldn't happen)
|
||||
{
|
||||
Debugprintf("Scan Check Permission called on FLDIGI");
|
||||
return 1; // OK to change
|
||||
}
|
||||
|
||||
if (!TNC->CONNECTED)
|
||||
return 0; // No connection so no interlock
|
||||
|
||||
if (Param == 1) // Request Permission
|
||||
{
|
||||
if (TNC->ConnectPending == 0)
|
||||
{
|
||||
TNC->FLInfo->CONOK = FALSE;
|
||||
TNC->GavePermission = TRUE;
|
||||
return 0; // OK to Change
|
||||
}
|
||||
|
||||
if (TNC->ConnectPending)
|
||||
TNC->ConnectPending--; // Time out if set too long
|
||||
|
||||
if (!TNC->ConnectPending)
|
||||
return 0; // OK to Change
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (Param == 3) // Release Permission
|
||||
{
|
||||
if (TNC->GavePermission)
|
||||
{
|
||||
TNC->FLInfo->CONOK = TRUE;
|
||||
TNC->GavePermission = FALSE;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -1126,12 +1192,14 @@ VOID * FLDigiExtInit(EXTPORTDATA * PortEntry)
|
|||
PortEntry->PERMITGATEWAY = TRUE; // Can change ax.25 call on each stream
|
||||
PortEntry->PORTCONTROL.UICAPABLE = 1; // Can send beacons
|
||||
PortEntry->PORTCONTROL.PORTQUALITY = 0;
|
||||
PortEntry->SCANCAPABILITIES = NONE; // Scan Control - None
|
||||
PortEntry->SCANCAPABILITIES = SIMPLE;
|
||||
|
||||
// Scan Control - None
|
||||
|
||||
TNC->FLInfo->CONOK = TRUE;
|
||||
|
||||
if (PortEntry->PORTCONTROL.PORTPACLEN == 0 || PortEntry->PORTCONTROL.PORTPACLEN > 128)
|
||||
PortEntry->PORTCONTROL.PORTPACLEN = 64;
|
||||
if (PortEntry->PORTCONTROL.PORTPACLEN == 0)
|
||||
PortEntry->PORTCONTROL.PORTPACLEN = 250;
|
||||
|
||||
TNC->SuspendPortProc = FLDIGISuspendPort;
|
||||
TNC->ReleasePortProc = FLDIGIReleasePort;
|
||||
|
@ -1769,13 +1837,13 @@ static int ProcessReceivedData(int port)
|
|||
|
||||
if (TNC->InternalCmd)
|
||||
{
|
||||
ULONG * buffptr = GetBuff();
|
||||
PMSGWITHLEN buffptr = GetBuff();
|
||||
|
||||
TNC->InternalCmd = FALSE;
|
||||
|
||||
if (buffptr)
|
||||
{
|
||||
buffptr[1] = sprintf((UCHAR *)&buffptr[2], "FLDIGI} Ok %s\r", &Message[2]);
|
||||
buffptr->Len = sprintf(buffptr->Data, "FLDIGI} Ok %s\r", &Message[2]);
|
||||
C_Q_ADD(&TNC->Streams[0].PACTORtoBPQ_Q, buffptr);
|
||||
}
|
||||
|
||||
|
@ -1865,6 +1933,8 @@ static int ProcessReceivedData(int port)
|
|||
ptr1[19] = 0;
|
||||
|
||||
strcpy(TNC->FLInfo->CurrentMode, ptr1);
|
||||
|
||||
TNC->ConnectPending = 3; // Lock Scan for 3
|
||||
}
|
||||
|
||||
if (memcmp(&Message[2], "MODEM:", 6) == 0)
|
||||
|
@ -1896,12 +1966,15 @@ static int ProcessReceivedData(int port)
|
|||
{
|
||||
// "RAW" Mode. Just process as if received from TCP Socket Interface
|
||||
|
||||
// Debugprintf("7 %d %s", TNC->PortRecord->PORTCONTROL.PORTNUMBER, &Message[2]);
|
||||
ProcessFLDigiPacket(TNC, &Message[2] , bytes - 3); // Data may be for another port
|
||||
continue;
|
||||
}
|
||||
|
||||
bytes -= 3; // Two FEND and Control
|
||||
|
||||
// Debugprintf("0 %d %s", TNC->PortRecord->PORTCONTROL.PORTNUMBER, &Message[2]);
|
||||
|
||||
// Undo KISS
|
||||
|
||||
while (bytes)
|
||||
|
@ -1924,6 +1997,7 @@ static int ProcessReceivedData(int port)
|
|||
}
|
||||
ProcessFLDigiData(TNC, &Message[3], (int)(out - &Message[3]), Message[2], FALSE); // KISS not RAW
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2020,7 +2094,7 @@ VOID ProcessFLDigiPacket(struct TNCINFO * TNC, char * Message, int Len)
|
|||
{
|
||||
// Got a packet
|
||||
|
||||
UINT * buffptr;
|
||||
PMSGWITHLEN buffptr;
|
||||
int Stream = 0;
|
||||
struct STREAMINFO * STREAM = &TNC->Streams[0];
|
||||
|
||||
|
@ -2030,7 +2104,7 @@ VOID ProcessFLDigiPacket(struct TNCINFO * TNC, char * Message, int Len)
|
|||
{
|
||||
TNC->DataBuffer[TNC->DataLen++] = 13; // Keep Tidy
|
||||
|
||||
buffptr[1] = TNC->DataLen;
|
||||
buffptr->Len = TNC->DataLen;
|
||||
memcpy(&buffptr[2], &TNC->DataBuffer[0], TNC->DataLen);
|
||||
|
||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||
|
@ -2362,7 +2436,7 @@ F0F2<SOH>
|
|||
*/
|
||||
VOID ProcessFLDigiData(struct TNCINFO * TNC, UCHAR * Input, int Len, char Channel, BOOL RAW)
|
||||
{
|
||||
UINT * buffptr;
|
||||
PMSGWITHLEN buffptr;
|
||||
int Stream = 0;
|
||||
struct STREAMINFO * STREAM = &TNC->Streams[0];
|
||||
char CTRL = Input[0];
|
||||
|
@ -2400,6 +2474,8 @@ VOID ProcessFLDigiData(struct TNCINFO * TNC, UCHAR * Input, int Len, char Channe
|
|||
struct WL2KInfo * WL2K = TNC->WL2K;
|
||||
TRANSPORTENTRY * SESS;
|
||||
|
||||
TNC->ConnectPending = 0;
|
||||
|
||||
if (FL->CONOK == FALSE)
|
||||
return;
|
||||
|
||||
|
@ -2409,6 +2485,7 @@ VOID ProcessFLDigiData(struct TNCINFO * TNC, UCHAR * Input, int Len, char Channe
|
|||
port1 = strlop(call1, ':');
|
||||
port2 = strlop(call2, ':');
|
||||
|
||||
|
||||
// See if for us
|
||||
|
||||
for (App = 0; App < 32; App++)
|
||||
|
@ -2443,7 +2520,7 @@ VOID ProcessFLDigiData(struct TNCINFO * TNC, UCHAR * Input, int Len, char Channe
|
|||
|
||||
SuspendOtherPorts(TNC);
|
||||
|
||||
ProcessIncommingConnect(TNC, call1, 0, FALSE);
|
||||
ProcessIncommingConnect(TNC, call1, 0, TRUE);
|
||||
|
||||
SESS = TNC->PortRecord->ATTACHEDSESSIONS[0];
|
||||
|
||||
|
@ -2515,8 +2592,8 @@ VOID ProcessFLDigiData(struct TNCINFO * TNC, UCHAR * Input, int Len, char Channe
|
|||
return; // No buffers, so ignore
|
||||
}
|
||||
|
||||
buffptr[1] = MsgLen;
|
||||
memcpy(buffptr+2, Buffer, MsgLen);
|
||||
buffptr->Len = MsgLen;
|
||||
memcpy(buffptr->Data, Buffer, MsgLen);
|
||||
|
||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||
|
||||
|
@ -2541,22 +2618,6 @@ VOID ProcessFLDigiData(struct TNCINFO * TNC, UCHAR * Input, int Len, char Channe
|
|||
|
||||
ARQ->ARQTimer = 10; // To force CTEXT to be Queued
|
||||
|
||||
if (App == 32)
|
||||
{
|
||||
// Connect to Node - send CTEXT
|
||||
|
||||
if (HFCTEXTLEN > 1)
|
||||
{
|
||||
buffptr = GetBuff();
|
||||
if (buffptr)
|
||||
{
|
||||
buffptr[1] = HFCTEXTLEN;
|
||||
memcpy(&buffptr[2], HFCTEXT, HFCTEXTLEN);
|
||||
SendARQData(TNC, buffptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (STREAM->NeedDisc)
|
||||
{
|
||||
// Send Not Avail
|
||||
|
@ -2564,7 +2625,7 @@ VOID ProcessFLDigiData(struct TNCINFO * TNC, UCHAR * Input, int Len, char Channe
|
|||
buffptr = GetBuff();
|
||||
if (buffptr)
|
||||
{
|
||||
buffptr[1] = sprintf((char *)&buffptr[2], "Application Not Available\n");
|
||||
buffptr->Len = sprintf(buffptr->Data, "Application Not Available\n");
|
||||
SendARQData(TNC, buffptr);
|
||||
}
|
||||
}
|
||||
|
@ -2654,8 +2715,8 @@ AckConnectRequest:
|
|||
{
|
||||
ReplyLen = sprintf(Reply, "*** Connected to %s\r", STREAM->RemoteCall);
|
||||
|
||||
buffptr[1] = ReplyLen;
|
||||
memcpy(buffptr+2, Reply, ReplyLen);
|
||||
buffptr->Len = ReplyLen;
|
||||
memcpy(buffptr->Data, Reply, ReplyLen);
|
||||
|
||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||
}
|
||||
|
@ -2821,7 +2882,7 @@ SendKReply:
|
|||
STREAM->Connecting = FALSE;
|
||||
STREAM->ReportDISC = TRUE;
|
||||
|
||||
strcpy(TNC->WEB_PROTOSTATE, "Disconncted");
|
||||
strcpy(TNC->WEB_PROTOSTATE, "Disconnected");
|
||||
SetWindowText(TNC->xIDC_PROTOSTATE, TNC->WEB_PROTOSTATE);
|
||||
|
||||
ARQ->ARQState = 0;
|
||||
|
@ -2883,7 +2944,7 @@ SendKReply:
|
|||
|
||||
STREAM->Disconnecting = FALSE;
|
||||
|
||||
strcpy(TNC->WEB_PROTOSTATE, "Disconncted");
|
||||
strcpy(TNC->WEB_PROTOSTATE, "Disconnected");
|
||||
SetWindowText(TNC->xIDC_PROTOSTATE, TNC->WEB_PROTOSTATE);
|
||||
|
||||
return;
|
||||
|
@ -2923,7 +2984,7 @@ SendKReply:
|
|||
buffptr = GetBuff();
|
||||
|
||||
if (buffptr == NULL)
|
||||
return; // Sould never run out, but cant do much else
|
||||
return; // Should never run out, but cant do much else
|
||||
|
||||
// Remove any DLE transparency
|
||||
|
||||
|
@ -2932,8 +2993,8 @@ SendKReply:
|
|||
else
|
||||
Len = UnStuff(&Input[1], Len - 1);
|
||||
|
||||
buffptr[1] = Len;
|
||||
memcpy(&buffptr[2], &Input[1], Len);
|
||||
buffptr->Len = Len;
|
||||
memcpy(buffptr->Data, &Input[1], Len);
|
||||
STREAM->BytesRXed += Len;
|
||||
|
||||
UpdateStatsLine(TNC, STREAM);
|
||||
|
@ -2972,7 +3033,6 @@ SendKReply:
|
|||
// We have it
|
||||
|
||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, ARQ->RXHOLDQ[Work]);
|
||||
// ReleaseBuffer(ARQ->RXHOLDQ[Work]);
|
||||
|
||||
ARQ->RXHOLDQ[Work] = NULL;
|
||||
// Debugprintf("Processing %d from Q", Work);
|
||||
|
@ -2988,7 +3048,7 @@ SendKReply:
|
|||
}
|
||||
|
||||
|
||||
VOID SendARQData(struct TNCINFO * TNC, UINT * Buffer)
|
||||
VOID SendARQData(struct TNCINFO * TNC, PMSGWITHLEN Buffer)
|
||||
{
|
||||
// Send Data, saving a copy until acked.
|
||||
|
||||
|
@ -3001,7 +3061,7 @@ VOID SendARQData(struct TNCINFO * TNC, UINT * Buffer)
|
|||
SOCKET sock = TNC->TCPDataSock;
|
||||
int SendLen;
|
||||
UCHAR * ptr;
|
||||
int Origlen = Buffer[1];
|
||||
int Origlen = Buffer->Len;
|
||||
int Stuffedlen;
|
||||
|
||||
ARQ->TXSeq++;
|
||||
|
@ -3009,9 +3069,9 @@ VOID SendARQData(struct TNCINFO * TNC, UINT * Buffer)
|
|||
|
||||
SendLen = sprintf(TXBuffer, "%c", ARQ->TXSeq + 32);
|
||||
|
||||
ptr = (UCHAR *)&Buffer[2]; // Start of data;
|
||||
ptr = (UCHAR *)&Buffer->Data; // Start of data;
|
||||
|
||||
ptr[Buffer[1]] = 0;
|
||||
ptr[Buffer->Len] = 0;
|
||||
|
||||
if (memcmp(ptr, "ARQ:", 4) == 0)
|
||||
{
|
||||
|
@ -3035,12 +3095,12 @@ VOID SendARQData(struct TNCINFO * TNC, UINT * Buffer)
|
|||
|
||||
if (TNC->FLInfo->KISSMODE)
|
||||
{
|
||||
memcpy(&TXBuffer[SendLen], (UCHAR *)&Buffer[2], Origlen);
|
||||
memcpy(&TXBuffer[SendLen], (UCHAR *)&Buffer->Data, Origlen);
|
||||
SendLen += Origlen;
|
||||
}
|
||||
else
|
||||
{
|
||||
Stuffedlen = Stuff((UCHAR *)&Buffer[2], &TXBuffer[SendLen], Origlen);
|
||||
Stuffedlen = Stuff((UCHAR *)&Buffer->Data, &TXBuffer[SendLen], Origlen);
|
||||
SendLen += Stuffedlen;
|
||||
}
|
||||
|
||||
|
@ -3081,7 +3141,7 @@ VOID TidyClose(struct TNCINFO * TNC, int Stream)
|
|||
SaveAndSend(TNC, ARQ, TNC->TCPDataSock, Reply, SendLen);
|
||||
ARQ->ARQTimerState = ARQ_DISC;
|
||||
|
||||
strcpy(TNC->WEB_PROTOSTATE, "Disconncting");
|
||||
strcpy(TNC->WEB_PROTOSTATE, "Disconnecting");
|
||||
SetWindowText(TNC->xIDC_PROTOSTATE, TNC->WEB_PROTOSTATE);
|
||||
}
|
||||
|
||||
|
@ -3159,7 +3219,7 @@ VOID SaveAndSend(struct TNCINFO * TNC, struct ARQINFO * ARQ, SOCKET sock, char *
|
|||
VOID ARQTimer(struct TNCINFO * TNC)
|
||||
{
|
||||
struct ARQINFO * ARQ = TNC->ARQInfo;
|
||||
UINT * buffptr;
|
||||
PMSGWITHLEN buffptr;
|
||||
struct STREAMINFO * STREAM = &TNC->Streams[0];
|
||||
int SendLen;
|
||||
char Reply[80];
|
||||
|
@ -3275,6 +3335,12 @@ VOID ARQTimer(struct TNCINFO * TNC)
|
|||
{
|
||||
while (STREAM->BPQtoPACTOR_Q)
|
||||
{
|
||||
if (ARQ->ARQState != ARQ_ACTIVE)
|
||||
break;
|
||||
|
||||
if (ARQ->ARQTimerState == ARQ_CONNECTACK)
|
||||
break;
|
||||
|
||||
Outstanding = ARQ->TXSeq - ARQ->TXLastACK;
|
||||
|
||||
if (Outstanding < 0)
|
||||
|
@ -3353,7 +3419,7 @@ VOID ARQTimer(struct TNCINFO * TNC)
|
|||
|
||||
if (buffptr)
|
||||
{
|
||||
buffptr[1] = sprintf((UCHAR *)&buffptr[2], "FLDigi} Failure with %s\r", STREAM->RemoteCall);
|
||||
buffptr->Len = sprintf(buffptr->Data, "FLDigi} Failure with %s\r", STREAM->RemoteCall);
|
||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||
}
|
||||
|
||||
|
@ -3403,7 +3469,7 @@ VOID ProcessARQStatus(struct TNCINFO * TNC, struct ARQINFO * ARQ, char * Input)
|
|||
char * ptr;
|
||||
int NexttoResend;
|
||||
int First, Last, Outstanding;
|
||||
UINT * Buffer;
|
||||
PMSGWITHLEN Buffer;
|
||||
struct STREAMINFO * STREAM = &TNC->Streams[0];
|
||||
int Acked = 0;
|
||||
|
||||
|
@ -3431,7 +3497,7 @@ VOID ProcessARQStatus(struct TNCINFO * TNC, struct ARQINFO * ARQ, char * Input)
|
|||
if (Buffer)
|
||||
{
|
||||
// Debugprintf("Acked %d", FirstUnAcked);
|
||||
STREAM->BytesAcked += Buffer[1];
|
||||
STREAM->BytesAcked += Buffer->Len;
|
||||
ReleaseBuffer(Buffer);
|
||||
ARQ->TXHOLDQ[FirstUnAcked] = NULL;
|
||||
Acked++;
|
||||
|
@ -3475,7 +3541,7 @@ VOID ProcessARQStatus(struct TNCINFO * TNC, struct ARQINFO * ARQ, char * Input)
|
|||
if (Buffer)
|
||||
{
|
||||
// Debugprintf("Acked %d", FirstUnAcked);
|
||||
STREAM->BytesAcked += Buffer[1];
|
||||
STREAM->BytesAcked += Buffer->Len;
|
||||
ReleaseBuffer(Buffer);
|
||||
ARQ->TXHOLDQ[FirstUnAcked] = NULL;
|
||||
Acked++;
|
||||
|
@ -3502,7 +3568,7 @@ VOID ProcessARQStatus(struct TNCINFO * TNC, struct ARQINFO * ARQ, char * Input)
|
|||
if (Buffer)
|
||||
{
|
||||
// Debugprintf("Acked %d", FirstUnAcked);
|
||||
STREAM->BytesAcked += Buffer[1];
|
||||
STREAM->BytesAcked += Buffer->Len;
|
||||
ReleaseBuffer(Buffer);
|
||||
ARQ->TXHOLDQ[FirstUnAcked] = NULL;
|
||||
Acked++;
|
||||
|
@ -3523,24 +3589,24 @@ VOID ProcessARQStatus(struct TNCINFO * TNC, struct ARQINFO * ARQ, char * Input)
|
|||
|
||||
if(ARQ->TXHOLDQ[First])
|
||||
{
|
||||
UINT * Buffer = ARQ->TXHOLDQ[First];
|
||||
PMSGWITHLEN Buffer = ARQ->TXHOLDQ[First];
|
||||
UCHAR TXBuffer[300];
|
||||
SOCKET sock = TNC->TCPDataSock;
|
||||
int SendLen;
|
||||
|
||||
// Debugprintf("Resend %d", First);
|
||||
|
||||
STREAM->BytesResent += Buffer[1];
|
||||
STREAM->BytesResent += Buffer->Len;
|
||||
|
||||
SendLen = sprintf(TXBuffer, "%c", First + 32);
|
||||
|
||||
if (TNC->FLInfo->KISSMODE)
|
||||
{
|
||||
memcpy(&TXBuffer[SendLen], (UCHAR *)&Buffer[2], Buffer[1]);
|
||||
SendLen += Buffer[1];
|
||||
memcpy(&TXBuffer[SendLen], (UCHAR *)&Buffer->Data, Buffer->Len);
|
||||
SendLen += Buffer->Len;
|
||||
}
|
||||
else
|
||||
SendLen += Stuff((UCHAR *)&Buffer[2], &TXBuffer[SendLen], Buffer[1]);
|
||||
SendLen += Stuff((UCHAR *)&Buffer->Data, &TXBuffer[SendLen], Buffer->Len);
|
||||
|
||||
TXBuffer[SendLen] = 0;
|
||||
|
||||
|
@ -3661,7 +3727,7 @@ static int ProcessXMLData(int port)
|
|||
|
||||
if (TNC->InternalCmd)
|
||||
{
|
||||
ULONG * buffptr = GetBuff();
|
||||
PMSGWITHLEN buffptr = GetBuff();
|
||||
|
||||
TNC->InternalCmd = FALSE;
|
||||
|
||||
|
@ -3684,7 +3750,7 @@ static int ProcessXMLData(int port)
|
|||
|
||||
if (buffptr)
|
||||
{
|
||||
buffptr[1] = sprintf((UCHAR *)&buffptr[2], "FLDIGI} Ok Was %s\r", ptr1);
|
||||
buffptr->Len = sprintf(buffptr->Data, "FLDIGI} Ok Was %s\r", ptr1);
|
||||
C_Q_ADD(&TNC->Streams[0].PACTORtoBPQ_Q, buffptr);
|
||||
}
|
||||
}
|
||||
|
|
780
FreeDATA.c
780
FreeDATA.c
File diff suppressed because it is too large
Load Diff
44
HALDriver.c
44
HALDriver.c
|
@ -316,7 +316,7 @@ ConfigLine:
|
|||
static size_t ExtProc(int fn, int port,unsigned char * buff)
|
||||
{
|
||||
int txlen = 0;
|
||||
UINT * buffptr;
|
||||
PMSGWITHLEN buffptr;
|
||||
struct TNCINFO * TNC = TNCInfo[port];
|
||||
struct STREAMINFO * STREAM;
|
||||
int Stream;
|
||||
|
@ -362,11 +362,11 @@ static size_t ExtProc(int fn, int port,unsigned char * buff)
|
|||
|
||||
buffptr=Q_REM(&STREAM->PACTORtoBPQ_Q);
|
||||
|
||||
datalen=buffptr[1];
|
||||
datalen=buffptr->Len;
|
||||
|
||||
buff[4] = 0;
|
||||
buff[7] = 0xf0;
|
||||
memcpy(&buff[8],buffptr+2,datalen); // Data goes to +7, but we have an extra byte
|
||||
memcpy(&buff[8],buffptr->Data,datalen); // Data goes to +7, but we have an extra byte
|
||||
datalen+=8;
|
||||
|
||||
PutLengthinBuffer((PDATAMESSAGE)buff, datalen);
|
||||
|
@ -396,8 +396,8 @@ static size_t ExtProc(int fn, int port,unsigned char * buff)
|
|||
{
|
||||
// Send Error Response
|
||||
|
||||
buffptr[1] = 36;
|
||||
memcpy(buffptr+2, "No Connection to PACTOR TNC\r", 36);
|
||||
buffptr->Len = 36;
|
||||
memcpy(buffptr->Data, "No Connection to PACTOR TNC\r", 36);
|
||||
|
||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||
|
||||
|
@ -406,8 +406,8 @@ static size_t ExtProc(int fn, int port,unsigned char * buff)
|
|||
|
||||
txlen = GetLengthfromBuffer((PDATAMESSAGE)buff) - 8;
|
||||
|
||||
buffptr[1] = txlen;
|
||||
memcpy(buffptr+2, &buff[8], txlen);
|
||||
buffptr->Len = txlen;
|
||||
memcpy(buffptr->Data, &buff[8], txlen);
|
||||
|
||||
C_Q_ADD(&STREAM->BPQtoPACTOR_Q, buffptr);
|
||||
|
||||
|
@ -833,13 +833,13 @@ VOID HALPoll(int Port)
|
|||
if (TNC->TNCOK && STREAM->BPQtoPACTOR_Q && (STREAM->BytesTXed - STREAM->BytesAcked < 600))
|
||||
{
|
||||
int datalen;
|
||||
UINT * buffptr;
|
||||
PMSGWITHLEN buffptr;
|
||||
UCHAR * MsgPtr;
|
||||
unsigned char TXMsg[500];
|
||||
|
||||
buffptr = (UINT * )STREAM->BPQtoPACTOR_Q;
|
||||
datalen=buffptr[1];
|
||||
MsgPtr = (UCHAR *)&buffptr[2];
|
||||
datalen=buffptr->Len;
|
||||
MsgPtr = (UCHAR *)buffptr->Data;
|
||||
|
||||
if (STREAM->Connected)
|
||||
{
|
||||
|
@ -900,7 +900,7 @@ VOID HALPoll(int Port)
|
|||
}
|
||||
else
|
||||
{
|
||||
buffptr[1] = sprintf((UCHAR *)&buffptr[2], "%s", &MsgPtr[40]);
|
||||
buffptr->Len = sprintf((UCHAR *)buffptr->Data, "%s", &MsgPtr[40]);
|
||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||
}
|
||||
return;
|
||||
|
@ -909,7 +909,7 @@ VOID HALPoll(int Port)
|
|||
if (memcmp(MsgPtr, "MODE CLOVER", 11) == 0)
|
||||
{
|
||||
TNC->CurrentMode = Clover;
|
||||
buffptr[1] = sprintf((UCHAR *)&buffptr[2],"HAL} Ok\r");
|
||||
buffptr->Len = sprintf((UCHAR *)buffptr->Data,"HAL} Ok\r");
|
||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||
|
||||
MySetWindowText(TNC->xIDC_MODE, "Clover");
|
||||
|
@ -925,7 +925,7 @@ VOID HALPoll(int Port)
|
|||
if (memcmp(MsgPtr, "MODE PACTOR", 11) == 0)
|
||||
{
|
||||
TNC->CurrentMode = Pactor;
|
||||
buffptr[1] = sprintf((UCHAR *)&buffptr[2],"HAL} Ok\r");
|
||||
buffptr->Len = sprintf((UCHAR *)buffptr->Data,"HAL} Ok\r");
|
||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||
|
||||
SendCmd(TNC, "\x84", 1); // FSK
|
||||
|
@ -937,7 +937,7 @@ VOID HALPoll(int Port)
|
|||
if (memcmp(MsgPtr, "MODE AMTOR", 11) == 0)
|
||||
{
|
||||
TNC->CurrentMode = AMTOR;
|
||||
buffptr[1] = sprintf((UCHAR *)&buffptr[2],"HAL} Ok\r");
|
||||
buffptr->Len = sprintf((UCHAR *)buffptr->Data,"HAL} Ok\r");
|
||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||
|
||||
return;
|
||||
|
@ -1080,7 +1080,7 @@ VOID ProcessHALData(struct TNCINFO * TNC)
|
|||
{
|
||||
// Received Data just pass to Appl
|
||||
|
||||
UINT * buffptr;
|
||||
PMSGWITHLEN buffptr;
|
||||
int Len = TNC->DataLen;
|
||||
struct STREAMINFO * STREAM = &TNC->Streams[0];
|
||||
|
||||
|
@ -1118,13 +1118,13 @@ VOID ProcessHALData(struct TNCINFO * TNC)
|
|||
if (buffptr == NULL)
|
||||
return; // No buffers, so ignore
|
||||
|
||||
buffptr[1] = Len; // Length
|
||||
buffptr->Len = Len; // Length
|
||||
|
||||
WriteLogLine(1, TNC->DataBuffer, Len);
|
||||
|
||||
STREAM->BytesRXed += Len;
|
||||
|
||||
memcpy(&buffptr[2], TNC->DataBuffer, Len);
|
||||
memcpy(buffptr->Data, TNC->DataBuffer, Len);
|
||||
|
||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||
}
|
||||
|
@ -1708,7 +1708,7 @@ VOID HALDisconnected(struct TNCINFO * TNC)
|
|||
|
||||
if (STREAM->Connecting && STREAM->Disconnecting == FALSE)
|
||||
{
|
||||
UINT * buffptr;
|
||||
PMSGWITHLEN buffptr;
|
||||
|
||||
// Connect Failed - actually I think HAL uses another code for connect failed, but leave here for now
|
||||
|
||||
|
@ -1716,7 +1716,7 @@ VOID HALDisconnected(struct TNCINFO * TNC)
|
|||
|
||||
if (buffptr)
|
||||
{
|
||||
buffptr[1] = sprintf((UCHAR *)&buffptr[2], "*** Failure with %s\r", STREAM->RemoteCall);
|
||||
buffptr->Len = sprintf(buffptr->Data, "*** Failure with %s\r", STREAM->RemoteCall);
|
||||
|
||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||
}
|
||||
|
@ -1750,7 +1750,7 @@ VOID HALDisconnected(struct TNCINFO * TNC)
|
|||
BOOL HALConnected(struct TNCINFO * TNC, char * Call)
|
||||
{
|
||||
char Msg[80];
|
||||
UINT * buffptr;
|
||||
PMSGWITHLEN buffptr;
|
||||
struct STREAMINFO * STREAM = &TNC->Streams[0];
|
||||
char CallCopy[80];
|
||||
|
||||
|
@ -1793,7 +1793,7 @@ BOOL HALConnected(struct TNCINFO * TNC, char * Call)
|
|||
buffptr = GetBuff();
|
||||
if (buffptr == 0) return TRUE; // No buffers, so ignore
|
||||
|
||||
buffptr[1] = sprintf((UCHAR *)&buffptr[2], "%s\r", TNC->ApplCmd);
|
||||
buffptr->Len = sprintf((UCHAR *)buffptr->Data, "%s\r", TNC->ApplCmd);
|
||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||
TNC->SwallowSignon = TRUE;
|
||||
|
||||
|
@ -1815,7 +1815,7 @@ BOOL HALConnected(struct TNCINFO * TNC, char * Call)
|
|||
buffptr = GetBuff();
|
||||
if (buffptr == 0) return TRUE; // No buffers, so ignore
|
||||
|
||||
buffptr[1] = sprintf((UCHAR *)&buffptr[2], "*** Connected to %s\r", Call);;
|
||||
buffptr->Len = sprintf((UCHAR *)buffptr->Data, "*** Connected to %s\r", Call);;
|
||||
|
||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||
|
||||
|
|
|
@ -1875,6 +1875,8 @@ int standardParams(struct TNCINFO * TNC, char * buf)
|
|||
char * ptr2 = TNC->PTTOn;
|
||||
int i, j, len;
|
||||
|
||||
_strupr(ptr1);
|
||||
|
||||
TNC->PTTOnLen = len = strlen(ptr1) / 2;
|
||||
|
||||
if (len < 240)
|
||||
|
@ -1905,6 +1907,8 @@ int standardParams(struct TNCINFO * TNC, char * buf)
|
|||
char * ptr2 = TNC->PTTOff;
|
||||
int i, j, len;
|
||||
|
||||
_strupr(ptr);
|
||||
|
||||
TNC->PTTOffLen = len = strlen(ptr) / 2;
|
||||
|
||||
if (len < 240)
|
||||
|
|
|
@ -4275,14 +4275,14 @@ int BuildRigCtlPage(char * _REPLYBUFFER)
|
|||
|
||||
void SendRigWebPage()
|
||||
{
|
||||
int n;
|
||||
int i, n;
|
||||
struct ConnectionInfo * sockptr;
|
||||
struct TNCINFO * TNC;
|
||||
struct TCPINFO * TCP;
|
||||
|
||||
for (n = 0; n < 33; n++)
|
||||
for (i = 0; i < 33; i++)
|
||||
{
|
||||
TNC = TNCInfo[n];
|
||||
TNC = TNCInfo[i];
|
||||
|
||||
if (TNC && TNC->Hardware == H_TELNET)
|
||||
{
|
||||
|
|
17
MULTIPSK.c
17
MULTIPSK.c
|
@ -498,6 +498,23 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
|||
memset(STREAM->RemoteCall, 0, 10);
|
||||
|
||||
ptr = strtok_s(&buff->L2DATA[2], " ,\r", &context);
|
||||
|
||||
if (ptr == 0)
|
||||
{
|
||||
PMSGWITHLEN buffptr = (PMSGWITHLEN)GetBuff();
|
||||
|
||||
if (buffptr)
|
||||
{
|
||||
buffptr->Len = sprintf((UCHAR *)&buffptr->Data[0],
|
||||
"MPSK} Error - Call missing from C command\r", STREAM->MyCall, STREAM->RemoteCall);
|
||||
|
||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||
}
|
||||
|
||||
STREAM->DiscWhenAllSent = 10;
|
||||
return 0;
|
||||
}
|
||||
|
||||
strcpy(STREAM->RemoteCall, ptr);
|
||||
|
||||
len = sprintf(Command,"%cCALLSIGN_TO_CALL_ARQ_FAE %s%c%cSELECTIVE_CALL_ARQ_FAE\x1b",
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
>
|
||||
<DebugSettings
|
||||
Command="$(TargetPath)"
|
||||
WorkingDirectory=""
|
||||
WorkingDirectory="C:\linbpq"
|
||||
CommandArguments=""
|
||||
Attach="false"
|
||||
DebuggerType="3"
|
||||
|
@ -22,7 +22,7 @@
|
|||
SQLDebugging=""
|
||||
Environment=""
|
||||
EnvironmentMerge="true"
|
||||
DebuggerFlavor=""
|
||||
DebuggerFlavor="0"
|
||||
MPIRunCommand=""
|
||||
MPIRunArguments=""
|
||||
MPIRunWorkingDirectory=""
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
>
|
||||
<DebugSettings
|
||||
Command="$(TargetPath)"
|
||||
WorkingDirectory=""
|
||||
WorkingDirectory="c:\linbpq"
|
||||
CommandArguments=""
|
||||
Attach="false"
|
||||
DebuggerType="3"
|
||||
|
@ -22,7 +22,7 @@
|
|||
SQLDebugging=""
|
||||
Environment=""
|
||||
EnvironmentMerge="true"
|
||||
DebuggerFlavor=""
|
||||
DebuggerFlavor="0"
|
||||
MPIRunCommand=""
|
||||
MPIRunArguments=""
|
||||
MPIRunWorkingDirectory=""
|
||||
|
|
|
@ -184,8 +184,10 @@
|
|||
<ClCompile Include="AISCommon.c" />
|
||||
<ClCompile Include="Alloc.c" />
|
||||
<ClCompile Include="APRSCode.c" />
|
||||
<ClCompile Include="APRSIconData.c" />
|
||||
<ClCompile Include="APRSStdPages.c" />
|
||||
<ClCompile Include="ARDOP.c" />
|
||||
<ClCompile Include="base64.c" />
|
||||
<ClCompile Include="BBSHTMLConfig.c" />
|
||||
<ClCompile Include="BBSUtilities.c">
|
||||
<AssemblerOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
|
@ -212,8 +214,10 @@
|
|||
<ClCompile Include="compatbits.c" />
|
||||
<ClCompile Include="config.c" />
|
||||
<ClCompile Include="datadefs.c" />
|
||||
<ClCompile Include="DRATS.c" />
|
||||
<ClCompile Include="FBBRoutines.c" />
|
||||
<ClCompile Include="FLDigi.c" />
|
||||
<ClCompile Include="FreeDATA.c" />
|
||||
<ClCompile Include="HALDriver.c" />
|
||||
<ClCompile Include="HanksRT.c" />
|
||||
<ClCompile Include="HFCommon.c" />
|
||||
|
@ -246,6 +250,23 @@
|
|||
<ClCompile Include="MULTIPSK.c" />
|
||||
<ClCompile Include="NNTPRoutines.c" />
|
||||
<ClCompile Include="pibits.c" />
|
||||
<ClCompile Include="png.c" />
|
||||
<ClCompile Include="pngerror.c" />
|
||||
<ClCompile Include="pnggccrd.c" />
|
||||
<ClCompile Include="pngget.c" />
|
||||
<ClCompile Include="pngmem.c" />
|
||||
<ClCompile Include="pngpread.c" />
|
||||
<ClCompile Include="pngread.c" />
|
||||
<ClCompile Include="pngrio.c" />
|
||||
<ClCompile Include="pngrtran.c" />
|
||||
<ClCompile Include="pngrutil.c" />
|
||||
<ClCompile Include="pngset.c" />
|
||||
<ClCompile Include="pngtrans.c" />
|
||||
<ClCompile Include="pngvcrd.c" />
|
||||
<ClCompile Include="pngwio.c" />
|
||||
<ClCompile Include="pngwrite.c" />
|
||||
<ClCompile Include="pngwtran.c" />
|
||||
<ClCompile Include="pngwutil.c" />
|
||||
<ClCompile Include="RigControl.c" />
|
||||
<ClCompile Include="SCSPactor.c" />
|
||||
<ClCompile Include="SCSTrackeMulti.c" />
|
||||
|
@ -265,6 +286,10 @@
|
|||
<ClCompile Include="WinRPR.c" />
|
||||
<ClCompile Include="WPRoutines.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="png.h" />
|
||||
<ClInclude Include="pngconf.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LocalDebuggerCommandArguments>c:\linbpq</LocalDebuggerCommandArguments>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LocalDebuggerCommandArguments>c:\linbpq</LocalDebuggerCommandArguments>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerCommandArguments>
|
||||
</LocalDebuggerCommandArguments>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerWorkingDirectory>c:\linbpq</LocalDebuggerWorkingDirectory>
|
||||
</PropertyGroup>
|
||||
</Project>
|
22
RigControl.c
22
RigControl.c
|
@ -285,7 +285,7 @@ VOID Rig_PTTEx(struct RIGINFO * RIG, BOOL PTTState, struct TNCINFO * TNC)
|
|||
long long txfreq = 0;
|
||||
|
||||
if (TNC->TXFreq)
|
||||
txfreq = TNC->TXFreq + TNC->TXOffset;
|
||||
txfreq = TNC->TXFreq + TNC->TXOffset + RIG->txError;
|
||||
else if (TNC->RIG && TNC->RIG->txFreq)
|
||||
txfreq = RIG->txFreq; // Used if not associated with a TNC port - eg HAMLIB + WSJT
|
||||
else if (TNC->RIG && TNC->RIG->RigFreq != 0.0)
|
||||
|
@ -299,7 +299,6 @@ VOID Rig_PTTEx(struct RIGINFO * RIG, BOOL PTTState, struct TNCINFO * TNC)
|
|||
|
||||
if (txfreq)
|
||||
{
|
||||
|
||||
if (RIG->lastSetFreq != txfreq)
|
||||
{
|
||||
char FreqString[80];
|
||||
|
@ -348,6 +347,8 @@ VOID Rig_PTTEx(struct RIGINFO * RIG, BOOL PTTState, struct TNCINFO * TNC)
|
|||
memcpy(&onString[onLen], RIG->PTTOn, RIG->PTTOnLen);
|
||||
onLen += RIG->PTTOnLen;
|
||||
|
||||
break;
|
||||
|
||||
case HAMLIB:
|
||||
|
||||
// Dont need to save, as we can send strings separately
|
||||
|
@ -375,6 +376,7 @@ VOID Rig_PTTEx(struct RIGINFO * RIG, BOOL PTTState, struct TNCINFO * TNC)
|
|||
{
|
||||
memcpy(offString, TNC->PTTOff, TNC->PTTOffLen);
|
||||
offLen = TNC->PTTOffLen;
|
||||
RIG->lastSetFreq = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -996,7 +998,7 @@ int Rig_CommandEx(struct RIGPORTINFO * PORT, struct RIGINFO * RIG, int Session,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
sprintf(Command, "Sorry - TUNE only supported on your radio\r");
|
||||
sprintf(Command, "Sorry - TUNE not supported on your radio\r");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -8041,6 +8043,7 @@ VOID FLRIGPoll(struct RIGPORTINFO * PORT)
|
|||
if (GetPermissionToChange(PORT, RIG))
|
||||
{
|
||||
char cmd[80];
|
||||
double freq;
|
||||
|
||||
if (RIG->RIG_DEBUG)
|
||||
Debugprintf("BPQ32 Change Freq to %9.4f", PORT->FreqPtr->Freq);
|
||||
|
@ -8054,6 +8057,19 @@ VOID FLRIGPoll(struct RIGPORTINFO * PORT)
|
|||
sprintf(cmd, "<double>%s</double>", PORT->FreqPtr->Cmd1Msg);
|
||||
FLRIGSendCommand(PORT, "rig.set_vfo", cmd);
|
||||
|
||||
// Update display as we don't get a response
|
||||
|
||||
freq = atof(PORT->FreqPtr->Cmd1Msg) / 1000000.0;
|
||||
|
||||
if (freq > 0.0)
|
||||
{
|
||||
RIG->RigFreq = freq;
|
||||
_gcvt(RIG->RigFreq, 9, RIG->Valchar);
|
||||
|
||||
sprintf(RIG->WEB_FREQ,"%s", RIG->Valchar);
|
||||
MySetWindowText(RIG->hFREQ, RIG->WEB_FREQ);
|
||||
}
|
||||
|
||||
|
||||
PORT->CmdSent = 1;
|
||||
PORT->Retries = 0;
|
||||
|
|
66
UIARQ.c
66
UIARQ.c
|
@ -67,7 +67,7 @@ static int ProcessLine(char * buf, int Port);
|
|||
static VOID ProcessFLDigiPacket(struct TNCINFO * TNC, char * Message, int Len);
|
||||
VOID ProcessFLDigiKISSPacket(struct TNCINFO * TNC, char * Message, int Len);
|
||||
struct TNCINFO * GetSessionKey(char * key, struct TNCINFO * TNC);
|
||||
static VOID SendARQData(struct TNCINFO * TNC, UINT * Buffer, int Stream);
|
||||
static VOID SendARQData(struct TNCINFO * TNC, PMSGWITHLEN Buffer, int Stream);
|
||||
VOID SendRPBeacon(struct TNCINFO * TNC);
|
||||
unsigned int CalcCRC(UCHAR * ptr, int Len);
|
||||
static VOID ARQTimer(struct TNCINFO * TNC);
|
||||
|
@ -103,7 +103,7 @@ static int RigControlRow = 165;
|
|||
|
||||
static int ExtProc(int fn, int port,unsigned char * buff)
|
||||
{
|
||||
UINT * buffptr;
|
||||
PMSGWITHLEN buffptr;
|
||||
unsigned int txlen=0;
|
||||
struct TNCINFO * TNC = TNCInfo[port];
|
||||
int Stream = 0;
|
||||
|
@ -196,12 +196,12 @@ static int ExtProc(int fn, int port,unsigned char * buff)
|
|||
|
||||
buffptr=Q_REM(&STREAM->PACTORtoBPQ_Q);
|
||||
|
||||
datalen=buffptr[1];
|
||||
datalen=buffptr->Len;
|
||||
|
||||
buff[4] = Stream;
|
||||
buff[7] = 0xf0;
|
||||
memcpy(&buff[8],buffptr+2,datalen); // Data goes to +7, but we have an extra byte
|
||||
datalen+=8;
|
||||
memcpy(&buff[8],buffptr->Data,datalen); // Data goes to +7, but we have an extra byte
|
||||
datalen += (MSGHDDRLEN + 1);
|
||||
|
||||
PutLengthinBuffer((PDATAMESSAGE)buff, datalen);
|
||||
|
||||
|
@ -247,7 +247,7 @@ static int ExtProc(int fn, int port,unsigned char * buff)
|
|||
|
||||
// txlen=(buff[6]<<8) + buff[5] - 8;
|
||||
|
||||
txlen = GetLengthfromBuffer((PDATAMESSAGE)buff) - 8;
|
||||
txlen = GetLengthfromBuffer((PDATAMESSAGE)buff) - (MSGHDDRLEN + 1); // 1 as no PID;
|
||||
|
||||
if (STREAM->Connected)
|
||||
{
|
||||
|
@ -255,8 +255,8 @@ static int ExtProc(int fn, int port,unsigned char * buff)
|
|||
|
||||
if (buffptr == 0) return (0); // No buffers, so ignore
|
||||
|
||||
buffptr[1] = txlen;
|
||||
memcpy(buffptr+2, &buff[8], txlen);
|
||||
buffptr->Len = txlen;
|
||||
memcpy(buffptr->Data, &buff[8], txlen);
|
||||
|
||||
C_Q_ADD(&TNC->Streams[Stream].BPQtoPACTOR_Q, buffptr);
|
||||
|
||||
|
@ -738,7 +738,7 @@ F0F2<SOH>
|
|||
*/
|
||||
static VOID ProcessFLDigiData(struct TNCINFO * TNC, UCHAR * Input, int Len, int Stream)
|
||||
{
|
||||
UINT * buffptr;
|
||||
PMSGWITHLEN buffptr;
|
||||
struct STREAMINFO * STREAM = &TNC->Streams[Stream];
|
||||
char CTRL = Input[0];
|
||||
struct ARQINFO * ARQ = STREAM->ARQInfo;
|
||||
|
@ -887,8 +887,8 @@ static VOID ProcessFLDigiData(struct TNCINFO * TNC, UCHAR * Input, int Len, int
|
|||
return; // No buffers, so ignore
|
||||
}
|
||||
|
||||
buffptr[1] = MsgLen;
|
||||
memcpy(buffptr+2, Buffer, MsgLen);
|
||||
buffptr->Len = MsgLen;
|
||||
memcpy(buffptr->Data, Buffer, MsgLen);
|
||||
|
||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||
|
||||
|
@ -922,8 +922,8 @@ static VOID ProcessFLDigiData(struct TNCINFO * TNC, UCHAR * Input, int Len, int
|
|||
buffptr = GetBuff();
|
||||
if (buffptr)
|
||||
{
|
||||
buffptr[1] = HFCTEXTLEN;
|
||||
memcpy(&buffptr[2], HFCTEXT, HFCTEXTLEN);
|
||||
buffptr->Len = HFCTEXTLEN;
|
||||
memcpy(buffptr->Data, HFCTEXT, HFCTEXTLEN);
|
||||
SendARQData(TNC, buffptr, Stream);
|
||||
}
|
||||
}
|
||||
|
@ -936,7 +936,7 @@ static VOID ProcessFLDigiData(struct TNCINFO * TNC, UCHAR * Input, int Len, int
|
|||
buffptr = GetBuff();
|
||||
if (buffptr)
|
||||
{
|
||||
buffptr[1] = sprintf((char *)&buffptr[2], "Application Not Available\r");
|
||||
buffptr->Len = sprintf(buffptr->Data, "Application Not Available\r");
|
||||
SendARQData(TNC, buffptr, Stream);
|
||||
}
|
||||
}
|
||||
|
@ -1031,8 +1031,8 @@ AckConnectRequest:
|
|||
{
|
||||
ReplyLen = sprintf(Reply, "*** Connected to %s\r", STREAM->RemoteCall);
|
||||
|
||||
buffptr[1] = ReplyLen;
|
||||
memcpy(buffptr+2, Reply, ReplyLen);
|
||||
buffptr->Len = ReplyLen;
|
||||
memcpy(buffptr->Data, Reply, ReplyLen);
|
||||
|
||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||
}
|
||||
|
@ -1312,8 +1312,8 @@ SendKReply:
|
|||
|
||||
Len -= 1;
|
||||
|
||||
buffptr[1] = Len;
|
||||
memcpy(&buffptr[2], &Input[1], Len);
|
||||
buffptr->Len = Len;
|
||||
memcpy(buffptr->Data, &Input[1], Len);
|
||||
STREAM->BytesRXed += Len;
|
||||
|
||||
UpdateStatsLine(TNC, STREAM);
|
||||
|
@ -1368,7 +1368,7 @@ SendKReply:
|
|||
}
|
||||
|
||||
|
||||
static VOID SendARQData(struct TNCINFO * TNC, UINT * Buffer, int Stream)
|
||||
static VOID SendARQData(struct TNCINFO * TNC, PMSGWITHLEN Buffer, int Stream)
|
||||
{
|
||||
// Send Data, saving a copy until acked.
|
||||
|
||||
|
@ -1380,18 +1380,18 @@ static VOID SendARQData(struct TNCINFO * TNC, UINT * Buffer, int Stream)
|
|||
SOCKET sock = TNC->TCPDataSock;
|
||||
int SendLen;
|
||||
UCHAR * ptr;
|
||||
int Origlen = Buffer[1];
|
||||
int Origlen = Buffer->Len;
|
||||
|
||||
ARQ->TXSeq++;
|
||||
ARQ->TXSeq &= 63;
|
||||
|
||||
SendLen = sprintf(TXBuffer, "%c", ARQ->TXSeq + 32);
|
||||
|
||||
ptr = (UCHAR *)&Buffer[2]; // Start of data;
|
||||
ptr = Buffer->Data; // Start of data;
|
||||
|
||||
ptr[Buffer[1]] = 0;
|
||||
ptr[Buffer->Len] = 0;
|
||||
|
||||
memcpy(&TXBuffer[SendLen], (UCHAR *)&Buffer[2], Origlen);
|
||||
memcpy(&TXBuffer[SendLen], Buffer->Data, Origlen);
|
||||
SendLen += Origlen;
|
||||
|
||||
TXBuffer[SendLen] = 0;
|
||||
|
@ -1465,7 +1465,7 @@ static VOID SaveAndSend(struct TNCINFO * TNC, struct ARQINFO * ARQ, SOCKET sock,
|
|||
|
||||
static VOID ARQTimer(struct TNCINFO * TNC)
|
||||
{
|
||||
UINT * buffptr;
|
||||
PMSGWITHLEN buffptr;
|
||||
struct STREAMINFO * STREAM;
|
||||
struct ARQINFO * ARQ;
|
||||
int SendLen;
|
||||
|
@ -1630,7 +1630,7 @@ static VOID ARQTimer(struct TNCINFO * TNC)
|
|||
|
||||
if (buffptr)
|
||||
{
|
||||
buffptr[1] = sprintf((UCHAR *)&buffptr[2], "UIARQ} Failure with %s\r", STREAM->RemoteCall);
|
||||
buffptr->Len = sprintf((UCHAR *)&buffptr[2], "UIARQ} Failure with %s\r", STREAM->RemoteCall);
|
||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||
}
|
||||
|
||||
|
@ -1685,7 +1685,7 @@ static VOID ProcessARQStatus(struct TNCINFO * TNC, int Stream, struct ARQINFO *
|
|||
char * ptr;
|
||||
int NexttoResend;
|
||||
int First, Last, Outstanding;
|
||||
UINT * Buffer;
|
||||
PMSGWITHLEN Buffer;
|
||||
int Acked = 0;
|
||||
|
||||
// First status is an ack of Connect ACK
|
||||
|
@ -1714,7 +1714,7 @@ static VOID ProcessARQStatus(struct TNCINFO * TNC, int Stream, struct ARQINFO *
|
|||
if (Buffer)
|
||||
{
|
||||
Debugprintf("Acked %d", FirstUnAcked);
|
||||
STREAM->BytesAcked += Buffer[1];
|
||||
STREAM->BytesAcked += Buffer->Len;
|
||||
ReleaseBuffer(Buffer);
|
||||
ARQ->TXHOLDQ[FirstUnAcked] = NULL;
|
||||
Acked++;
|
||||
|
@ -1759,7 +1759,7 @@ static VOID ProcessARQStatus(struct TNCINFO * TNC, int Stream, struct ARQINFO *
|
|||
if (Buffer)
|
||||
{
|
||||
Debugprintf("Acked %d", FirstUnAcked);
|
||||
STREAM->BytesAcked += Buffer[1];
|
||||
STREAM->BytesAcked += Buffer->Len;
|
||||
ReleaseBuffer(Buffer);
|
||||
ARQ->TXHOLDQ[FirstUnAcked] = NULL;
|
||||
Acked++;
|
||||
|
@ -1786,7 +1786,7 @@ static VOID ProcessARQStatus(struct TNCINFO * TNC, int Stream, struct ARQINFO *
|
|||
if (Buffer)
|
||||
{
|
||||
Debugprintf("Acked %d", FirstUnAcked);
|
||||
STREAM->BytesAcked += Buffer[1];
|
||||
STREAM->BytesAcked += Buffer->Len;
|
||||
ReleaseBuffer(Buffer);
|
||||
ARQ->TXHOLDQ[FirstUnAcked] = NULL;
|
||||
Acked++;
|
||||
|
@ -1807,19 +1807,19 @@ static VOID ProcessARQStatus(struct TNCINFO * TNC, int Stream, struct ARQINFO *
|
|||
|
||||
if(ARQ->TXHOLDQ[First])
|
||||
{
|
||||
UINT * Buffer = ARQ->TXHOLDQ[First];
|
||||
PMSGWITHLEN Buffer = ARQ->TXHOLDQ[First];
|
||||
UCHAR TXBuffer[300];
|
||||
SOCKET sock = TNC->TCPDataSock;
|
||||
int SendLen;
|
||||
|
||||
Debugprintf("Resend %d", First);
|
||||
|
||||
STREAM->BytesResent += Buffer[1];
|
||||
STREAM->BytesResent += Buffer->Len;
|
||||
|
||||
SendLen = sprintf(TXBuffer, "%c", First + 32);
|
||||
|
||||
memcpy(&TXBuffer[SendLen], (UCHAR *)&Buffer[2], Buffer[1]);
|
||||
SendLen += Buffer[1];
|
||||
memcpy(&TXBuffer[SendLen], Buffer->Data, Buffer->Len);
|
||||
SendLen += Buffer->Len;
|
||||
|
||||
TXBuffer[SendLen] = 0;
|
||||
|
||||
|
|
28
UZ7HODrv.c
28
UZ7HODrv.c
|
@ -934,6 +934,22 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
|||
|
||||
ptr = strtok_s(&buff->L2DATA[2], " ,\r", &context);
|
||||
|
||||
if (ptr == 0)
|
||||
{
|
||||
PMSGWITHLEN buffptr = (PMSGWITHLEN)GetBuff();
|
||||
|
||||
if (buffptr)
|
||||
{
|
||||
buffptr->Len = sprintf((UCHAR *)&buffptr->Data[0],
|
||||
"UZ7HO} Error - Call missing from C command\r", STREAM->MyCall, STREAM->RemoteCall);
|
||||
|
||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||
}
|
||||
|
||||
STREAM->DiscWhenAllSent = 10;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (*ptr == '!')
|
||||
ptr++;
|
||||
|
||||
|
@ -1980,6 +1996,15 @@ VOID ProcessAGWPacket(struct TNCINFO * TNC, UCHAR * Message)
|
|||
RXHeader->DataLength = reverse(RXHeader->DataLength);
|
||||
#endif
|
||||
|
||||
if (RXHeader->DataKind == 'x')
|
||||
return;
|
||||
|
||||
if (RXHeader->DataKind == 'R')
|
||||
return;
|
||||
|
||||
if (RXHeader->DataKind == 'g')
|
||||
return;
|
||||
|
||||
switch (RXHeader->DataKind)
|
||||
{
|
||||
case 'D': // Appl Data
|
||||
|
@ -2461,6 +2486,9 @@ GotStream:
|
|||
|
||||
// Now copy CTL PID and Data
|
||||
|
||||
if (Rest < 0 || Rest > 256)
|
||||
return;
|
||||
|
||||
memcpy(ptr2, ptr1, Rest);
|
||||
|
||||
BPQTRACE((MESSAGE *)&MonDigis, TRUE);
|
||||
|
|
4
VARA.c
4
VARA.c
|
@ -2134,7 +2134,7 @@ VOID VARAProcessResponse(struct TNCINFO * TNC, UCHAR * Buffer, int MsgLen)
|
|||
|
||||
WritetoTrace(TNC, Buffer, MsgLen - 1);
|
||||
|
||||
// Release Session3
|
||||
// Release Session
|
||||
|
||||
if (TNC->Streams[0].Connected)
|
||||
{
|
||||
|
@ -2435,7 +2435,7 @@ VOID VARASendCommand(struct TNCINFO * TNC, char * Buff, BOOL Queue)
|
|||
if (TNC->CONNECTED == 0)
|
||||
return;
|
||||
|
||||
if(TNC->TCPSock)
|
||||
if (TNC->TCPSock)
|
||||
{
|
||||
SentLen = send(TNC->TCPSock, Buff, (int)strlen(Buff), 0);
|
||||
|
||||
|
|
|
@ -10,14 +10,14 @@
|
|||
|
||||
#endif
|
||||
|
||||
#define KVers 6,0,23,18
|
||||
#define KVerstring "6.0.23.18\0"
|
||||
#define KVers 6,0,23,21
|
||||
#define KVerstring "6.0.23.21\0"
|
||||
|
||||
#ifdef CKernel
|
||||
|
||||
#define Vers KVers
|
||||
#define Verstring KVerstring
|
||||
#define Datestring "August 2022"
|
||||
#define Datestring "October 2022"
|
||||
#define VerComments "G8BPQ Packet Switch (C Version)" KVerstring
|
||||
#define VerCopyright "Copyright © 2001-2022 John Wiseman G8BPQ\0"
|
||||
#define VerDesc "BPQ32 Switch\0"
|
||||
|
|
2
WINMOR.c
2
WINMOR.c
|
@ -1211,7 +1211,7 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
|||
|
||||
if (Param == 2) // Check Permission (shouldn't happen)
|
||||
{
|
||||
Debugprintf("Scan Check Permission called on WINMOR");
|
||||
Debugprintf("Scan Check Permission called on FLDIGI");
|
||||
return 1; // OK to change
|
||||
}
|
||||
|
||||
|
|
3
cMain.c
3
cMain.c
|
@ -102,6 +102,7 @@ struct DEST_LIST * ENDDESTLIST = NULL; // ; NODE LIST+1
|
|||
;
|
||||
|
||||
VOID * BUFFERPOOL = NULL; // START OF BUFFER POOL
|
||||
VOID * ENDBUFFERPOOL;
|
||||
|
||||
int OBSINIT = 5; // INITIAL OBSOLESCENCE VALUE
|
||||
int OBSMIN = 4; // MINIMUM TO BROADCAST
|
||||
|
@ -1304,6 +1305,7 @@ BOOL Start()
|
|||
int3 += 7;
|
||||
int3 &= 0xfffffffffffffff8;
|
||||
NEXTFREEDATA = (UCHAR *)int3;
|
||||
ENDBUFFERPOOL = NEXTFREEDATA + DATABYTES; // So init will work, set to actual end later
|
||||
|
||||
BUFFERPOOL = NEXTFREEDATA;
|
||||
|
||||
|
@ -1328,6 +1330,7 @@ BOOL Start()
|
|||
MAXBUFFS++;
|
||||
}
|
||||
|
||||
ENDBUFFERPOOL = NEXTFREEDATA;
|
||||
|
||||
|
||||
// Copy Bridge Map
|
||||
|
|
|
@ -156,6 +156,7 @@ struct RIGINFO
|
|||
BOOL RIG_DEBUG;
|
||||
|
||||
int HAMLIBPORT; // Port Number for HAMLIB (rigctld) Emulator
|
||||
|
||||
SOCKET ListenSocket;
|
||||
|
||||
struct HAMLIBSOCK * Sockets;
|
||||
|
|
10
tncinfo.h
10
tncinfo.h
|
@ -294,8 +294,8 @@ typedef struct ARQINFO
|
|||
char OurStream;
|
||||
char FarStream;
|
||||
|
||||
UINT * TXHOLDQ[64]; // Frames waiting ACK
|
||||
UINT * RXHOLDQ[64]; // Frames waiting missing frames.
|
||||
PMSGWITHLEN TXHOLDQ[64]; // Frames waiting ACK
|
||||
PMSGWITHLEN RXHOLDQ[64]; // Frames waiting missing frames.
|
||||
|
||||
int TXWindow;
|
||||
int RXWindow;
|
||||
|
@ -389,6 +389,12 @@ struct FreeDataINFO
|
|||
int toSendMsgTimeout;
|
||||
char * RXDir; // Directory for Received Files
|
||||
int CONOK; // Virtual Lisren Flag
|
||||
int Chat; // In Chat Mode
|
||||
char ChatCall[10];
|
||||
int needPoll; // Set if get data needed
|
||||
int arqstate; // 1 = Disc / 2 - connecting 3 - connected
|
||||
int TuningRange; // Must be 50, 100, 150, 200, 250
|
||||
int LimitBandWidth;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue