From 5332f8b012034ba142c4a24fc6df74dfdc54f5a0 Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Tue, 26 Mar 2024 00:52:55 +0000 Subject: New upstream version 6.0.24.33 --- CommonCode.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'CommonCode.c') diff --git a/CommonCode.c b/CommonCode.c index abcbee1..da9b2d7 100644 --- a/CommonCode.c +++ b/CommonCode.c @@ -5003,20 +5003,20 @@ extern int MasterPort[MAXBPQPORTS+1]; void BuildPortMH(char * MHJSON, struct PORTCONTROL * PORT) { - struct tm * TM; - static char MHTIME[50]; - time_t szClock; - MHSTRUC * MH = PORT->PORTMHEARD; - int count = MHENTRIES; - char Normcall[20]; - int len; - char * ptr; - char mhstr[400]; - - if (MH == NULL) - return; + struct tm * TM; + static char MHTIME[50]; + time_t szClock; + MHSTRUC * MH = PORT->PORTMHEARD; + int count = MHENTRIES; + char Normcall[20]; + int len; + char * ptr; + char mhstr[400]; + + if (MH == NULL) + return; - while (count--) + while (count--) { if (MH->MHCALL[0] == 0) break; @@ -5028,22 +5028,22 @@ void BuildPortMH(char * MHJSON, struct PORTCONTROL * PORT) if ((*ptr & 1) == 0) { - // at least one digi - which we are not going to include - MH++; - continue; + // at least one digi - which we are not going to include + MH++; + continue; } Normcall[len++] = 0; //format TIME - + szClock = MH->MHTIME; TM = gmtime(&szClock); sprintf(MHTIME, "%d-%d-%d %02d:%02d:%02d", - 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); sprintf(mhstr, "{\"callSign\": \"%s\", \"port\": \"%d\", \"packets\": %d, \"lastHeard\": \"%s\" },\r\n" , - Normcall, PORT->PORTNUMBER, MH->MHCOUNT, MHTIME); + Normcall, PORT->PORTNUMBER, MH->MHCOUNT, MHTIME); strcat( MHJSON, mhstr ); -- cgit v1.2.3