diff options
| author | Dave Hibberd <hibby@debian.org> | 2024-12-03 00:27:59 +0000 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2024-12-03 00:27:59 +0000 |
| commit | 745a9f8e880f8b9541bca2288e68b7f8d346d58d (patch) | |
| tree | 26d9f876a470d2f41d3a39403724cd2dc3ccfa02 | |
| parent | dd84b546a055a33657f094c2ef6d36a321a545ff (diff) | |
| parent | 96c573931d40b6b191614c96299d66ca6217d1d8 (diff) | |
Update upstream source from tag 'upstream/6.0.24.53+repack'
Update to upstream version '6.0.24.53+repack'
with Debian dir 64961bc210cd2b4237f556f2eada2c03ed86fd0f
| -rw-r--r-- | AEAPactor.c | 3 | ||||
| -rw-r--r-- | BPQMail.c | 1 | ||||
| -rw-r--r-- | Bpq32.c | 2 | ||||
| -rw-r--r-- | CommonCode.c | 2 | ||||
| -rw-r--r-- | DRATS.c | 2 | ||||
| -rw-r--r-- | FLDigi.c | 26 | ||||
| -rw-r--r-- | Multicast.c | 12 | ||||
| -rw-r--r-- | Versions.h | 6 | ||||
| -rw-r--r-- | WPRoutines.c | 6 | ||||
| -rw-r--r-- | bpqmail.h | 6 | ||||
| -rw-r--r-- | cMain.c | 2 | ||||
| -rw-r--r-- | config.c | 2 | ||||
| -rw-r--r-- | configstructs.h | 2 | ||||
| -rw-r--r-- | mailapi.c | 5 |
14 files changed, 48 insertions, 29 deletions
diff --git a/AEAPactor.c b/AEAPactor.c index 98ca400..643dae1 100644 --- a/AEAPactor.c +++ b/AEAPactor.c @@ -292,8 +292,7 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff) {
// Send Error Response
- buffptr->Len = 36;
- memcpy(buffptr->Data, "No Connection to PACTOR TNC\r", 36);
+ buffptr->Len = sprintf(buffptr->Data, "No Connection to PACTOR TNC\r");
C_Q_ADD(&TNC->Streams[Stream].PACTORtoBPQ_Q, buffptr);
@@ -3396,7 +3396,6 @@ BOOL Initialise() CreatePipeThread();
GetPGConfig();
-
APIClock = 0;
return TRUE;
@@ -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)
// Save MH and NODES every hour (51)
// 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
diff --git a/CommonCode.c b/CommonCode.c index e3504d1..bfcc8a2 100644 --- a/CommonCode.c +++ b/CommonCode.c @@ -5040,8 +5040,6 @@ DllExport VOID WINAPI SendWebRequest(char * Host, char * Request, char * Params, else
{
strlop(Buffer, 13);
- Debugprintf("Map Update Params - %s", Params);
-
Debugprintf("Map Update failed - %s", Buffer);
}
closesocket(sock);
@@ -168,7 +168,7 @@ int AllocateDRATSStream(struct DRATSSession * Sess) 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
}
@@ -93,6 +93,7 @@ VOID CheckFLDigiData(struct TNCINFO * TNC); VOID SendPacket(struct TNCINFO * TNC, UCHAR * Msg, int MsgLen);
int KissEncode(UCHAR * inbuff, UCHAR * outbuff, int len);
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 SendKISSCommand(struct TNCINFO * TNC, char * Msg);
@@ -592,7 +593,7 @@ pollloop: }
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;
@@ -3197,7 +3198,7 @@ VOID FLReleaseTNC(struct TNCINFO * TNC) else
{
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
@@ -3895,6 +3896,27 @@ VOID SendXMLCommand(struct TNCINFO * TNC, char * Command, char * Value, char Par 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)
{
int Len;
diff --git a/Multicast.c b/Multicast.c index 8283d3f..ba5dcb5 100644 --- a/Multicast.c +++ b/Multicast.c @@ -612,16 +612,16 @@ struct MSESSION * FindMSession(unsigned int Key) #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 inprops[LZMA_PROPS_SIZE];
size_t inlen;
int r;
- UINT rlen;
- UINT outlen;
-
+ size_t rlen = 0;
+ size_t outlen;
+
memcpy(&rlen, &Decoded[5], 4);
outlen = ntohl(rlen);
@@ -668,8 +668,8 @@ void SaveMulticastMessage(struct MSESSION * MSession) {
UCHAR * Decoded = NULL; // Output from Basexxx decode
UCHAR * Uncompressed = NULL;
- int DecodedLen; // Length of decoded message
- int UncompressedLen; // Length of decompressed message
+ size_t DecodedLen; // Length of decoded message
+ size_t UncompressedLen; // Length of decompressed message
int ExpectedLen; // From front of Base128 or Base256 message
int HddrLen; // Length of Expected Len Header
@@ -10,14 +10,14 @@ #endif
-#define KVers 6,0,24,52
-#define KVerstring "6.0.24.52\0"
+#define KVers 6,0,24,53
+#define KVerstring "6.0.24.53\0"
#ifdef CKernel
#define Vers KVers
#define Verstring KVerstring
-#define Datestring "November 2024"
+#define Datestring "December 2024"
#define VerComments "G8BPQ Packet Switch (C Version)" KVerstring
#define VerCopyright "Copyright © 2001-2024 John Wiseman G8BPQ\0"
#define VerDesc "BPQ32 Switch\0"
diff --git a/WPRoutines.c b/WPRoutines.c index 4a065b5..da46799 100644 --- a/WPRoutines.c +++ b/WPRoutines.c @@ -1416,7 +1416,7 @@ int CreateWPMessage() // if (ptr->last_modif > LASTWPSendTime && ptr->Type == 'U' && 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",
tm->tm_year-100, tm->tm_mon+1, tm->tm_mday,
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",
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,
- FormatWPDate(WP->last_modif),
- FormatWPDate(WP->last_seen));
+ FormatWPDate((time_t)WP->last_modif),
+ FormatWPDate((time_t)WP->last_seen));
fwrite(Line, 1, len, hFile);
}
@@ -643,9 +643,9 @@ struct MsgInfo // For 64 bit time_t compatibility define as long long
// (so struct is same with 32 or 64 bit time_t)
- long long datereceived;
- long long datecreated;
- long long datechanged;
+ int64_t datereceived;
+ int64_t datecreated;
+ int64_t datechanged;
char Spare[61 - 24]; // For future use
} ;
@@ -912,7 +912,7 @@ BOOL Start() PORT->PROTOCOL = (char)PortRec->PROTOCOL;
PORT->IOBASE = PortRec->IOADDR;
- if (PortRec->SerialPortName[0])
+ if (PortRec->SerialPortName && PortRec->SerialPortName[0])
PORT->SerialPortName = _strdup(PortRec->SerialPortName);
else
{
@@ -2424,7 +2424,7 @@ int doSerialPortName(int i, char * value, char * rec) if (IsNumeric(rec))
xxp.IOADDR = atoi(rec);
else
- strcpy(xxp.SerialPortName, rec);
+ xxp.SerialPortName = strdup(rec);
return 1;
}
diff --git a/configstructs.h b/configstructs.h index ef6f23b..831456d 100644 --- a/configstructs.h +++ b/configstructs.h @@ -67,7 +67,7 @@ struct PORTCONFIG char Pad2[10]; // 246
char VALIDCALLS[256]; // 256 - 512
struct WL2KInfo * WL2K; // 512
- char SerialPortName[80]; // 516
+ char * SerialPortName; // 516
struct XDIGI * XDIGIS; // 596 Cross port digi setup
int RIGPORT; // Linked port with RigControl
unsigned int PERMITTEDAPPLS; // Appls allowed on this port
@@ -869,7 +869,6 @@ double LonFromLOC = 0; void SendBBSDataToPktMap()
{
- char Return[4096];
char Request[64];
char * Params;
char * ptr;
@@ -967,7 +966,7 @@ void SendBBSDataToPktMap() CheckifRoutable(Msg);
- tm = gmtime(&Msg->datereceived);
+ tm = gmtime((time_t *)&Msg->datereceived);
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);
@@ -1101,7 +1100,7 @@ int unroutableCount = 0; ptr += sprintf(ptr, "\"location\": \"%s\",\r\n", ourBBSRec->Address);
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(Unroutables);
free(Params);
|
