[asterisk-commits] qwell: trunk r92421 - /trunk/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Dec 11 15:58:27 CST 2007
Author: qwell
Date: Tue Dec 11 15:58:26 2007
New Revision: 92421
URL: http://svn.digium.com/view/asterisk?view=rev&rev=92421
Log:
We need to set the address we want to match against before we actually do the match..
Closes issue #11518.
Modified:
trunk/channels/chan_sip.c
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=92421&r1=92420&r2=92421
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Dec 11 15:58:26 2007
@@ -2200,14 +2200,16 @@
* when passed to ast_apply_ha() so it does need to be remapped.
* This fourth condition is checked later.
*/
- int want_remap = localaddr &&
- (externip.sin_addr.s_addr || stunaddr.sin_addr.s_addr) &&
- ast_apply_ha(localaddr, &theirs) == AST_SENSE_ALLOW ;
+ int want_remap;
*us = internip; /* starting guess for the internal address */
/* now ask the system what would it use to talk to 'them' */
ast_ouraddrfor(them, &us->sin_addr);
theirs.sin_addr = *them;
+
+ want_remap = localaddr &&
+ (externip.sin_addr.s_addr || stunaddr.sin_addr.s_addr) &&
+ ast_apply_ha(localaddr, &theirs) == AST_SENSE_ALLOW ;
if (want_remap &&
(!global_matchexterniplocally || !ast_apply_ha(localaddr, us)) ) {
More information about the asterisk-commits
mailing list