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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
time_t lastSecTimer = 0;
|
||||||
|
|
||||||
|
|
||||||
Dll VOID APIENTRY Poll_APRS()
|
Dll VOID APIENTRY Poll_APRS()
|
||||||
{
|
{
|
||||||
SecTimer--;
|
time_t Now = time(NULL);
|
||||||
|
|
||||||
if (SecTimer == 0)
|
if (lastSecTimer != Now)
|
||||||
{
|
{
|
||||||
SecTimer = 10;
|
lastSecTimer = Now;
|
||||||
|
|
||||||
DoSecTimer();
|
DoSecTimer();
|
||||||
|
|
||||||
MinTimer--;
|
MinTimer--;
|
||||||
|
|
||||||
if (MinTimer == 0)
|
if (MinTimer == 0)
|
||||||
{
|
{
|
||||||
MinTimer = 10;
|
MinTimer = 60;
|
||||||
DoMinTimer();
|
DoMinTimer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -443,8 +443,9 @@ BOOL CheckForTooManyErrors(ConnectionInfo * conn)
|
||||||
|
|
||||||
VOID __cdecl Debugprintf(const char * format, ...)
|
VOID __cdecl Debugprintf(const char * format, ...)
|
||||||
{
|
{
|
||||||
char Mess[1000];
|
char Mess[16384];
|
||||||
va_list(arglist);int Len;
|
va_list(arglist);
|
||||||
|
int Len;
|
||||||
|
|
||||||
va_start(arglist, format);
|
va_start(arglist, format);
|
||||||
Len = vsprintf(Mess, format, arglist);
|
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)
|
// Fix length of commands sent via CMD_TO_APPL flag (14)
|
||||||
// Add filter by quality option to N display (15)
|
// Add filter by quality option to N display (15)
|
||||||
// Fix VARA Mode reporting to WL2K (16)
|
// 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
|
#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
|
// 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;
|
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);
|
void WriteConnectLog(char * fromCall, char * toCall, UCHAR * Mode);
|
||||||
extern BOOL LogAllConnects;
|
extern BOOL LogAllConnects;
|
||||||
|
|
||||||
|
extern VOID * ENDBUFFERPOOL;
|
||||||
|
|
||||||
// Read/Write length field in a buffer header
|
// Read/Write length field in a buffer header
|
||||||
|
|
||||||
// Needed for Big/LittleEndian and ARM5 (unaligned operation problem) portability
|
// 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;
|
int n = 0;
|
||||||
void ** debug;
|
void ** debug;
|
||||||
PMESSAGE Test;
|
PMESSAGE Test;
|
||||||
|
UINT CodeDump[16];
|
||||||
|
int i;
|
||||||
|
unsigned int rev;
|
||||||
|
|
||||||
if (Semaphore.Flag == 0)
|
if (Semaphore.Flag == 0)
|
||||||
Debugprintf("ReleaseBuffer called without semaphore from %s Line %d", File, Line);
|
Debugprintf("ReleaseBuffer called without semaphore from %s Line %d", File, Line);
|
||||||
|
|
||||||
// Make sure address is within pool
|
// 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;
|
Test = (PMESSAGE)pBUFF;
|
||||||
|
|
||||||
if (Test->GuardZone != 0)
|
if (Test->GuardZone != 0)
|
||||||
|
@ -259,17 +294,54 @@ BOK1:
|
||||||
|
|
||||||
n = 0;
|
n = 0;
|
||||||
|
|
||||||
// See if already on free Queue
|
// validate free Queue
|
||||||
|
|
||||||
pointer = FREE_Q;
|
pointer = FREE_Q;
|
||||||
|
debug = &FREE_Q;
|
||||||
|
|
||||||
while (pointer)
|
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)
|
if (pointer == BUFF)
|
||||||
{
|
{
|
||||||
Debugprintf("Trying to free buffer %p when already on FREE_Q", BUFF);
|
Debugprintf("Trying to free buffer %p when already on FREE_Q", BUFF);
|
||||||
// WriteMiniDump();
|
// WriteMiniDump();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
68
ConfigSDR.c
68
ConfigSDR.c
|
@ -27,6 +27,10 @@ int PlaybackCount = 0;
|
||||||
int IndexA = -1; // Card number
|
int IndexA = -1; // Card number
|
||||||
int IndexB = -1; // Card number
|
int IndexB = -1; // Card number
|
||||||
int IndexC = -1; // Card number
|
int IndexC = -1; // Card number
|
||||||
|
int IndexD = -1; // Card number
|
||||||
|
int SPEAKERS = -1; // Card number
|
||||||
|
|
||||||
|
int Device = 0;
|
||||||
|
|
||||||
HWAVEOUT hWaveOut = 0;
|
HWAVEOUT hWaveOut = 0;
|
||||||
HWAVEIN hWaveIn = 0;
|
HWAVEIN hWaveIn = 0;
|
||||||
|
@ -34,6 +38,24 @@ HWAVEIN hWaveIn = 0;
|
||||||
char CaptureNames[16][MAXPNAMELEN + 2] = { "" };
|
char CaptureNames[16][MAXPNAMELEN + 2] = { "" };
|
||||||
char PlaybackNames[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[])
|
void main(int argc, char * argv[])
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -41,7 +63,7 @@ void main(int argc, char * argv[])
|
||||||
FILE *file;
|
FILE *file;
|
||||||
|
|
||||||
char line[1024] = "";
|
char line[1024] = "";
|
||||||
char index[16];
|
char index[64];
|
||||||
char * ptr;
|
char * ptr;
|
||||||
|
|
||||||
|
|
||||||
|
@ -78,8 +100,39 @@ void main(int argc, char * argv[])
|
||||||
IndexB = i;
|
IndexB = i;
|
||||||
else if (strstr(&PlaybackNames[i][0], "CABLE-C"))
|
else if (strstr(&PlaybackNames[i][0], "CABLE-C"))
|
||||||
IndexC = i;
|
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)
|
if ((infile = fopen("C:\\Users\\johnw\\AppData\\Roaming\\SDRplay\\SDRuno.in", "rb")) == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -106,6 +159,19 @@ void main(int argc, char * argv[])
|
||||||
sprintf(index, "%d\r\n", IndexC);
|
sprintf(index, "%d\r\n", IndexC);
|
||||||
strcat(line, index);
|
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);
|
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 ProcessFLDigiPacket(struct TNCINFO * TNC, char * Message, int Len);
|
||||||
VOID ProcessFLDigiKISSPacket(struct TNCINFO * TNC, char * Message, int Len);
|
VOID ProcessFLDigiKISSPacket(struct TNCINFO * TNC, char * Message, int Len);
|
||||||
struct TNCINFO * GetSessionKey(char * key, struct TNCINFO * TNC);
|
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);
|
static VOID DoMonitorHddr(struct TNCINFO * TNC, struct AGWHEADER * RXHeader, UCHAR * Msg);
|
||||||
VOID SendRPBeacon(struct TNCINFO * TNC);
|
VOID SendRPBeacon(struct TNCINFO * TNC);
|
||||||
VOID FLReleaseTNC(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);
|
int DoScanLine(struct TNCINFO * TNC, char * Buff, int Len);
|
||||||
VOID SuspendOtherPorts(struct TNCINFO * ThisTNC);
|
VOID SuspendOtherPorts(struct TNCINFO * ThisTNC);
|
||||||
VOID ReleaseOtherPorts(struct TNCINFO * ThisTNC);
|
VOID ReleaseOtherPorts(struct TNCINFO * ThisTNC);
|
||||||
|
VOID WritetoTrace(struct TNCINFO * TNC, char * Msg, int Len);
|
||||||
|
|
||||||
char * strlop(char * buf, char delim);
|
char * strlop(char * buf, char delim);
|
||||||
|
|
||||||
|
@ -168,6 +169,7 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
||||||
int Stream = 0;
|
int Stream = 0;
|
||||||
struct STREAMINFO * STREAM;
|
struct STREAMINFO * STREAM;
|
||||||
int TNCOK;
|
int TNCOK;
|
||||||
|
size_t Param;
|
||||||
|
|
||||||
if (TNC == NULL)
|
if (TNC == NULL)
|
||||||
return 0; // Port not defined
|
return 0; // Port not defined
|
||||||
|
@ -264,11 +266,11 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
||||||
{
|
{
|
||||||
// Timed out - Send Error Response
|
// Timed out - Send Error Response
|
||||||
|
|
||||||
UINT * buffptr = GetBuff();
|
PMSGWITHLEN buffptr = GetBuff();
|
||||||
|
|
||||||
if (buffptr == 0) return (0); // No buffers, so ignore
|
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);
|
memcpy(buffptr+2,"Sorry, Can't Connect - Channel is busy\r", 39);
|
||||||
|
|
||||||
C_Q_ADD(&TNC->Streams[0].PACTORtoBPQ_Q, buffptr);
|
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;
|
lasttime[port]=ltime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
pollloop:
|
||||||
FD_ZERO(&readfs);
|
FD_ZERO(&readfs);
|
||||||
|
|
||||||
if (TNC->CONNECTED)
|
if (TNC->CONNECTED)
|
||||||
|
@ -355,6 +357,7 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
||||||
// data available
|
// data available
|
||||||
|
|
||||||
ProcessReceivedData(port);
|
ProcessReceivedData(port);
|
||||||
|
goto pollloop;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FD_ISSET(TNC->TCPSock,&readfs))
|
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->PORT = Stream; // Compatibility with Kam Driver
|
||||||
buff->PID = 0xf0;
|
buff->PID = 0xf0;
|
||||||
memcpy(&buff->L2DATA, &buffptr->Data[0], datalen); // Data goes to + 7, but we have an extra byte
|
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);
|
PutLengthinBuffer(buff, datalen);
|
||||||
|
|
||||||
|
WritetoTrace(TNC, &buffptr->Data[0], datalen - (MSGHDDRLEN + 1));
|
||||||
ReleaseBuffer(buffptr);
|
ReleaseBuffer(buffptr);
|
||||||
|
|
||||||
return (1);
|
return (1);
|
||||||
|
@ -492,7 +496,7 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
||||||
|
|
||||||
// txlen=(buff[6]<<8) + buff[5] - 8;
|
// 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)
|
if (STREAM->Connected)
|
||||||
{
|
{
|
||||||
|
@ -503,6 +507,8 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
||||||
buffptr->Len = txlen;
|
buffptr->Len = txlen;
|
||||||
memcpy(buffptr->Data, buff->L2DATA, txlen);
|
memcpy(buffptr->Data, buff->L2DATA, txlen);
|
||||||
|
|
||||||
|
WritetoTrace(TNC, buffptr->Data, txlen);
|
||||||
|
|
||||||
C_Q_ADD(&TNC->Streams[Stream].BPQtoPACTOR_Q, buffptr);
|
C_Q_ADD(&TNC->Streams[Stream].BPQtoPACTOR_Q, buffptr);
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
|
@ -669,11 +675,11 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
||||||
|
|
||||||
if (_memicmp(&buff->L2DATA[0], "MCAST", 5) == 0)
|
if (_memicmp(&buff->L2DATA[0], "MCAST", 5) == 0)
|
||||||
{
|
{
|
||||||
UINT * buffptr = GetBuff();
|
PMSGWITHLEN buffptr = GetBuff();
|
||||||
|
|
||||||
TNC->FLInfo->MCASTMODE = TRUE;
|
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);
|
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -683,7 +689,7 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
||||||
{
|
{
|
||||||
// Return Error if in use, OK if not
|
// Return Error if in use, OK if not
|
||||||
|
|
||||||
UINT * buffptr = GetBuff();
|
PMSGWITHLEN buffptr = GetBuff();
|
||||||
int s = 0;
|
int s = 0;
|
||||||
|
|
||||||
while(s <= 1)
|
while(s <= 1)
|
||||||
|
@ -692,14 +698,14 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
||||||
{
|
{
|
||||||
if (TNC->PortRecord->ATTACHEDSESSIONS[s])
|
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);
|
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||||
return 1; // Busy
|
return 1; // Busy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
s++;
|
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);
|
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -728,6 +734,23 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
||||||
memset(STREAM->RemoteCall, 0, 10);
|
memset(STREAM->RemoteCall, 0, 10);
|
||||||
|
|
||||||
ptr = strtok_s(&buff->L2DATA[2], " ,\r", &context);
|
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);
|
strcpy(STREAM->RemoteCall, ptr);
|
||||||
|
|
||||||
// See if Busy
|
// See if Busy
|
||||||
|
@ -763,6 +786,8 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
||||||
ARQ->ARQTimerState = ARQ_CONNECTING;
|
ARQ->ARQTimerState = ARQ_CONNECTING;
|
||||||
SaveAndSend(TNC, ARQ, TNC->TCPDataSock, Reply, SendLen);
|
SaveAndSend(TNC, ARQ, TNC->TCPDataSock, Reply, SendLen);
|
||||||
|
|
||||||
|
Debugprintf("FLDIGI Connection %s", Reply);
|
||||||
|
|
||||||
STREAM->Connecting = TRUE;
|
STREAM->Connecting = TRUE;
|
||||||
|
|
||||||
sprintf(TNC->WEB_TNCSTATE, "%s Connecting to %s", STREAM->MyCall, STREAM->RemoteCall);
|
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;
|
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;
|
return 0;
|
||||||
|
@ -1126,12 +1192,14 @@ VOID * FLDigiExtInit(EXTPORTDATA * PortEntry)
|
||||||
PortEntry->PERMITGATEWAY = TRUE; // Can change ax.25 call on each stream
|
PortEntry->PERMITGATEWAY = TRUE; // Can change ax.25 call on each stream
|
||||||
PortEntry->PORTCONTROL.UICAPABLE = 1; // Can send beacons
|
PortEntry->PORTCONTROL.UICAPABLE = 1; // Can send beacons
|
||||||
PortEntry->PORTCONTROL.PORTQUALITY = 0;
|
PortEntry->PORTCONTROL.PORTQUALITY = 0;
|
||||||
PortEntry->SCANCAPABILITIES = NONE; // Scan Control - None
|
PortEntry->SCANCAPABILITIES = SIMPLE;
|
||||||
|
|
||||||
|
// Scan Control - None
|
||||||
|
|
||||||
TNC->FLInfo->CONOK = TRUE;
|
TNC->FLInfo->CONOK = TRUE;
|
||||||
|
|
||||||
if (PortEntry->PORTCONTROL.PORTPACLEN == 0 || PortEntry->PORTCONTROL.PORTPACLEN > 128)
|
if (PortEntry->PORTCONTROL.PORTPACLEN == 0)
|
||||||
PortEntry->PORTCONTROL.PORTPACLEN = 64;
|
PortEntry->PORTCONTROL.PORTPACLEN = 250;
|
||||||
|
|
||||||
TNC->SuspendPortProc = FLDIGISuspendPort;
|
TNC->SuspendPortProc = FLDIGISuspendPort;
|
||||||
TNC->ReleasePortProc = FLDIGIReleasePort;
|
TNC->ReleasePortProc = FLDIGIReleasePort;
|
||||||
|
@ -1769,13 +1837,13 @@ static int ProcessReceivedData(int port)
|
||||||
|
|
||||||
if (TNC->InternalCmd)
|
if (TNC->InternalCmd)
|
||||||
{
|
{
|
||||||
ULONG * buffptr = GetBuff();
|
PMSGWITHLEN buffptr = GetBuff();
|
||||||
|
|
||||||
TNC->InternalCmd = FALSE;
|
TNC->InternalCmd = FALSE;
|
||||||
|
|
||||||
if (buffptr)
|
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);
|
C_Q_ADD(&TNC->Streams[0].PACTORtoBPQ_Q, buffptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1865,6 +1933,8 @@ static int ProcessReceivedData(int port)
|
||||||
ptr1[19] = 0;
|
ptr1[19] = 0;
|
||||||
|
|
||||||
strcpy(TNC->FLInfo->CurrentMode, ptr1);
|
strcpy(TNC->FLInfo->CurrentMode, ptr1);
|
||||||
|
|
||||||
|
TNC->ConnectPending = 3; // Lock Scan for 3
|
||||||
}
|
}
|
||||||
|
|
||||||
if (memcmp(&Message[2], "MODEM:", 6) == 0)
|
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
|
// "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
|
ProcessFLDigiPacket(TNC, &Message[2] , bytes - 3); // Data may be for another port
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
bytes -= 3; // Two FEND and Control
|
bytes -= 3; // Two FEND and Control
|
||||||
|
|
||||||
|
// Debugprintf("0 %d %s", TNC->PortRecord->PORTCONTROL.PORTNUMBER, &Message[2]);
|
||||||
|
|
||||||
// Undo KISS
|
// Undo KISS
|
||||||
|
|
||||||
while (bytes)
|
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
|
ProcessFLDigiData(TNC, &Message[3], (int)(out - &Message[3]), Message[2], FALSE); // KISS not RAW
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2020,7 +2094,7 @@ VOID ProcessFLDigiPacket(struct TNCINFO * TNC, char * Message, int Len)
|
||||||
{
|
{
|
||||||
// Got a packet
|
// Got a packet
|
||||||
|
|
||||||
UINT * buffptr;
|
PMSGWITHLEN buffptr;
|
||||||
int Stream = 0;
|
int Stream = 0;
|
||||||
struct STREAMINFO * STREAM = &TNC->Streams[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
|
TNC->DataBuffer[TNC->DataLen++] = 13; // Keep Tidy
|
||||||
|
|
||||||
buffptr[1] = TNC->DataLen;
|
buffptr->Len = TNC->DataLen;
|
||||||
memcpy(&buffptr[2], &TNC->DataBuffer[0], TNC->DataLen);
|
memcpy(&buffptr[2], &TNC->DataBuffer[0], TNC->DataLen);
|
||||||
|
|
||||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
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)
|
VOID ProcessFLDigiData(struct TNCINFO * TNC, UCHAR * Input, int Len, char Channel, BOOL RAW)
|
||||||
{
|
{
|
||||||
UINT * buffptr;
|
PMSGWITHLEN buffptr;
|
||||||
int Stream = 0;
|
int Stream = 0;
|
||||||
struct STREAMINFO * STREAM = &TNC->Streams[0];
|
struct STREAMINFO * STREAM = &TNC->Streams[0];
|
||||||
char CTRL = Input[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;
|
struct WL2KInfo * WL2K = TNC->WL2K;
|
||||||
TRANSPORTENTRY * SESS;
|
TRANSPORTENTRY * SESS;
|
||||||
|
|
||||||
|
TNC->ConnectPending = 0;
|
||||||
|
|
||||||
if (FL->CONOK == FALSE)
|
if (FL->CONOK == FALSE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -2409,6 +2485,7 @@ VOID ProcessFLDigiData(struct TNCINFO * TNC, UCHAR * Input, int Len, char Channe
|
||||||
port1 = strlop(call1, ':');
|
port1 = strlop(call1, ':');
|
||||||
port2 = strlop(call2, ':');
|
port2 = strlop(call2, ':');
|
||||||
|
|
||||||
|
|
||||||
// See if for us
|
// See if for us
|
||||||
|
|
||||||
for (App = 0; App < 32; App++)
|
for (App = 0; App < 32; App++)
|
||||||
|
@ -2443,7 +2520,7 @@ VOID ProcessFLDigiData(struct TNCINFO * TNC, UCHAR * Input, int Len, char Channe
|
||||||
|
|
||||||
SuspendOtherPorts(TNC);
|
SuspendOtherPorts(TNC);
|
||||||
|
|
||||||
ProcessIncommingConnect(TNC, call1, 0, FALSE);
|
ProcessIncommingConnect(TNC, call1, 0, TRUE);
|
||||||
|
|
||||||
SESS = TNC->PortRecord->ATTACHEDSESSIONS[0];
|
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
|
return; // No buffers, so ignore
|
||||||
}
|
}
|
||||||
|
|
||||||
buffptr[1] = MsgLen;
|
buffptr->Len = MsgLen;
|
||||||
memcpy(buffptr+2, Buffer, MsgLen);
|
memcpy(buffptr->Data, Buffer, MsgLen);
|
||||||
|
|
||||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
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
|
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)
|
if (STREAM->NeedDisc)
|
||||||
{
|
{
|
||||||
// Send Not Avail
|
// Send Not Avail
|
||||||
|
@ -2564,7 +2625,7 @@ VOID ProcessFLDigiData(struct TNCINFO * TNC, UCHAR * Input, int Len, char Channe
|
||||||
buffptr = GetBuff();
|
buffptr = GetBuff();
|
||||||
if (buffptr)
|
if (buffptr)
|
||||||
{
|
{
|
||||||
buffptr[1] = sprintf((char *)&buffptr[2], "Application Not Available\n");
|
buffptr->Len = sprintf(buffptr->Data, "Application Not Available\n");
|
||||||
SendARQData(TNC, buffptr);
|
SendARQData(TNC, buffptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2654,8 +2715,8 @@ AckConnectRequest:
|
||||||
{
|
{
|
||||||
ReplyLen = sprintf(Reply, "*** Connected to %s\r", STREAM->RemoteCall);
|
ReplyLen = sprintf(Reply, "*** Connected to %s\r", STREAM->RemoteCall);
|
||||||
|
|
||||||
buffptr[1] = ReplyLen;
|
buffptr->Len = ReplyLen;
|
||||||
memcpy(buffptr+2, Reply, ReplyLen);
|
memcpy(buffptr->Data, Reply, ReplyLen);
|
||||||
|
|
||||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||||
}
|
}
|
||||||
|
@ -2821,7 +2882,7 @@ SendKReply:
|
||||||
STREAM->Connecting = FALSE;
|
STREAM->Connecting = FALSE;
|
||||||
STREAM->ReportDISC = TRUE;
|
STREAM->ReportDISC = TRUE;
|
||||||
|
|
||||||
strcpy(TNC->WEB_PROTOSTATE, "Disconncted");
|
strcpy(TNC->WEB_PROTOSTATE, "Disconnected");
|
||||||
SetWindowText(TNC->xIDC_PROTOSTATE, TNC->WEB_PROTOSTATE);
|
SetWindowText(TNC->xIDC_PROTOSTATE, TNC->WEB_PROTOSTATE);
|
||||||
|
|
||||||
ARQ->ARQState = 0;
|
ARQ->ARQState = 0;
|
||||||
|
@ -2883,7 +2944,7 @@ SendKReply:
|
||||||
|
|
||||||
STREAM->Disconnecting = FALSE;
|
STREAM->Disconnecting = FALSE;
|
||||||
|
|
||||||
strcpy(TNC->WEB_PROTOSTATE, "Disconncted");
|
strcpy(TNC->WEB_PROTOSTATE, "Disconnected");
|
||||||
SetWindowText(TNC->xIDC_PROTOSTATE, TNC->WEB_PROTOSTATE);
|
SetWindowText(TNC->xIDC_PROTOSTATE, TNC->WEB_PROTOSTATE);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -2923,7 +2984,7 @@ SendKReply:
|
||||||
buffptr = GetBuff();
|
buffptr = GetBuff();
|
||||||
|
|
||||||
if (buffptr == NULL)
|
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
|
// Remove any DLE transparency
|
||||||
|
|
||||||
|
@ -2932,8 +2993,8 @@ SendKReply:
|
||||||
else
|
else
|
||||||
Len = UnStuff(&Input[1], Len - 1);
|
Len = UnStuff(&Input[1], Len - 1);
|
||||||
|
|
||||||
buffptr[1] = Len;
|
buffptr->Len = Len;
|
||||||
memcpy(&buffptr[2], &Input[1], Len);
|
memcpy(buffptr->Data, &Input[1], Len);
|
||||||
STREAM->BytesRXed += Len;
|
STREAM->BytesRXed += Len;
|
||||||
|
|
||||||
UpdateStatsLine(TNC, STREAM);
|
UpdateStatsLine(TNC, STREAM);
|
||||||
|
@ -2972,7 +3033,6 @@ SendKReply:
|
||||||
// We have it
|
// We have it
|
||||||
|
|
||||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, ARQ->RXHOLDQ[Work]);
|
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, ARQ->RXHOLDQ[Work]);
|
||||||
// ReleaseBuffer(ARQ->RXHOLDQ[Work]);
|
|
||||||
|
|
||||||
ARQ->RXHOLDQ[Work] = NULL;
|
ARQ->RXHOLDQ[Work] = NULL;
|
||||||
// Debugprintf("Processing %d from Q", Work);
|
// 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.
|
// Send Data, saving a copy until acked.
|
||||||
|
|
||||||
|
@ -3001,7 +3061,7 @@ VOID SendARQData(struct TNCINFO * TNC, UINT * Buffer)
|
||||||
SOCKET sock = TNC->TCPDataSock;
|
SOCKET sock = TNC->TCPDataSock;
|
||||||
int SendLen;
|
int SendLen;
|
||||||
UCHAR * ptr;
|
UCHAR * ptr;
|
||||||
int Origlen = Buffer[1];
|
int Origlen = Buffer->Len;
|
||||||
int Stuffedlen;
|
int Stuffedlen;
|
||||||
|
|
||||||
ARQ->TXSeq++;
|
ARQ->TXSeq++;
|
||||||
|
@ -3009,9 +3069,9 @@ VOID SendARQData(struct TNCINFO * TNC, UINT * Buffer)
|
||||||
|
|
||||||
SendLen = sprintf(TXBuffer, "%c", ARQ->TXSeq + 32);
|
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)
|
if (memcmp(ptr, "ARQ:", 4) == 0)
|
||||||
{
|
{
|
||||||
|
@ -3035,12 +3095,12 @@ VOID SendARQData(struct TNCINFO * TNC, UINT * Buffer)
|
||||||
|
|
||||||
if (TNC->FLInfo->KISSMODE)
|
if (TNC->FLInfo->KISSMODE)
|
||||||
{
|
{
|
||||||
memcpy(&TXBuffer[SendLen], (UCHAR *)&Buffer[2], Origlen);
|
memcpy(&TXBuffer[SendLen], (UCHAR *)&Buffer->Data, Origlen);
|
||||||
SendLen += Origlen;
|
SendLen += Origlen;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Stuffedlen = Stuff((UCHAR *)&Buffer[2], &TXBuffer[SendLen], Origlen);
|
Stuffedlen = Stuff((UCHAR *)&Buffer->Data, &TXBuffer[SendLen], Origlen);
|
||||||
SendLen += Stuffedlen;
|
SendLen += Stuffedlen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3081,7 +3141,7 @@ VOID TidyClose(struct TNCINFO * TNC, int Stream)
|
||||||
SaveAndSend(TNC, ARQ, TNC->TCPDataSock, Reply, SendLen);
|
SaveAndSend(TNC, ARQ, TNC->TCPDataSock, Reply, SendLen);
|
||||||
ARQ->ARQTimerState = ARQ_DISC;
|
ARQ->ARQTimerState = ARQ_DISC;
|
||||||
|
|
||||||
strcpy(TNC->WEB_PROTOSTATE, "Disconncting");
|
strcpy(TNC->WEB_PROTOSTATE, "Disconnecting");
|
||||||
SetWindowText(TNC->xIDC_PROTOSTATE, TNC->WEB_PROTOSTATE);
|
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)
|
VOID ARQTimer(struct TNCINFO * TNC)
|
||||||
{
|
{
|
||||||
struct ARQINFO * ARQ = TNC->ARQInfo;
|
struct ARQINFO * ARQ = TNC->ARQInfo;
|
||||||
UINT * buffptr;
|
PMSGWITHLEN buffptr;
|
||||||
struct STREAMINFO * STREAM = &TNC->Streams[0];
|
struct STREAMINFO * STREAM = &TNC->Streams[0];
|
||||||
int SendLen;
|
int SendLen;
|
||||||
char Reply[80];
|
char Reply[80];
|
||||||
|
@ -3275,6 +3335,12 @@ VOID ARQTimer(struct TNCINFO * TNC)
|
||||||
{
|
{
|
||||||
while (STREAM->BPQtoPACTOR_Q)
|
while (STREAM->BPQtoPACTOR_Q)
|
||||||
{
|
{
|
||||||
|
if (ARQ->ARQState != ARQ_ACTIVE)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (ARQ->ARQTimerState == ARQ_CONNECTACK)
|
||||||
|
break;
|
||||||
|
|
||||||
Outstanding = ARQ->TXSeq - ARQ->TXLastACK;
|
Outstanding = ARQ->TXSeq - ARQ->TXLastACK;
|
||||||
|
|
||||||
if (Outstanding < 0)
|
if (Outstanding < 0)
|
||||||
|
@ -3353,7 +3419,7 @@ VOID ARQTimer(struct TNCINFO * TNC)
|
||||||
|
|
||||||
if (buffptr)
|
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);
|
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3403,7 +3469,7 @@ VOID ProcessARQStatus(struct TNCINFO * TNC, struct ARQINFO * ARQ, char * Input)
|
||||||
char * ptr;
|
char * ptr;
|
||||||
int NexttoResend;
|
int NexttoResend;
|
||||||
int First, Last, Outstanding;
|
int First, Last, Outstanding;
|
||||||
UINT * Buffer;
|
PMSGWITHLEN Buffer;
|
||||||
struct STREAMINFO * STREAM = &TNC->Streams[0];
|
struct STREAMINFO * STREAM = &TNC->Streams[0];
|
||||||
int Acked = 0;
|
int Acked = 0;
|
||||||
|
|
||||||
|
@ -3431,7 +3497,7 @@ VOID ProcessARQStatus(struct TNCINFO * TNC, struct ARQINFO * ARQ, char * Input)
|
||||||
if (Buffer)
|
if (Buffer)
|
||||||
{
|
{
|
||||||
// Debugprintf("Acked %d", FirstUnAcked);
|
// Debugprintf("Acked %d", FirstUnAcked);
|
||||||
STREAM->BytesAcked += Buffer[1];
|
STREAM->BytesAcked += Buffer->Len;
|
||||||
ReleaseBuffer(Buffer);
|
ReleaseBuffer(Buffer);
|
||||||
ARQ->TXHOLDQ[FirstUnAcked] = NULL;
|
ARQ->TXHOLDQ[FirstUnAcked] = NULL;
|
||||||
Acked++;
|
Acked++;
|
||||||
|
@ -3475,7 +3541,7 @@ VOID ProcessARQStatus(struct TNCINFO * TNC, struct ARQINFO * ARQ, char * Input)
|
||||||
if (Buffer)
|
if (Buffer)
|
||||||
{
|
{
|
||||||
// Debugprintf("Acked %d", FirstUnAcked);
|
// Debugprintf("Acked %d", FirstUnAcked);
|
||||||
STREAM->BytesAcked += Buffer[1];
|
STREAM->BytesAcked += Buffer->Len;
|
||||||
ReleaseBuffer(Buffer);
|
ReleaseBuffer(Buffer);
|
||||||
ARQ->TXHOLDQ[FirstUnAcked] = NULL;
|
ARQ->TXHOLDQ[FirstUnAcked] = NULL;
|
||||||
Acked++;
|
Acked++;
|
||||||
|
@ -3502,7 +3568,7 @@ VOID ProcessARQStatus(struct TNCINFO * TNC, struct ARQINFO * ARQ, char * Input)
|
||||||
if (Buffer)
|
if (Buffer)
|
||||||
{
|
{
|
||||||
// Debugprintf("Acked %d", FirstUnAcked);
|
// Debugprintf("Acked %d", FirstUnAcked);
|
||||||
STREAM->BytesAcked += Buffer[1];
|
STREAM->BytesAcked += Buffer->Len;
|
||||||
ReleaseBuffer(Buffer);
|
ReleaseBuffer(Buffer);
|
||||||
ARQ->TXHOLDQ[FirstUnAcked] = NULL;
|
ARQ->TXHOLDQ[FirstUnAcked] = NULL;
|
||||||
Acked++;
|
Acked++;
|
||||||
|
@ -3523,24 +3589,24 @@ VOID ProcessARQStatus(struct TNCINFO * TNC, struct ARQINFO * ARQ, char * Input)
|
||||||
|
|
||||||
if(ARQ->TXHOLDQ[First])
|
if(ARQ->TXHOLDQ[First])
|
||||||
{
|
{
|
||||||
UINT * Buffer = ARQ->TXHOLDQ[First];
|
PMSGWITHLEN Buffer = ARQ->TXHOLDQ[First];
|
||||||
UCHAR TXBuffer[300];
|
UCHAR TXBuffer[300];
|
||||||
SOCKET sock = TNC->TCPDataSock;
|
SOCKET sock = TNC->TCPDataSock;
|
||||||
int SendLen;
|
int SendLen;
|
||||||
|
|
||||||
// Debugprintf("Resend %d", First);
|
// Debugprintf("Resend %d", First);
|
||||||
|
|
||||||
STREAM->BytesResent += Buffer[1];
|
STREAM->BytesResent += Buffer->Len;
|
||||||
|
|
||||||
SendLen = sprintf(TXBuffer, "%c", First + 32);
|
SendLen = sprintf(TXBuffer, "%c", First + 32);
|
||||||
|
|
||||||
if (TNC->FLInfo->KISSMODE)
|
if (TNC->FLInfo->KISSMODE)
|
||||||
{
|
{
|
||||||
memcpy(&TXBuffer[SendLen], (UCHAR *)&Buffer[2], Buffer[1]);
|
memcpy(&TXBuffer[SendLen], (UCHAR *)&Buffer->Data, Buffer->Len);
|
||||||
SendLen += Buffer[1];
|
SendLen += Buffer->Len;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
SendLen += Stuff((UCHAR *)&Buffer[2], &TXBuffer[SendLen], Buffer[1]);
|
SendLen += Stuff((UCHAR *)&Buffer->Data, &TXBuffer[SendLen], Buffer->Len);
|
||||||
|
|
||||||
TXBuffer[SendLen] = 0;
|
TXBuffer[SendLen] = 0;
|
||||||
|
|
||||||
|
@ -3661,7 +3727,7 @@ static int ProcessXMLData(int port)
|
||||||
|
|
||||||
if (TNC->InternalCmd)
|
if (TNC->InternalCmd)
|
||||||
{
|
{
|
||||||
ULONG * buffptr = GetBuff();
|
PMSGWITHLEN buffptr = GetBuff();
|
||||||
|
|
||||||
TNC->InternalCmd = FALSE;
|
TNC->InternalCmd = FALSE;
|
||||||
|
|
||||||
|
@ -3684,7 +3750,7 @@ static int ProcessXMLData(int port)
|
||||||
|
|
||||||
if (buffptr)
|
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);
|
C_Q_ADD(&TNC->Streams[0].PACTORtoBPQ_Q, buffptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
778
FreeDATA.c
778
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)
|
static size_t ExtProc(int fn, int port,unsigned char * buff)
|
||||||
{
|
{
|
||||||
int txlen = 0;
|
int txlen = 0;
|
||||||
UINT * buffptr;
|
PMSGWITHLEN buffptr;
|
||||||
struct TNCINFO * TNC = TNCInfo[port];
|
struct TNCINFO * TNC = TNCInfo[port];
|
||||||
struct STREAMINFO * STREAM;
|
struct STREAMINFO * STREAM;
|
||||||
int Stream;
|
int Stream;
|
||||||
|
@ -362,11 +362,11 @@ static size_t ExtProc(int fn, int port,unsigned char * buff)
|
||||||
|
|
||||||
buffptr=Q_REM(&STREAM->PACTORtoBPQ_Q);
|
buffptr=Q_REM(&STREAM->PACTORtoBPQ_Q);
|
||||||
|
|
||||||
datalen=buffptr[1];
|
datalen=buffptr->Len;
|
||||||
|
|
||||||
buff[4] = 0;
|
buff[4] = 0;
|
||||||
buff[7] = 0xf0;
|
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;
|
datalen+=8;
|
||||||
|
|
||||||
PutLengthinBuffer((PDATAMESSAGE)buff, datalen);
|
PutLengthinBuffer((PDATAMESSAGE)buff, datalen);
|
||||||
|
@ -396,8 +396,8 @@ static size_t ExtProc(int fn, int port,unsigned char * buff)
|
||||||
{
|
{
|
||||||
// Send Error Response
|
// Send Error Response
|
||||||
|
|
||||||
buffptr[1] = 36;
|
buffptr->Len = 36;
|
||||||
memcpy(buffptr+2, "No Connection to PACTOR TNC\r", 36);
|
memcpy(buffptr->Data, "No Connection to PACTOR TNC\r", 36);
|
||||||
|
|
||||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
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;
|
txlen = GetLengthfromBuffer((PDATAMESSAGE)buff) - 8;
|
||||||
|
|
||||||
buffptr[1] = txlen;
|
buffptr->Len = txlen;
|
||||||
memcpy(buffptr+2, &buff[8], txlen);
|
memcpy(buffptr->Data, &buff[8], txlen);
|
||||||
|
|
||||||
C_Q_ADD(&STREAM->BPQtoPACTOR_Q, buffptr);
|
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))
|
if (TNC->TNCOK && STREAM->BPQtoPACTOR_Q && (STREAM->BytesTXed - STREAM->BytesAcked < 600))
|
||||||
{
|
{
|
||||||
int datalen;
|
int datalen;
|
||||||
UINT * buffptr;
|
PMSGWITHLEN buffptr;
|
||||||
UCHAR * MsgPtr;
|
UCHAR * MsgPtr;
|
||||||
unsigned char TXMsg[500];
|
unsigned char TXMsg[500];
|
||||||
|
|
||||||
buffptr = (UINT * )STREAM->BPQtoPACTOR_Q;
|
buffptr = (UINT * )STREAM->BPQtoPACTOR_Q;
|
||||||
datalen=buffptr[1];
|
datalen=buffptr->Len;
|
||||||
MsgPtr = (UCHAR *)&buffptr[2];
|
MsgPtr = (UCHAR *)buffptr->Data;
|
||||||
|
|
||||||
if (STREAM->Connected)
|
if (STREAM->Connected)
|
||||||
{
|
{
|
||||||
|
@ -900,7 +900,7 @@ VOID HALPoll(int Port)
|
||||||
}
|
}
|
||||||
else
|
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);
|
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -909,7 +909,7 @@ VOID HALPoll(int Port)
|
||||||
if (memcmp(MsgPtr, "MODE CLOVER", 11) == 0)
|
if (memcmp(MsgPtr, "MODE CLOVER", 11) == 0)
|
||||||
{
|
{
|
||||||
TNC->CurrentMode = Clover;
|
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);
|
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||||
|
|
||||||
MySetWindowText(TNC->xIDC_MODE, "Clover");
|
MySetWindowText(TNC->xIDC_MODE, "Clover");
|
||||||
|
@ -925,7 +925,7 @@ VOID HALPoll(int Port)
|
||||||
if (memcmp(MsgPtr, "MODE PACTOR", 11) == 0)
|
if (memcmp(MsgPtr, "MODE PACTOR", 11) == 0)
|
||||||
{
|
{
|
||||||
TNC->CurrentMode = Pactor;
|
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);
|
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||||
|
|
||||||
SendCmd(TNC, "\x84", 1); // FSK
|
SendCmd(TNC, "\x84", 1); // FSK
|
||||||
|
@ -937,7 +937,7 @@ VOID HALPoll(int Port)
|
||||||
if (memcmp(MsgPtr, "MODE AMTOR", 11) == 0)
|
if (memcmp(MsgPtr, "MODE AMTOR", 11) == 0)
|
||||||
{
|
{
|
||||||
TNC->CurrentMode = AMTOR;
|
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);
|
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -1080,7 +1080,7 @@ VOID ProcessHALData(struct TNCINFO * TNC)
|
||||||
{
|
{
|
||||||
// Received Data just pass to Appl
|
// Received Data just pass to Appl
|
||||||
|
|
||||||
UINT * buffptr;
|
PMSGWITHLEN buffptr;
|
||||||
int Len = TNC->DataLen;
|
int Len = TNC->DataLen;
|
||||||
struct STREAMINFO * STREAM = &TNC->Streams[0];
|
struct STREAMINFO * STREAM = &TNC->Streams[0];
|
||||||
|
|
||||||
|
@ -1118,13 +1118,13 @@ VOID ProcessHALData(struct TNCINFO * TNC)
|
||||||
if (buffptr == NULL)
|
if (buffptr == NULL)
|
||||||
return; // No buffers, so ignore
|
return; // No buffers, so ignore
|
||||||
|
|
||||||
buffptr[1] = Len; // Length
|
buffptr->Len = Len; // Length
|
||||||
|
|
||||||
WriteLogLine(1, TNC->DataBuffer, Len);
|
WriteLogLine(1, TNC->DataBuffer, Len);
|
||||||
|
|
||||||
STREAM->BytesRXed += Len;
|
STREAM->BytesRXed += Len;
|
||||||
|
|
||||||
memcpy(&buffptr[2], TNC->DataBuffer, Len);
|
memcpy(buffptr->Data, TNC->DataBuffer, Len);
|
||||||
|
|
||||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||||
}
|
}
|
||||||
|
@ -1708,7 +1708,7 @@ VOID HALDisconnected(struct TNCINFO * TNC)
|
||||||
|
|
||||||
if (STREAM->Connecting && STREAM->Disconnecting == FALSE)
|
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
|
// 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)
|
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);
|
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||||
}
|
}
|
||||||
|
@ -1750,7 +1750,7 @@ VOID HALDisconnected(struct TNCINFO * TNC)
|
||||||
BOOL HALConnected(struct TNCINFO * TNC, char * Call)
|
BOOL HALConnected(struct TNCINFO * TNC, char * Call)
|
||||||
{
|
{
|
||||||
char Msg[80];
|
char Msg[80];
|
||||||
UINT * buffptr;
|
PMSGWITHLEN buffptr;
|
||||||
struct STREAMINFO * STREAM = &TNC->Streams[0];
|
struct STREAMINFO * STREAM = &TNC->Streams[0];
|
||||||
char CallCopy[80];
|
char CallCopy[80];
|
||||||
|
|
||||||
|
@ -1793,7 +1793,7 @@ BOOL HALConnected(struct TNCINFO * TNC, char * Call)
|
||||||
buffptr = GetBuff();
|
buffptr = GetBuff();
|
||||||
if (buffptr == 0) return TRUE; // No buffers, so ignore
|
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);
|
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||||
TNC->SwallowSignon = TRUE;
|
TNC->SwallowSignon = TRUE;
|
||||||
|
|
||||||
|
@ -1815,7 +1815,7 @@ BOOL HALConnected(struct TNCINFO * TNC, char * Call)
|
||||||
buffptr = GetBuff();
|
buffptr = GetBuff();
|
||||||
if (buffptr == 0) return TRUE; // No buffers, so ignore
|
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);
|
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||||
|
|
||||||
|
|
|
@ -1875,6 +1875,8 @@ int standardParams(struct TNCINFO * TNC, char * buf)
|
||||||
char * ptr2 = TNC->PTTOn;
|
char * ptr2 = TNC->PTTOn;
|
||||||
int i, j, len;
|
int i, j, len;
|
||||||
|
|
||||||
|
_strupr(ptr1);
|
||||||
|
|
||||||
TNC->PTTOnLen = len = strlen(ptr1) / 2;
|
TNC->PTTOnLen = len = strlen(ptr1) / 2;
|
||||||
|
|
||||||
if (len < 240)
|
if (len < 240)
|
||||||
|
@ -1905,6 +1907,8 @@ int standardParams(struct TNCINFO * TNC, char * buf)
|
||||||
char * ptr2 = TNC->PTTOff;
|
char * ptr2 = TNC->PTTOff;
|
||||||
int i, j, len;
|
int i, j, len;
|
||||||
|
|
||||||
|
_strupr(ptr);
|
||||||
|
|
||||||
TNC->PTTOffLen = len = strlen(ptr) / 2;
|
TNC->PTTOffLen = len = strlen(ptr) / 2;
|
||||||
|
|
||||||
if (len < 240)
|
if (len < 240)
|
||||||
|
|
|
@ -4275,14 +4275,14 @@ int BuildRigCtlPage(char * _REPLYBUFFER)
|
||||||
|
|
||||||
void SendRigWebPage()
|
void SendRigWebPage()
|
||||||
{
|
{
|
||||||
int n;
|
int i, n;
|
||||||
struct ConnectionInfo * sockptr;
|
struct ConnectionInfo * sockptr;
|
||||||
struct TNCINFO * TNC;
|
struct TNCINFO * TNC;
|
||||||
struct TCPINFO * TCP;
|
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)
|
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);
|
memset(STREAM->RemoteCall, 0, 10);
|
||||||
|
|
||||||
ptr = strtok_s(&buff->L2DATA[2], " ,\r", &context);
|
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);
|
strcpy(STREAM->RemoteCall, ptr);
|
||||||
|
|
||||||
len = sprintf(Command,"%cCALLSIGN_TO_CALL_ARQ_FAE %s%c%cSELECTIVE_CALL_ARQ_FAE\x1b",
|
len = sprintf(Command,"%cCALLSIGN_TO_CALL_ARQ_FAE %s%c%cSELECTIVE_CALL_ARQ_FAE\x1b",
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
>
|
>
|
||||||
<DebugSettings
|
<DebugSettings
|
||||||
Command="$(TargetPath)"
|
Command="$(TargetPath)"
|
||||||
WorkingDirectory=""
|
WorkingDirectory="C:\linbpq"
|
||||||
CommandArguments=""
|
CommandArguments=""
|
||||||
Attach="false"
|
Attach="false"
|
||||||
DebuggerType="3"
|
DebuggerType="3"
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
SQLDebugging=""
|
SQLDebugging=""
|
||||||
Environment=""
|
Environment=""
|
||||||
EnvironmentMerge="true"
|
EnvironmentMerge="true"
|
||||||
DebuggerFlavor=""
|
DebuggerFlavor="0"
|
||||||
MPIRunCommand=""
|
MPIRunCommand=""
|
||||||
MPIRunArguments=""
|
MPIRunArguments=""
|
||||||
MPIRunWorkingDirectory=""
|
MPIRunWorkingDirectory=""
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
>
|
>
|
||||||
<DebugSettings
|
<DebugSettings
|
||||||
Command="$(TargetPath)"
|
Command="$(TargetPath)"
|
||||||
WorkingDirectory=""
|
WorkingDirectory="c:\linbpq"
|
||||||
CommandArguments=""
|
CommandArguments=""
|
||||||
Attach="false"
|
Attach="false"
|
||||||
DebuggerType="3"
|
DebuggerType="3"
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
SQLDebugging=""
|
SQLDebugging=""
|
||||||
Environment=""
|
Environment=""
|
||||||
EnvironmentMerge="true"
|
EnvironmentMerge="true"
|
||||||
DebuggerFlavor=""
|
DebuggerFlavor="0"
|
||||||
MPIRunCommand=""
|
MPIRunCommand=""
|
||||||
MPIRunArguments=""
|
MPIRunArguments=""
|
||||||
MPIRunWorkingDirectory=""
|
MPIRunWorkingDirectory=""
|
||||||
|
|
|
@ -184,8 +184,10 @@
|
||||||
<ClCompile Include="AISCommon.c" />
|
<ClCompile Include="AISCommon.c" />
|
||||||
<ClCompile Include="Alloc.c" />
|
<ClCompile Include="Alloc.c" />
|
||||||
<ClCompile Include="APRSCode.c" />
|
<ClCompile Include="APRSCode.c" />
|
||||||
|
<ClCompile Include="APRSIconData.c" />
|
||||||
<ClCompile Include="APRSStdPages.c" />
|
<ClCompile Include="APRSStdPages.c" />
|
||||||
<ClCompile Include="ARDOP.c" />
|
<ClCompile Include="ARDOP.c" />
|
||||||
|
<ClCompile Include="base64.c" />
|
||||||
<ClCompile Include="BBSHTMLConfig.c" />
|
<ClCompile Include="BBSHTMLConfig.c" />
|
||||||
<ClCompile Include="BBSUtilities.c">
|
<ClCompile Include="BBSUtilities.c">
|
||||||
<AssemblerOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<AssemblerOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
@ -212,8 +214,10 @@
|
||||||
<ClCompile Include="compatbits.c" />
|
<ClCompile Include="compatbits.c" />
|
||||||
<ClCompile Include="config.c" />
|
<ClCompile Include="config.c" />
|
||||||
<ClCompile Include="datadefs.c" />
|
<ClCompile Include="datadefs.c" />
|
||||||
|
<ClCompile Include="DRATS.c" />
|
||||||
<ClCompile Include="FBBRoutines.c" />
|
<ClCompile Include="FBBRoutines.c" />
|
||||||
<ClCompile Include="FLDigi.c" />
|
<ClCompile Include="FLDigi.c" />
|
||||||
|
<ClCompile Include="FreeDATA.c" />
|
||||||
<ClCompile Include="HALDriver.c" />
|
<ClCompile Include="HALDriver.c" />
|
||||||
<ClCompile Include="HanksRT.c" />
|
<ClCompile Include="HanksRT.c" />
|
||||||
<ClCompile Include="HFCommon.c" />
|
<ClCompile Include="HFCommon.c" />
|
||||||
|
@ -246,6 +250,23 @@
|
||||||
<ClCompile Include="MULTIPSK.c" />
|
<ClCompile Include="MULTIPSK.c" />
|
||||||
<ClCompile Include="NNTPRoutines.c" />
|
<ClCompile Include="NNTPRoutines.c" />
|
||||||
<ClCompile Include="pibits.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="RigControl.c" />
|
||||||
<ClCompile Include="SCSPactor.c" />
|
<ClCompile Include="SCSPactor.c" />
|
||||||
<ClCompile Include="SCSTrackeMulti.c" />
|
<ClCompile Include="SCSTrackeMulti.c" />
|
||||||
|
@ -265,6 +286,10 @@
|
||||||
<ClCompile Include="WinRPR.c" />
|
<ClCompile Include="WinRPR.c" />
|
||||||
<ClCompile Include="WPRoutines.c" />
|
<ClCompile Include="WPRoutines.c" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="png.h" />
|
||||||
|
<ClInclude Include="pngconf.h" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</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;
|
long long txfreq = 0;
|
||||||
|
|
||||||
if (TNC->TXFreq)
|
if (TNC->TXFreq)
|
||||||
txfreq = TNC->TXFreq + TNC->TXOffset;
|
txfreq = TNC->TXFreq + TNC->TXOffset + RIG->txError;
|
||||||
else if (TNC->RIG && TNC->RIG->txFreq)
|
else if (TNC->RIG && TNC->RIG->txFreq)
|
||||||
txfreq = RIG->txFreq; // Used if not associated with a TNC port - eg HAMLIB + WSJT
|
txfreq = RIG->txFreq; // Used if not associated with a TNC port - eg HAMLIB + WSJT
|
||||||
else if (TNC->RIG && TNC->RIG->RigFreq != 0.0)
|
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 (txfreq)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (RIG->lastSetFreq != txfreq)
|
if (RIG->lastSetFreq != txfreq)
|
||||||
{
|
{
|
||||||
char FreqString[80];
|
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);
|
memcpy(&onString[onLen], RIG->PTTOn, RIG->PTTOnLen);
|
||||||
onLen += RIG->PTTOnLen;
|
onLen += RIG->PTTOnLen;
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
case HAMLIB:
|
case HAMLIB:
|
||||||
|
|
||||||
// Dont need to save, as we can send strings separately
|
// 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);
|
memcpy(offString, TNC->PTTOff, TNC->PTTOffLen);
|
||||||
offLen = TNC->PTTOffLen;
|
offLen = TNC->PTTOffLen;
|
||||||
|
RIG->lastSetFreq = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -996,7 +998,7 @@ int Rig_CommandEx(struct RIGPORTINFO * PORT, struct RIGINFO * RIG, int Session,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(Command, "Sorry - TUNE only supported on your radio\r");
|
sprintf(Command, "Sorry - TUNE not supported on your radio\r");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8041,6 +8043,7 @@ VOID FLRIGPoll(struct RIGPORTINFO * PORT)
|
||||||
if (GetPermissionToChange(PORT, RIG))
|
if (GetPermissionToChange(PORT, RIG))
|
||||||
{
|
{
|
||||||
char cmd[80];
|
char cmd[80];
|
||||||
|
double freq;
|
||||||
|
|
||||||
if (RIG->RIG_DEBUG)
|
if (RIG->RIG_DEBUG)
|
||||||
Debugprintf("BPQ32 Change Freq to %9.4f", PORT->FreqPtr->Freq);
|
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);
|
sprintf(cmd, "<double>%s</double>", PORT->FreqPtr->Cmd1Msg);
|
||||||
FLRIGSendCommand(PORT, "rig.set_vfo", cmd);
|
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->CmdSent = 1;
|
||||||
PORT->Retries = 0;
|
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);
|
static VOID ProcessFLDigiPacket(struct TNCINFO * TNC, char * Message, int Len);
|
||||||
VOID ProcessFLDigiKISSPacket(struct TNCINFO * TNC, char * Message, int Len);
|
VOID ProcessFLDigiKISSPacket(struct TNCINFO * TNC, char * Message, int Len);
|
||||||
struct TNCINFO * GetSessionKey(char * key, struct TNCINFO * TNC);
|
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);
|
VOID SendRPBeacon(struct TNCINFO * TNC);
|
||||||
unsigned int CalcCRC(UCHAR * ptr, int Len);
|
unsigned int CalcCRC(UCHAR * ptr, int Len);
|
||||||
static VOID ARQTimer(struct TNCINFO * TNC);
|
static VOID ARQTimer(struct TNCINFO * TNC);
|
||||||
|
@ -103,7 +103,7 @@ static int RigControlRow = 165;
|
||||||
|
|
||||||
static int ExtProc(int fn, int port,unsigned char * buff)
|
static int ExtProc(int fn, int port,unsigned char * buff)
|
||||||
{
|
{
|
||||||
UINT * buffptr;
|
PMSGWITHLEN buffptr;
|
||||||
unsigned int txlen=0;
|
unsigned int txlen=0;
|
||||||
struct TNCINFO * TNC = TNCInfo[port];
|
struct TNCINFO * TNC = TNCInfo[port];
|
||||||
int Stream = 0;
|
int Stream = 0;
|
||||||
|
@ -196,12 +196,12 @@ static int ExtProc(int fn, int port,unsigned char * buff)
|
||||||
|
|
||||||
buffptr=Q_REM(&STREAM->PACTORtoBPQ_Q);
|
buffptr=Q_REM(&STREAM->PACTORtoBPQ_Q);
|
||||||
|
|
||||||
datalen=buffptr[1];
|
datalen=buffptr->Len;
|
||||||
|
|
||||||
buff[4] = Stream;
|
buff[4] = Stream;
|
||||||
buff[7] = 0xf0;
|
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;
|
datalen += (MSGHDDRLEN + 1);
|
||||||
|
|
||||||
PutLengthinBuffer((PDATAMESSAGE)buff, datalen);
|
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=(buff[6]<<8) + buff[5] - 8;
|
||||||
|
|
||||||
txlen = GetLengthfromBuffer((PDATAMESSAGE)buff) - 8;
|
txlen = GetLengthfromBuffer((PDATAMESSAGE)buff) - (MSGHDDRLEN + 1); // 1 as no PID;
|
||||||
|
|
||||||
if (STREAM->Connected)
|
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
|
if (buffptr == 0) return (0); // No buffers, so ignore
|
||||||
|
|
||||||
buffptr[1] = txlen;
|
buffptr->Len = txlen;
|
||||||
memcpy(buffptr+2, &buff[8], txlen);
|
memcpy(buffptr->Data, &buff[8], txlen);
|
||||||
|
|
||||||
C_Q_ADD(&TNC->Streams[Stream].BPQtoPACTOR_Q, buffptr);
|
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)
|
static VOID ProcessFLDigiData(struct TNCINFO * TNC, UCHAR * Input, int Len, int Stream)
|
||||||
{
|
{
|
||||||
UINT * buffptr;
|
PMSGWITHLEN buffptr;
|
||||||
struct STREAMINFO * STREAM = &TNC->Streams[Stream];
|
struct STREAMINFO * STREAM = &TNC->Streams[Stream];
|
||||||
char CTRL = Input[0];
|
char CTRL = Input[0];
|
||||||
struct ARQINFO * ARQ = STREAM->ARQInfo;
|
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
|
return; // No buffers, so ignore
|
||||||
}
|
}
|
||||||
|
|
||||||
buffptr[1] = MsgLen;
|
buffptr->Len = MsgLen;
|
||||||
memcpy(buffptr+2, Buffer, MsgLen);
|
memcpy(buffptr->Data, Buffer, MsgLen);
|
||||||
|
|
||||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||||
|
|
||||||
|
@ -922,8 +922,8 @@ static VOID ProcessFLDigiData(struct TNCINFO * TNC, UCHAR * Input, int Len, int
|
||||||
buffptr = GetBuff();
|
buffptr = GetBuff();
|
||||||
if (buffptr)
|
if (buffptr)
|
||||||
{
|
{
|
||||||
buffptr[1] = HFCTEXTLEN;
|
buffptr->Len = HFCTEXTLEN;
|
||||||
memcpy(&buffptr[2], HFCTEXT, HFCTEXTLEN);
|
memcpy(buffptr->Data, HFCTEXT, HFCTEXTLEN);
|
||||||
SendARQData(TNC, buffptr, Stream);
|
SendARQData(TNC, buffptr, Stream);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -936,7 +936,7 @@ static VOID ProcessFLDigiData(struct TNCINFO * TNC, UCHAR * Input, int Len, int
|
||||||
buffptr = GetBuff();
|
buffptr = GetBuff();
|
||||||
if (buffptr)
|
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);
|
SendARQData(TNC, buffptr, Stream);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1031,8 +1031,8 @@ AckConnectRequest:
|
||||||
{
|
{
|
||||||
ReplyLen = sprintf(Reply, "*** Connected to %s\r", STREAM->RemoteCall);
|
ReplyLen = sprintf(Reply, "*** Connected to %s\r", STREAM->RemoteCall);
|
||||||
|
|
||||||
buffptr[1] = ReplyLen;
|
buffptr->Len = ReplyLen;
|
||||||
memcpy(buffptr+2, Reply, ReplyLen);
|
memcpy(buffptr->Data, Reply, ReplyLen);
|
||||||
|
|
||||||
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||||
}
|
}
|
||||||
|
@ -1312,8 +1312,8 @@ SendKReply:
|
||||||
|
|
||||||
Len -= 1;
|
Len -= 1;
|
||||||
|
|
||||||
buffptr[1] = Len;
|
buffptr->Len = Len;
|
||||||
memcpy(&buffptr[2], &Input[1], Len);
|
memcpy(buffptr->Data, &Input[1], Len);
|
||||||
STREAM->BytesRXed += Len;
|
STREAM->BytesRXed += Len;
|
||||||
|
|
||||||
UpdateStatsLine(TNC, STREAM);
|
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.
|
// 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;
|
SOCKET sock = TNC->TCPDataSock;
|
||||||
int SendLen;
|
int SendLen;
|
||||||
UCHAR * ptr;
|
UCHAR * ptr;
|
||||||
int Origlen = Buffer[1];
|
int Origlen = Buffer->Len;
|
||||||
|
|
||||||
ARQ->TXSeq++;
|
ARQ->TXSeq++;
|
||||||
ARQ->TXSeq &= 63;
|
ARQ->TXSeq &= 63;
|
||||||
|
|
||||||
SendLen = sprintf(TXBuffer, "%c", ARQ->TXSeq + 32);
|
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;
|
SendLen += Origlen;
|
||||||
|
|
||||||
TXBuffer[SendLen] = 0;
|
TXBuffer[SendLen] = 0;
|
||||||
|
@ -1465,7 +1465,7 @@ static VOID SaveAndSend(struct TNCINFO * TNC, struct ARQINFO * ARQ, SOCKET sock,
|
||||||
|
|
||||||
static VOID ARQTimer(struct TNCINFO * TNC)
|
static VOID ARQTimer(struct TNCINFO * TNC)
|
||||||
{
|
{
|
||||||
UINT * buffptr;
|
PMSGWITHLEN buffptr;
|
||||||
struct STREAMINFO * STREAM;
|
struct STREAMINFO * STREAM;
|
||||||
struct ARQINFO * ARQ;
|
struct ARQINFO * ARQ;
|
||||||
int SendLen;
|
int SendLen;
|
||||||
|
@ -1630,7 +1630,7 @@ static VOID ARQTimer(struct TNCINFO * TNC)
|
||||||
|
|
||||||
if (buffptr)
|
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);
|
C_Q_ADD(&STREAM->PACTORtoBPQ_Q, buffptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1685,7 +1685,7 @@ static VOID ProcessARQStatus(struct TNCINFO * TNC, int Stream, struct ARQINFO *
|
||||||
char * ptr;
|
char * ptr;
|
||||||
int NexttoResend;
|
int NexttoResend;
|
||||||
int First, Last, Outstanding;
|
int First, Last, Outstanding;
|
||||||
UINT * Buffer;
|
PMSGWITHLEN Buffer;
|
||||||
int Acked = 0;
|
int Acked = 0;
|
||||||
|
|
||||||
// First status is an ack of Connect ACK
|
// First status is an ack of Connect ACK
|
||||||
|
@ -1714,7 +1714,7 @@ static VOID ProcessARQStatus(struct TNCINFO * TNC, int Stream, struct ARQINFO *
|
||||||
if (Buffer)
|
if (Buffer)
|
||||||
{
|
{
|
||||||
Debugprintf("Acked %d", FirstUnAcked);
|
Debugprintf("Acked %d", FirstUnAcked);
|
||||||
STREAM->BytesAcked += Buffer[1];
|
STREAM->BytesAcked += Buffer->Len;
|
||||||
ReleaseBuffer(Buffer);
|
ReleaseBuffer(Buffer);
|
||||||
ARQ->TXHOLDQ[FirstUnAcked] = NULL;
|
ARQ->TXHOLDQ[FirstUnAcked] = NULL;
|
||||||
Acked++;
|
Acked++;
|
||||||
|
@ -1759,7 +1759,7 @@ static VOID ProcessARQStatus(struct TNCINFO * TNC, int Stream, struct ARQINFO *
|
||||||
if (Buffer)
|
if (Buffer)
|
||||||
{
|
{
|
||||||
Debugprintf("Acked %d", FirstUnAcked);
|
Debugprintf("Acked %d", FirstUnAcked);
|
||||||
STREAM->BytesAcked += Buffer[1];
|
STREAM->BytesAcked += Buffer->Len;
|
||||||
ReleaseBuffer(Buffer);
|
ReleaseBuffer(Buffer);
|
||||||
ARQ->TXHOLDQ[FirstUnAcked] = NULL;
|
ARQ->TXHOLDQ[FirstUnAcked] = NULL;
|
||||||
Acked++;
|
Acked++;
|
||||||
|
@ -1786,7 +1786,7 @@ static VOID ProcessARQStatus(struct TNCINFO * TNC, int Stream, struct ARQINFO *
|
||||||
if (Buffer)
|
if (Buffer)
|
||||||
{
|
{
|
||||||
Debugprintf("Acked %d", FirstUnAcked);
|
Debugprintf("Acked %d", FirstUnAcked);
|
||||||
STREAM->BytesAcked += Buffer[1];
|
STREAM->BytesAcked += Buffer->Len;
|
||||||
ReleaseBuffer(Buffer);
|
ReleaseBuffer(Buffer);
|
||||||
ARQ->TXHOLDQ[FirstUnAcked] = NULL;
|
ARQ->TXHOLDQ[FirstUnAcked] = NULL;
|
||||||
Acked++;
|
Acked++;
|
||||||
|
@ -1807,19 +1807,19 @@ static VOID ProcessARQStatus(struct TNCINFO * TNC, int Stream, struct ARQINFO *
|
||||||
|
|
||||||
if(ARQ->TXHOLDQ[First])
|
if(ARQ->TXHOLDQ[First])
|
||||||
{
|
{
|
||||||
UINT * Buffer = ARQ->TXHOLDQ[First];
|
PMSGWITHLEN Buffer = ARQ->TXHOLDQ[First];
|
||||||
UCHAR TXBuffer[300];
|
UCHAR TXBuffer[300];
|
||||||
SOCKET sock = TNC->TCPDataSock;
|
SOCKET sock = TNC->TCPDataSock;
|
||||||
int SendLen;
|
int SendLen;
|
||||||
|
|
||||||
Debugprintf("Resend %d", First);
|
Debugprintf("Resend %d", First);
|
||||||
|
|
||||||
STREAM->BytesResent += Buffer[1];
|
STREAM->BytesResent += Buffer->Len;
|
||||||
|
|
||||||
SendLen = sprintf(TXBuffer, "%c", First + 32);
|
SendLen = sprintf(TXBuffer, "%c", First + 32);
|
||||||
|
|
||||||
memcpy(&TXBuffer[SendLen], (UCHAR *)&Buffer[2], Buffer[1]);
|
memcpy(&TXBuffer[SendLen], Buffer->Data, Buffer->Len);
|
||||||
SendLen += Buffer[1];
|
SendLen += Buffer->Len;
|
||||||
|
|
||||||
TXBuffer[SendLen] = 0;
|
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);
|
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 == '!')
|
if (*ptr == '!')
|
||||||
ptr++;
|
ptr++;
|
||||||
|
|
||||||
|
@ -1980,6 +1996,15 @@ VOID ProcessAGWPacket(struct TNCINFO * TNC, UCHAR * Message)
|
||||||
RXHeader->DataLength = reverse(RXHeader->DataLength);
|
RXHeader->DataLength = reverse(RXHeader->DataLength);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (RXHeader->DataKind == 'x')
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (RXHeader->DataKind == 'R')
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (RXHeader->DataKind == 'g')
|
||||||
|
return;
|
||||||
|
|
||||||
switch (RXHeader->DataKind)
|
switch (RXHeader->DataKind)
|
||||||
{
|
{
|
||||||
case 'D': // Appl Data
|
case 'D': // Appl Data
|
||||||
|
@ -2461,6 +2486,9 @@ GotStream:
|
||||||
|
|
||||||
// Now copy CTL PID and Data
|
// Now copy CTL PID and Data
|
||||||
|
|
||||||
|
if (Rest < 0 || Rest > 256)
|
||||||
|
return;
|
||||||
|
|
||||||
memcpy(ptr2, ptr1, Rest);
|
memcpy(ptr2, ptr1, Rest);
|
||||||
|
|
||||||
BPQTRACE((MESSAGE *)&MonDigis, TRUE);
|
BPQTRACE((MESSAGE *)&MonDigis, TRUE);
|
||||||
|
|
2
VARA.c
2
VARA.c
|
@ -2134,7 +2134,7 @@ VOID VARAProcessResponse(struct TNCINFO * TNC, UCHAR * Buffer, int MsgLen)
|
||||||
|
|
||||||
WritetoTrace(TNC, Buffer, MsgLen - 1);
|
WritetoTrace(TNC, Buffer, MsgLen - 1);
|
||||||
|
|
||||||
// Release Session3
|
// Release Session
|
||||||
|
|
||||||
if (TNC->Streams[0].Connected)
|
if (TNC->Streams[0].Connected)
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,14 +10,14 @@
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define KVers 6,0,23,18
|
#define KVers 6,0,23,21
|
||||||
#define KVerstring "6.0.23.18\0"
|
#define KVerstring "6.0.23.21\0"
|
||||||
|
|
||||||
#ifdef CKernel
|
#ifdef CKernel
|
||||||
|
|
||||||
#define Vers KVers
|
#define Vers KVers
|
||||||
#define Verstring KVerstring
|
#define Verstring KVerstring
|
||||||
#define Datestring "August 2022"
|
#define Datestring "October 2022"
|
||||||
#define VerComments "G8BPQ Packet Switch (C Version)" KVerstring
|
#define VerComments "G8BPQ Packet Switch (C Version)" KVerstring
|
||||||
#define VerCopyright "Copyright © 2001-2022 John Wiseman G8BPQ\0"
|
#define VerCopyright "Copyright © 2001-2022 John Wiseman G8BPQ\0"
|
||||||
#define VerDesc "BPQ32 Switch\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)
|
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
|
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 * BUFFERPOOL = NULL; // START OF BUFFER POOL
|
||||||
|
VOID * ENDBUFFERPOOL;
|
||||||
|
|
||||||
int OBSINIT = 5; // INITIAL OBSOLESCENCE VALUE
|
int OBSINIT = 5; // INITIAL OBSOLESCENCE VALUE
|
||||||
int OBSMIN = 4; // MINIMUM TO BROADCAST
|
int OBSMIN = 4; // MINIMUM TO BROADCAST
|
||||||
|
@ -1304,6 +1305,7 @@ BOOL Start()
|
||||||
int3 += 7;
|
int3 += 7;
|
||||||
int3 &= 0xfffffffffffffff8;
|
int3 &= 0xfffffffffffffff8;
|
||||||
NEXTFREEDATA = (UCHAR *)int3;
|
NEXTFREEDATA = (UCHAR *)int3;
|
||||||
|
ENDBUFFERPOOL = NEXTFREEDATA + DATABYTES; // So init will work, set to actual end later
|
||||||
|
|
||||||
BUFFERPOOL = NEXTFREEDATA;
|
BUFFERPOOL = NEXTFREEDATA;
|
||||||
|
|
||||||
|
@ -1328,6 +1330,7 @@ BOOL Start()
|
||||||
MAXBUFFS++;
|
MAXBUFFS++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ENDBUFFERPOOL = NEXTFREEDATA;
|
||||||
|
|
||||||
|
|
||||||
// Copy Bridge Map
|
// Copy Bridge Map
|
||||||
|
|
|
@ -156,6 +156,7 @@ struct RIGINFO
|
||||||
BOOL RIG_DEBUG;
|
BOOL RIG_DEBUG;
|
||||||
|
|
||||||
int HAMLIBPORT; // Port Number for HAMLIB (rigctld) Emulator
|
int HAMLIBPORT; // Port Number for HAMLIB (rigctld) Emulator
|
||||||
|
|
||||||
SOCKET ListenSocket;
|
SOCKET ListenSocket;
|
||||||
|
|
||||||
struct HAMLIBSOCK * Sockets;
|
struct HAMLIBSOCK * Sockets;
|
||||||
|
|
10
tncinfo.h
10
tncinfo.h
|
@ -294,8 +294,8 @@ typedef struct ARQINFO
|
||||||
char OurStream;
|
char OurStream;
|
||||||
char FarStream;
|
char FarStream;
|
||||||
|
|
||||||
UINT * TXHOLDQ[64]; // Frames waiting ACK
|
PMSGWITHLEN TXHOLDQ[64]; // Frames waiting ACK
|
||||||
UINT * RXHOLDQ[64]; // Frames waiting missing frames.
|
PMSGWITHLEN RXHOLDQ[64]; // Frames waiting missing frames.
|
||||||
|
|
||||||
int TXWindow;
|
int TXWindow;
|
||||||
int RXWindow;
|
int RXWindow;
|
||||||
|
@ -389,6 +389,12 @@ struct FreeDataINFO
|
||||||
int toSendMsgTimeout;
|
int toSendMsgTimeout;
|
||||||
char * RXDir; // Directory for Received Files
|
char * RXDir; // Directory for Received Files
|
||||||
int CONOK; // Virtual Lisren Flag
|
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