mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-20 12:20:12 +00:00
Only update utime in pbx_spool.c if the file exists
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -203,12 +203,12 @@ static void safe_append(struct outgoing *o, time_t now, char *s)
|
|||||||
fclose(f);
|
fclose(f);
|
||||||
} else
|
} else
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
|
||||||
/* Update the file time */
|
/* Update the file time */
|
||||||
tbuf.actime = now;
|
tbuf.actime = now;
|
||||||
tbuf.modtime = now + o->retrytime;
|
tbuf.modtime = now + o->retrytime;
|
||||||
if (utime(o->fn, &tbuf))
|
if (utime(o->fn, &tbuf))
|
||||||
ast_log(LOG_WARNING, "Unable to set utime on %s: %s\n", o->fn, strerror(errno));
|
ast_log(LOG_WARNING, "Unable to set utime on %s: %s\n", o->fn, strerror(errno));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *attempt_thread(void *data)
|
static void *attempt_thread(void *data)
|
||||||
@@ -258,7 +258,6 @@ static void launch_service(struct outgoing *o)
|
|||||||
static int scan_service(char *fn, time_t now, time_t atime)
|
static int scan_service(char *fn, time_t now, time_t atime)
|
||||||
{
|
{
|
||||||
struct outgoing *o;
|
struct outgoing *o;
|
||||||
struct utimbuf tbuf;
|
|
||||||
FILE *f;
|
FILE *f;
|
||||||
o = malloc(sizeof(struct outgoing));
|
o = malloc(sizeof(struct outgoing));
|
||||||
if (o) {
|
if (o) {
|
||||||
|
Reference in New Issue
Block a user