[Asterisk-cvs] asterisk/pbx pbx_spool.c,1.5,1.6

citats at lists.digium.com citats at lists.digium.com
Mon Mar 15 00:44:38 CST 2004


Update of /usr/cvsroot/asterisk/pbx
In directory mongoose.digium.com:/tmp/cvs-serv9732/pbx

Modified Files:
	pbx_spool.c 
Log Message:
Update spool file times after we close the file (bug 1018)


Index: pbx_spool.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx/pbx_spool.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- pbx_spool.c	28 Jan 2004 21:32:48 -0000	1.5
+++ pbx_spool.c	15 Mar 2004 05:38:41 -0000	1.6
@@ -234,11 +234,6 @@
 		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 @@
 					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;




More information about the svn-commits mailing list