[Asterisk-cvs] asterisk/pbx pbx_spool.c,1.9,1.10

citats at lists.digium.com citats at lists.digium.com
Sun Apr 4 22:47:52 CDT 2004


Update of /usr/cvsroot/asterisk/pbx
In directory mongoose.digium.com:/home/citats/cvs/asterisk/pbx

Modified Files:
	pbx_spool.c 
Log Message:
Only update utime in pbx_spool.c if the file exists


Index: pbx_spool.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx/pbx_spool.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- pbx_spool.c	5 Apr 2004 00:00:23 -0000	1.9
+++ pbx_spool.c	5 Apr 2004 02:47:48 -0000	1.10
@@ -203,12 +203,12 @@
 			fclose(f);
 		} else
 			close(fd);
+		/* Update the file time */
+		tbuf.actime = now;
+		tbuf.modtime = now + o->retrytime;
+		if (utime(o->fn, &tbuf))
+			ast_log(LOG_WARNING, "Unable to set utime on %s: %s\n", o->fn, strerror(errno));
 	}
-	/* Update the file time */
-	tbuf.actime = now;
-	tbuf.modtime = now + o->retrytime;
-	if (utime(o->fn, &tbuf))
-		ast_log(LOG_WARNING, "Unable to set utime on %s: %s\n", o->fn, strerror(errno));
 }
 
 static void *attempt_thread(void *data)
@@ -258,7 +258,6 @@
 static int scan_service(char *fn, time_t now, time_t atime)
 {
 	struct outgoing *o;
-	struct utimbuf tbuf;
 	FILE *f;
 	o = malloc(sizeof(struct outgoing));
 	if (o) {




More information about the svn-commits mailing list