]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
hfaxd: Don't update job's last modified time unless it's actually successfull
authorAidan Van Dyk <aidan@ifax.com>
Fri, 22 Feb 2008 20:23:32 +0000 (20:23 +0000)
committerAidan Van Dyk <aidan@ifax.com>
Fri, 22 Feb 2008 20:23:32 +0000 (20:23 +0000)
If the qfile can't be locked the updateJobFromDisk() will fail. In that
case, *don't* change the job's last modified time, so that next time,
it will be tried again.

hfaxd/Jobs.c++

index 3b93f8befab9b4225cf42fd5e6b7ed553cfe1075..3f6dab13a7aa1a7c429e92f53f1e06d7173cb322 100644 (file)
@@ -338,8 +338,8 @@ HylaFAXServer::checkJobState(Job* job)
        return (false);
     }
     if (job->lastmod < sb.st_mtime) {
-       (void) updateJobFromDisk(*job);
-       job->lastmod = sb.st_mtime;
+       if (updateJobFromDisk(*job))
+               job->lastmod = sb.st_mtime;
     }
     return (true);
 }