[Asterisk-cvs] asterisk/pbx pbx_spool.c,1.5.2.3,1.5.2.4

citats at lists.digium.com citats at lists.digium.com
Sun Apr 4 22:48:28 CDT 2004


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

Modified Files:
      Tag: v1-0_stable
	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.5.2.3
retrieving revision 1.5.2.4
diff -u -d -r1.5.2.3 -r1.5.2.4
--- pbx_spool.c	5 Apr 2004 00:00:34 -0000	1.5.2.3
+++ pbx_spool.c	5 Apr 2004 02:48:23 -0000	1.5.2.4
@@ -206,12 +206,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)
@@ -261,7 +261,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