diff --git a/Bpq32.c b/Bpq32.c index 65155bf..fce5a9a 100644 --- a/Bpq32.c +++ b/Bpq32.c @@ -1230,7 +1230,7 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses // NodeAPI improvements (46) // Add MQTT Interface (46) // Fix buffer leak in ARDOP codev(46) - +// Fix possilbe crash if MQTT not in use (47) #define CKernel diff --git a/Events.c b/Events.c index a3ae616..1d42872 100644 --- a/Events.c +++ b/Events.c @@ -40,6 +40,7 @@ VOID __cdecl Debugprintf(const char * format, ...); extern BOOL EventsEnabled; void MQTTReportSession(char * Msg); +extern int MQTT; extern char Modenames[19][10]; @@ -162,7 +163,8 @@ void hookL2SessionDeleted(struct _LINKTABLE * LINK) "KISS", LINK->Direction, LINK->LINKPORT->PORTNUMBER, LINK->callingCall, LINK->receivingCall, sessionTime, LINK->bytesTXed, avBytesSent, LINK->bytesRXed, avBytesRXed, timestamp); - MQTTReportSession(Msg); + if (MQTT) + MQTTReportSession(Msg); } LINK->ConnectTime = 0; @@ -203,7 +205,8 @@ void hookL4SessionDeleted(struct TNCINFO * TNC, struct STREAMINFO * STREAM) Modenames[TNC->Hardware - 1], TNC->Port, STREAM->MyCall, STREAM->RemoteCall, sessionTime, STREAM->BytesTXed, avBytesSent, STREAM->BytesRXed, avBytesRXed, timestamp); - MQTTReportSession(Msg); + if (MQTT) + MQTTReportSession(Msg); STREAM->ConnectTime = 0; } diff --git a/Versions.h b/Versions.h index 8e7e6f1..0dc95ae 100644 --- a/Versions.h +++ b/Versions.h @@ -10,8 +10,8 @@ #endif -#define KVers 6,0,24,46 -#define KVerstring "6.0.24.46\0" +#define KVers 6,0,24,47 +#define KVerstring "6.0.24.47\0" #ifdef CKernel