Compare commits

...

3 Commits

Author SHA1 Message Date
Hibby 745a9f8e88 Update upstream source from tag 'upstream/6.0.24.53+repack'
Update to upstream version '6.0.24.53+repack'
with Debian dir 64961bc210
2024-12-03 00:27:59 +00:00
Hibby 96c573931d New upstream version 6.0.24.53+repack 2024-12-03 00:27:57 +00:00
Hibby 697fde3123
Merge branch 'upstream/latest' of git.hibbian.org:Hibbian/linbpq into upstream/latest 2024-11-30 22:18:40 +00:00
14 changed files with 48 additions and 29 deletions

View File

@ -292,8 +292,7 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
{ {
// Send Error Response // Send Error Response
buffptr->Len = 36; buffptr->Len = sprintf(buffptr->Data, "No Connection to PACTOR TNC\r");
memcpy(buffptr->Data, "No Connection to PACTOR TNC\r", 36);
C_Q_ADD(&TNC->Streams[Stream].PACTORtoBPQ_Q, buffptr); C_Q_ADD(&TNC->Streams[Stream].PACTORtoBPQ_Q, buffptr);

View File

@ -3396,7 +3396,6 @@ BOOL Initialise()
CreatePipeThread(); CreatePipeThread();
GetPGConfig(); GetPGConfig();
APIClock = 0; APIClock = 0;
return TRUE; return TRUE;

View File

@ -1236,6 +1236,8 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
// AGWAPI Add protection against accidental connects from a non-agw application (50) // AGWAPI Add protection against accidental connects from a non-agw application (50)
// Save MH and NODES every hour (51) // Save MH and NODES every hour (51)
// Fix handling long unix device names (now max 250 bytes) (52) // Fix handling long unix device names (now max 250 bytes) (52)
// Fix error reporting in api update (53)
// Coding changes to remove some compiler warnings (53)
#define CKernel #define CKernel

View File

@ -5040,8 +5040,6 @@ DllExport VOID WINAPI SendWebRequest(char * Host, char * Request, char * Params,
else else
{ {
strlop(Buffer, 13); strlop(Buffer, 13);
Debugprintf("Map Update Params - %s", Params);
Debugprintf("Map Update failed - %s", Buffer); Debugprintf("Map Update failed - %s", Buffer);
} }
closesocket(sock); closesocket(sock);

View File

@ -168,7 +168,7 @@ int AllocateDRATSStream(struct DRATSSession * Sess)
if (Stream == 255) return 0; if (Stream == 255) return 0;
if (memcmp(Sess->CallTo, "NODE", 6) == 0) if (memcmp(Sess->CallTo, "NODE", 4) == 0)
{ {
// Just connect to command level on switch // Just connect to command level on switch
} }

View File

@ -93,6 +93,7 @@ VOID CheckFLDigiData(struct TNCINFO * TNC);
VOID SendPacket(struct TNCINFO * TNC, UCHAR * Msg, int MsgLen); VOID SendPacket(struct TNCINFO * TNC, UCHAR * Msg, int MsgLen);
int KissEncode(UCHAR * inbuff, UCHAR * outbuff, int len); int KissEncode(UCHAR * inbuff, UCHAR * outbuff, int len);
VOID SendXMLCommand(struct TNCINFO * TNC, char * Command, char * Value, char ParamType); VOID SendXMLCommand(struct TNCINFO * TNC, char * Command, char * Value, char ParamType);
VOID SendXMLCommandInt(struct TNCINFO * TNC, char * Command, int Value, char ParamType);
VOID FLSlowTimer(struct TNCINFO * TNC); VOID FLSlowTimer(struct TNCINFO * TNC);
VOID SendKISSCommand(struct TNCINFO * TNC, char * Msg); VOID SendKISSCommand(struct TNCINFO * TNC, char * Msg);
@ -592,7 +593,7 @@ pollloop:
} }
else else
{ {
SendXMLCommand(TNC, "modem.set_carrier", (char *)atoi(&buff->L2DATA[5]), 'I'); SendXMLCommandInt(TNC, "modem.set_carrier", atoi(&buff->L2DATA[5]), 'I');
} }
TNC->InternalCmd = TRUE; TNC->InternalCmd = TRUE;
@ -3197,7 +3198,7 @@ VOID FLReleaseTNC(struct TNCINFO * TNC)
else else
{ {
SendXMLCommand(TNC, "modem.set_by_name", TNC->FLInfo->DefaultMode, 'S'); SendXMLCommand(TNC, "modem.set_by_name", TNC->FLInfo->DefaultMode, 'S');
SendXMLCommand(TNC, "modem.set_carrier", (char *)TNC->FLInfo->DefaultFreq, 'I'); SendXMLCommandInt(TNC, "modem.set_carrier", TNC->FLInfo->DefaultFreq, 'I');
} }
} }
// Start Scanner // Start Scanner
@ -3895,6 +3896,27 @@ VOID SendXMLCommand(struct TNCINFO * TNC, char * Command, char * Value, char Par
return; return;
} }
VOID SendXMLCommandInt(struct TNCINFO * TNC, char * Command, int Value, char ParamType)
{
int Len;
char ReqBuf[512];
char SendBuff[512];
struct FLINFO * FL = TNC->FLInfo;
struct ARQINFO * ARQ = TNC->ARQInfo;
char ValueString[256] ="";
if (!TNC->CONNECTED || TNC->FLInfo->KISSMODE)
return;
sprintf(ValueString, "<params><param><value><i4>%d</i4></value></param></params\r\n>", Value);
strcpy(FL->LastXML, Command);
Len = sprintf(ReqBuf, Req, FL->LastXML, ValueString);
Len = sprintf(SendBuff, MsgHddr, Len, ReqBuf);
send(TNC->TCPSock, SendBuff, Len, 0);
return;
}
VOID SendXMLPoll(struct TNCINFO * TNC) VOID SendXMLPoll(struct TNCINFO * TNC)
{ {
int Len; int Len;

View File

@ -612,15 +612,15 @@ struct MSESSION * FindMSession(unsigned int Key)
#define LZMA_STR "\1LZMA" #define LZMA_STR "\1LZMA"
UCHAR * LZUncompress(UCHAR * Decoded, int Len, int * NewLen) UCHAR * LZUncompress(UCHAR * Decoded, size_t Len, size_t * NewLen)
{ {
unsigned char * buf; unsigned char * buf;
unsigned char inprops[LZMA_PROPS_SIZE]; unsigned char inprops[LZMA_PROPS_SIZE];
size_t inlen; size_t inlen;
int r; int r;
UINT rlen; size_t rlen = 0;
UINT outlen; size_t outlen;
memcpy(&rlen, &Decoded[5], 4); memcpy(&rlen, &Decoded[5], 4);
@ -668,8 +668,8 @@ void SaveMulticastMessage(struct MSESSION * MSession)
{ {
UCHAR * Decoded = NULL; // Output from Basexxx decode UCHAR * Decoded = NULL; // Output from Basexxx decode
UCHAR * Uncompressed = NULL; UCHAR * Uncompressed = NULL;
int DecodedLen; // Length of decoded message size_t DecodedLen; // Length of decoded message
int UncompressedLen; // Length of decompressed message size_t UncompressedLen; // Length of decompressed message
int ExpectedLen; // From front of Base128 or Base256 message int ExpectedLen; // From front of Base128 or Base256 message
int HddrLen; // Length of Expected Len Header int HddrLen; // Length of Expected Len Header

View File

@ -10,14 +10,14 @@
#endif #endif
#define KVers 6,0,24,52 #define KVers 6,0,24,53
#define KVerstring "6.0.24.52\0" #define KVerstring "6.0.24.53\0"
#ifdef CKernel #ifdef CKernel
#define Vers KVers #define Vers KVers
#define Verstring KVerstring #define Verstring KVerstring
#define Datestring "November 2024" #define Datestring "December 2024"
#define VerComments "G8BPQ Packet Switch (C Version)" KVerstring #define VerComments "G8BPQ Packet Switch (C Version)" KVerstring
#define VerCopyright "Copyright © 2001-2024 John Wiseman G8BPQ\0" #define VerCopyright "Copyright © 2001-2024 John Wiseman G8BPQ\0"
#define VerDesc "BPQ32 Switch\0" #define VerDesc "BPQ32 Switch\0"

View File

@ -1416,7 +1416,7 @@ int CreateWPMessage()
// if (ptr->last_modif > LASTWPSendTime && ptr->Type == 'U' && ptr->first_homebbs[0]) // if (ptr->last_modif > LASTWPSendTime && ptr->Type == 'U' && ptr->first_homebbs[0])
if (ptr->changed && ptr->last_modif > LASTWPSendTime && ptr->first_homebbs[0]) if (ptr->changed && ptr->last_modif > LASTWPSendTime && ptr->first_homebbs[0])
{ {
tm = gmtime(&ptr->last_modif); tm = gmtime((time_t *)&ptr->last_modif);
MsgLen += sprintf(Buffptr, "On %02d%02d%02d %s/%c @ %s zip %s %s %s\r\n", MsgLen += sprintf(Buffptr, "On %02d%02d%02d %s/%c @ %s zip %s %s %s\r\n",
tm->tm_year-100, tm->tm_mon+1, tm->tm_mday, tm->tm_year-100, tm->tm_mon+1, tm->tm_mday,
ptr->callsign, ptr->Type, ptr->first_homebbs, ptr->callsign, ptr->Type, ptr->first_homebbs,
@ -1533,8 +1533,8 @@ VOID CreateWPReport()
len = sprintf(Line, "%-7s,%c,%s,%s,%s,%s,%s,%s,%s,%d,%s,%s\r\n", len = sprintf(Line, "%-7s,%c,%s,%s,%s,%s,%s,%s,%s,%d,%s,%s\r\n",
WP->callsign, WP->Type, WP->first_homebbs, WP->first_qth, WP->first_zip, WP->callsign, WP->Type, WP->first_homebbs, WP->first_qth, WP->first_zip,
WP->secnd_homebbs, WP->secnd_qth, WP->secnd_zip, WP->name, WP->changed, WP->secnd_homebbs, WP->secnd_qth, WP->secnd_zip, WP->name, WP->changed,
FormatWPDate(WP->last_modif), FormatWPDate((time_t)WP->last_modif),
FormatWPDate(WP->last_seen)); FormatWPDate((time_t)WP->last_seen));
fwrite(Line, 1, len, hFile); fwrite(Line, 1, len, hFile);
} }

View File

@ -643,9 +643,9 @@ struct MsgInfo
// For 64 bit time_t compatibility define as long long // For 64 bit time_t compatibility define as long long
// (so struct is same with 32 or 64 bit time_t) // (so struct is same with 32 or 64 bit time_t)
long long datereceived; int64_t datereceived;
long long datecreated; int64_t datecreated;
long long datechanged; int64_t datechanged;
char Spare[61 - 24]; // For future use char Spare[61 - 24]; // For future use
} ; } ;

View File

@ -912,7 +912,7 @@ BOOL Start()
PORT->PROTOCOL = (char)PortRec->PROTOCOL; PORT->PROTOCOL = (char)PortRec->PROTOCOL;
PORT->IOBASE = PortRec->IOADDR; PORT->IOBASE = PortRec->IOADDR;
if (PortRec->SerialPortName[0]) if (PortRec->SerialPortName && PortRec->SerialPortName[0])
PORT->SerialPortName = _strdup(PortRec->SerialPortName); PORT->SerialPortName = _strdup(PortRec->SerialPortName);
else else
{ {

View File

@ -2424,7 +2424,7 @@ int doSerialPortName(int i, char * value, char * rec)
if (IsNumeric(rec)) if (IsNumeric(rec))
xxp.IOADDR = atoi(rec); xxp.IOADDR = atoi(rec);
else else
strcpy(xxp.SerialPortName, rec); xxp.SerialPortName = strdup(rec);
return 1; return 1;
} }

View File

@ -67,7 +67,7 @@ struct PORTCONFIG
char Pad2[10]; // 246 char Pad2[10]; // 246
char VALIDCALLS[256]; // 256 - 512 char VALIDCALLS[256]; // 256 - 512
struct WL2KInfo * WL2K; // 512 struct WL2KInfo * WL2K; // 512
char SerialPortName[80]; // 516 char * SerialPortName; // 516
struct XDIGI * XDIGIS; // 596 Cross port digi setup struct XDIGI * XDIGIS; // 596 Cross port digi setup
int RIGPORT; // Linked port with RigControl int RIGPORT; // Linked port with RigControl
unsigned int PERMITTEDAPPLS; // Appls allowed on this port unsigned int PERMITTEDAPPLS; // Appls allowed on this port

View File

@ -869,7 +869,6 @@ double LonFromLOC = 0;
void SendBBSDataToPktMap() void SendBBSDataToPktMap()
{ {
char Return[4096];
char Request[64]; char Request[64];
char * Params; char * Params;
char * ptr; char * ptr;
@ -967,7 +966,7 @@ void SendBBSDataToPktMap()
CheckifRoutable(Msg); CheckifRoutable(Msg);
tm = gmtime(&Msg->datereceived); tm = gmtime((time_t *)&Msg->datereceived);
sprintf(Time, "%04d-%02d-%02dT%02d:%02d:%02d+00:00", sprintf(Time, "%04d-%02d-%02dT%02d:%02d:%02d+00:00",
tm->tm_year + 1900, tm->tm_mon+1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec); tm->tm_year + 1900, tm->tm_mon+1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec);
@ -1101,7 +1100,7 @@ int unroutableCount = 0;
ptr += sprintf(ptr, "\"location\": \"%s\",\r\n", ourBBSRec->Address); ptr += sprintf(ptr, "\"location\": \"%s\",\r\n", ourBBSRec->Address);
ptr += sprintf(ptr, "\"unroutable\": %s\r\n}\r\n", Unroutables); ptr += sprintf(ptr, "\"unroutable\": %s\r\n}\r\n", Unroutables);
SendWebRequest("packetnodes.spots.radio", Request, Params, Return); SendWebRequest("packetnodes.spots.radio", Request, Params, 0);
free(Messages); free(Messages);
free(Unroutables); free(Unroutables);
free(Params); free(Params);