diff options
author | bbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-09 18:51:52 +0000 |
---|---|---|
committer | bbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-09 18:51:52 +0000 |
commit | 722eb3c4c3cfa1c0cee915c949c5f95199ee24dd (patch) | |
tree | 25683963c5e51bdedd6211cd0ea92a85639505c3 /main/stun.c | |
parent | 815b5b09da5e555add7bba3d8fca588e7611248a (diff) |
Merged revisions 285710 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
........
r285710 | bbryant | 2010-09-09 14:50:13 -0400 (Thu, 09 Sep 2010) | 8 lines
Fixes an issue with dialplan pattern matching where the specificity for pattern ranges and pattern special characters was inconsistent.
(closes issue #16903)
Reported by: Nick_Lewis
Patches:
pbx.c-specificity.patch uploaded by Nick Lewis (license 657)
Tested by: Nick_Lewis
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@285711 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/stun.c')
-rw-r--r-- | main/stun.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/main/stun.c b/main/stun.c index 74652f90b..3ad326ee8 100644 --- a/main/stun.c +++ b/main/stun.c @@ -397,8 +397,7 @@ int ast_stun_request(int s, struct sockaddr_in *dst, for (retry = 0; retry < 3; retry++) { /* XXX make retries configurable */ /* send request, possibly wait for reply */ unsigned char reply_buf[1024]; - fd_set rfds; - struct timeval to = { 3, 0 }; /* timeout, make it configurable */ + struct pollfd pfds = { .fd = s, .events = POLLIN }; struct sockaddr_in src; socklen_t srclen; @@ -410,9 +409,7 @@ int ast_stun_request(int s, struct sockaddr_in *dst, } if (answer == NULL) break; - FD_ZERO(&rfds); - FD_SET(s, &rfds); - res = ast_select(s + 1, &rfds, NULL, NULL, &to); + res = ast_poll(&pfds, 1, 3000); if (res <= 0) /* timeout or error */ continue; memset(&src, 0, sizeof(src)); |