[Asterisk-cvs] asterisk cli.c,1.30.2.3,1.30.2.4

citats at lists.digium.com citats at lists.digium.com
Sun Mar 14 04:18:24 CST 2004


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

Modified Files:
      Tag: v1-0_stable
	cli.c 
Log Message:
Make sure time is valid for uptime (bug 1214)


Index: cli.c
===================================================================
RCS file: /usr/cvsroot/asterisk/cli.c,v
retrieving revision 1.30.2.3
retrieving revision 1.30.2.4
diff -u -d -r1.30.2.3 -r1.30.2.4
--- cli.c	6 Mar 2004 09:01:45 -0000	1.30.2.3
+++ cli.c	14 Mar 2004 09:12:13 -0000	1.30.2.4
@@ -186,6 +186,8 @@
 #define WEEK (DAY*7)
 #define YEAR (DAY*365)
 
+	if (timeval < 0)
+		return NULL;
 	if (timeval > YEAR) {
 		years = (timeval / YEAR);
 		timeval -= (years * YEAR);




More information about the svn-commits mailing list