[asterisk-commits] tilghman: branch 1.6.1 r261097 - in /branches/1.6.1: ./ main/channel.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue May 4 18:55:54 CDT 2010
Author: tilghman
Date: Tue May 4 18:55:50 2010
New Revision: 261097
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=261097
Log:
Merged revisions 261095 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r261095 | tilghman | 2010-05-04 18:51:52 -0500 (Tue, 04 May 2010) | 18 lines
Merged revisions 261093-261094 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r261093 | tilghman | 2010-05-04 18:36:53 -0500 (Tue, 04 May 2010) | 7 lines
Protect against overflow, when calculating how long to wait for a frame.
(closes issue #17128)
Reported by: under
Patches:
d.diff uploaded by under (license 914)
........
r261094 | tilghman | 2010-05-04 18:47:08 -0500 (Tue, 04 May 2010) | 2 lines
Add a tiny corner case to the previous commit
........
................
Modified:
branches/1.6.1/ (props changed)
branches/1.6.1/main/channel.c
Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.1/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.1/main/channel.c?view=diff&rev=261097&r1=261096&r2=261097
==============================================================================
--- branches/1.6.1/main/channel.c (original)
+++ branches/1.6.1/main/channel.c Tue May 4 18:55:50 2010
@@ -2068,10 +2068,15 @@
}
/* Wait full interval */
rms = *ms;
- if (!ast_tvzero(whentohangup)) {
+ /* INT_MAX, not LONG_MAX, because it matters on 64-bit */
+ if (!ast_tvzero(whentohangup) && whentohangup.tv_sec < INT_MAX / 1000) {
rms = whentohangup.tv_sec * 1000 + whentohangup.tv_usec / 1000; /* timeout in milliseconds */
- if (*ms >= 0 && *ms < rms) /* original *ms still smaller */
+ if (*ms >= 0 && *ms < rms) { /* original *ms still smaller */
rms = *ms;
+ }
+ } else if (!ast_tvzero(whentohangup) && rms < 0) {
+ /* Tiny corner case... call would need to last >24 days */
+ rms = INT_MAX;
}
/*
* Build the pollfd array, putting the channels' fds first,
More information about the asterisk-commits
mailing list