[asterisk-commits] file: trunk r55718 - in /trunk: ./ channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Feb 20 17:00:12 MST 2007


Author: file
Date: Tue Feb 20 18:00:11 2007
New Revision: 55718

URL: http://svn.digium.com/view/asterisk?view=rev&rev=55718
Log:
Merged revisions 55717 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r55717 | file | 2007-02-20 18:57:03 -0500 (Tue, 20 Feb 2007) | 2 lines

Return behavior I removed. I did not remember that you could just add a localnet entry to make it work.

........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=55718&r1=55717&r2=55718
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Feb 20 18:00:11 2007
@@ -1925,14 +1925,16 @@
  */
 static enum sip_result ast_sip_ouraddrfor(struct in_addr *them, struct in_addr *us)
 {
-	struct sockaddr_in theirs;
+	struct sockaddr_in theirs, ours;
 
 	/* Get our local information */
 	ast_ouraddrfor(them, us);
 	theirs.sin_addr = *them;
+	ours.sin_addr = *us;
 
 	if (localaddr && externip.sin_addr.s_addr &&
-	    ast_apply_ha(localaddr, &theirs)) {
+	    (ast_apply_ha(localaddr, &theirs)) &&
+	    (!ast_apply_ha(localaddr, &ours))) {
 		if (externexpire && time(NULL) >= externexpire) {
 			struct ast_hostent ahp;
 			struct hostent *hp;



More information about the asterisk-commits mailing list