Skip to content
Snippets Groups Projects
Commit 6ca9632d authored by Kevin P. Fleming's avatar Kevin P. Fleming
Browse files

Merged revisions 7468 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7468 | kpfleming | 2005-12-13 10:06:27 -0600 (Tue, 13 Dec 2005) | 2 lines

correct broken math in tvfix() for timestamp values over one million

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent b7b2317d
No related branches found
No related tags found
No related merge requests found
...@@ -613,11 +613,11 @@ static struct timeval tvfix(struct timeval a) ...@@ -613,11 +613,11 @@ static struct timeval tvfix(struct timeval a)
if (a.tv_usec >= ONE_MILLION) { if (a.tv_usec >= ONE_MILLION) {
ast_log(LOG_WARNING, "warning too large timestamp %ld.%ld\n", ast_log(LOG_WARNING, "warning too large timestamp %ld.%ld\n",
a.tv_sec, (long int) a.tv_usec); a.tv_sec, (long int) a.tv_usec);
a.tv_sec += a.tv_usec % ONE_MILLION; a.tv_sec += a.tv_usec / ONE_MILLION;
a.tv_usec %= ONE_MILLION; a.tv_usec %= ONE_MILLION;
} else if (a.tv_usec < 0) { } else if (a.tv_usec < 0) {
ast_log(LOG_WARNING, "warning negative timestamp %ld.%ld\n", ast_log(LOG_WARNING, "warning negative timestamp %ld.%ld\n",
a.tv_sec, (long int) a.tv_usec); a.tv_sec, (long int) a.tv_usec);
a.tv_usec = 0; a.tv_usec = 0;
} }
return a; return a;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment