pud: cache the correct timestamp
authorFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 15 Oct 2015 09:57:39 +0000 (11:57 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 15 Oct 2015 12:47:56 +0000 (14:47 +0200)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/pud/src/posFile.c

index 664c2bc..11f9f1b 100644 (file)
@@ -177,7 +177,7 @@ bool readPositionFile(char * fileName, nmeaINFO * nmeaInfo) {
        result.mtrack = POSFILE_DEFAULT_MTRACK;
        result.magvar = POSFILE_DEFAULT_MAGVAR;
 
-       memcpy(&cachedStat.timeStamp, &statBuf.st_mtime, sizeof(cachedStat.timeStamp));
+       memcpy(&cachedStat.timeStamp, mtim, sizeof(cachedStat.timeStamp));
 
        while (fgets(line, LINE_LENGTH, fp)) {
                regmatch_t pmatch[regexNameValuematchCount];