diff options
author | citats <citats@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-03-15 05:38:41 +0000 |
---|---|---|
committer | citats <citats@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-03-15 05:38:41 +0000 |
commit | 16b69b4c568e4135cab84ccf7502d37fc7340341 (patch) | |
tree | 94a6d2d9876e51fe88d044712be8c64f6d9aed14 /pbx/pbx_spool.c | |
parent | 44d65f0f0920180b830a38010788ac55a45ccd18 (diff) |
Update spool file times after we close the file (bug 1018)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2431 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/pbx_spool.c')
-rwxr-xr-x | pbx/pbx_spool.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c index d456810bb..ef367855a 100755 --- a/pbx/pbx_spool.c +++ b/pbx/pbx_spool.c @@ -234,11 +234,6 @@ static int scan_service(char *fn, time_t now, time_t atime) f = fopen(fn, "r+"); if (f) { if (!apply_outgoing(o, fn, f)) { - /* Update the file time */ - tbuf.actime = atime; - tbuf.modtime = now + o->retrytime; - if (utime(o->fn, &tbuf)) - ast_log(LOG_WARNING, "Unable to set utime on %s: %s\n", fn, strerror(errno)); /* Increment retries */ o->retries++; #if 0 @@ -249,6 +244,11 @@ static int scan_service(char *fn, time_t now, time_t atime) fseek(f, 0L, SEEK_END); fprintf(f, "Retry: %d (%ld)\n", o->retries, (long) now); fclose(f); + /* Update the file time */ + tbuf.actime = atime; + tbuf.modtime = now + o->retrytime; + if (utime(o->fn, &tbuf)) + ast_log(LOG_WARNING, "Unable to set utime on %s: %s\n", fn, strerror(errno)); now += o->retrytime; launch_service(o); return now; |