[asterisk-commits] tilghman: branch 1.6.1 r159477 - in /branches/1.6.1: ./ main/udptl.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Nov 26 12:38:08 CST 2008
Author: tilghman
Date: Wed Nov 26 12:38:07 2008
New Revision: 159477
URL: http://svn.digium.com/view/asterisk?view=rev&rev=159477
Log:
Merged revisions 159475 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r159475 | tilghman | 2008-11-26 12:33:04 -0600 (Wed, 26 Nov 2008) | 7 lines
If the config file does not exist, then the first use crashes Asterisk.
(closes issue #13848)
Reported by: klaus3000
Patches:
udptl.c.patch uploaded by eliel (license 64)
Tested by: blitzrage
........
Modified:
branches/1.6.1/ (props changed)
branches/1.6.1/main/udptl.c
Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.1/main/udptl.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/main/udptl.c?view=diff&rev=159477&r1=159476&r2=159477
==============================================================================
--- branches/1.6.1/main/udptl.c (original)
+++ branches/1.6.1/main/udptl.c Wed Nov 26 12:38:07 2008
@@ -74,8 +74,8 @@
#define TRUE (!FALSE)
#endif
-static int udptlstart;
-static int udptlend;
+static int udptlstart = 4500;
+static int udptlend = 4599;
static int udptldebug; /*!< Are we debugging? */
static struct sockaddr_in udptldebugaddr; /*!< Debug packets to/from this host */
#ifdef SO_NO_CHECK
@@ -808,7 +808,7 @@
setsockopt(udptl->fd, SOL_SOCKET, SO_NO_CHECK, &nochecksums, sizeof(nochecksums));
#endif
/* Find us a place */
- x = (ast_random() % (udptlend - udptlstart)) + udptlstart;
+ x = (udptlstart == udptlend) ? udptlstart : (ast_random() % (udptlend - udptlstart)) + udptlstart;
startplace = x;
for (;;) {
udptl->us.sin_port = htons(x);
More information about the asterisk-commits
mailing list