[asterisk-commits] tilghman: branch group/ast_strftime r75233 - /team/group/ast_strftime/res/snmp/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 16 11:05:12 CDT 2007


Author: tilghman
Date: Mon Jul 16 11:05:12 2007
New Revision: 75233

URL: http://svn.digium.com/view/asterisk?view=rev&rev=75233
Log:
One more module that somehow got missed in the conversion

Modified:
    team/group/ast_strftime/res/snmp/agent.c

Modified: team/group/ast_strftime/res/snmp/agent.c
URL: http://svn.digium.com/view/asterisk/team/group/ast_strftime/res/snmp/agent.c?view=diff&rev=75233&r1=75232&r2=75233
==============================================================================
--- team/group/ast_strftime/res/snmp/agent.c (original)
+++ team/group/ast_strftime/res/snmp/agent.c Mon Jul 16 11:05:12 2007
@@ -575,14 +575,14 @@
 	switch (vp->magic) {
 	case ASTCONFUPTIME:
 		gettimeofday(&tval, NULL);
-		long_ret = difftime(tval.tv_sec, ast_startuptime) * 100 + tval.tv_usec / 10000;
+		long_ret = difftime(tval.tv_sec, ast_startuptime.tv_sec) * 100 + tval.tv_usec / 10000 - ast_startuptime.tv_usec / 10000;
 		return (u_char *)&long_ret;
 	case ASTCONFRELOADTIME:
 		gettimeofday(&tval, NULL);
-		if (ast_lastreloadtime)
-			long_ret = difftime(tval.tv_sec, ast_lastreloadtime) * 100 + tval.tv_usec / 10000;
+		if (ast_lastreloadtime.tv_sec)
+			long_ret = difftime(tval.tv_sec, ast_lastreloadtime.tv_sec) * 100 + tval.tv_usec / 10000 - ast_lastreloadtime.tv_usec / 10000;
 		else
-			long_ret = difftime(tval.tv_sec, ast_startuptime) * 100 + tval.tv_usec / 10000;
+			long_ret = difftime(tval.tv_sec, ast_startuptime.tv_sec) * 100 + tval.tv_usec / 10000 - ast_startuptime.tv_usec / 10000;
 		return (u_char *)&long_ret;
 	case ASTCONFPID:
 		long_ret = getpid();




More information about the asterisk-commits mailing list