Skip to content

Commit c6da359

Browse files
author
=
committed
RPI needs to sync() before terminating
1 parent fea5344 commit c6da359

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

hcxnmealog.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,16 @@ return true;
176176
/*===========================================================================*/
177177
static void close_files(void)
178178
{
179-
if(fh_nmea != NULL)fclose(fh_nmea);
180-
if(fh_tsv != NULL)fclose(fh_tsv);
179+
if(fh_nmea != NULL)
180+
{
181+
fflush(fh_nmea);
182+
fclose(fh_nmea);
183+
}
184+
if(fh_tsv != NULL)
185+
{
186+
fflush(fh_tsv);
187+
fclose(fh_tsv);
188+
}
181189
return;
182190
}
183191
/*---------------------------------------------------------------------------*/

0 commit comments

Comments
 (0)