mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 10:33:13 +00:00
Update spool file times after we close the file (bug 1018)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2431 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -234,11 +234,6 @@ static int scan_service(char *fn, time_t now, time_t atime)
|
|||||||
f = fopen(fn, "r+");
|
f = fopen(fn, "r+");
|
||||||
if (f) {
|
if (f) {
|
||||||
if (!apply_outgoing(o, fn, 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 */
|
/* Increment retries */
|
||||||
o->retries++;
|
o->retries++;
|
||||||
#if 0
|
#if 0
|
||||||
@@ -249,6 +244,11 @@ static int scan_service(char *fn, time_t now, time_t atime)
|
|||||||
fseek(f, 0L, SEEK_END);
|
fseek(f, 0L, SEEK_END);
|
||||||
fprintf(f, "Retry: %d (%ld)\n", o->retries, (long) now);
|
fprintf(f, "Retry: %d (%ld)\n", o->retries, (long) now);
|
||||||
fclose(f);
|
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;
|
now += o->retrytime;
|
||||||
launch_service(o);
|
launch_service(o);
|
||||||
return now;
|
return now;
|
||||||
|
Reference in New Issue
Block a user