Skip to content
Snippets Groups Projects
Commit 6e6e02ce authored by Tilghman Lesher's avatar Tilghman Lesher
Browse files

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 5769e6ea
No related branches found
No related tags found
No related merge requests found
...@@ -74,8 +74,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") ...@@ -74,8 +74,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#define TRUE (!FALSE) #define TRUE (!FALSE)
#endif #endif
static int udptlstart; static int udptlstart = 4500;
static int udptlend; static int udptlend = 4599;
static int udptldebug; /*!< Are we debugging? */ static int udptldebug; /*!< Are we debugging? */
static struct sockaddr_in udptldebugaddr; /*!< Debug packets to/from this host */ static struct sockaddr_in udptldebugaddr; /*!< Debug packets to/from this host */
#ifdef SO_NO_CHECK #ifdef SO_NO_CHECK
...@@ -808,7 +808,7 @@ struct ast_udptl *ast_udptl_new_with_bindaddr(struct sched_context *sched, struc ...@@ -808,7 +808,7 @@ struct ast_udptl *ast_udptl_new_with_bindaddr(struct sched_context *sched, struc
setsockopt(udptl->fd, SOL_SOCKET, SO_NO_CHECK, &nochecksums, sizeof(nochecksums)); setsockopt(udptl->fd, SOL_SOCKET, SO_NO_CHECK, &nochecksums, sizeof(nochecksums));
#endif #endif
/* Find us a place */ /* Find us a place */
x = (ast_random() % (udptlend - udptlstart)) + udptlstart; x = (udptlstart == udptlend) ? udptlstart : (ast_random() % (udptlend - udptlstart)) + udptlstart;
startplace = x; startplace = x;
for (;;) { for (;;) {
udptl->us.sin_port = htons(x); udptl->us.sin_port = htons(x);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment