summaryrefslogtreecommitdiff
path: root/CommonCode.c
diff options
context:
space:
mode:
authorDave Hibberd <hibby@debian.org>2024-03-26 20:25:33 +0000
committerDave Hibberd <hibby@debian.org>2024-03-26 20:25:33 +0000
commita1e823d3770e62bc9736b7ad7b4469108b1ab553 (patch)
treef349bce4f58382535a96a8850f9f3f644727e2fc /CommonCode.c
parente65a668cece9e455477ab9f3c671d18034f36b71 (diff)
parent566b839fd49dc6c3345e865baa9c64e25dd8973a (diff)
Merge branch 'debian/latest' into debian/bookworm
Diffstat (limited to 'CommonCode.c')
-rw-r--r--CommonCode.c38
1 files changed, 19 insertions, 19 deletions
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 );