[svn-commits] file: branch 1.4 r55717 - /branches/1.4/channels/chan_sip.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue Feb 20 16:57:03 MST 2007


Author: file
Date: Tue Feb 20 17:57:03 2007
New Revision: 55717

URL: http://svn.digium.com/view/asterisk?view=rev&rev=55717
Log:
Return behavior I removed. I did not remember that you could just add a localnet entry to make it work.

Modified:
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=55717&r1=55716&r2=55717
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Tue Feb 20 17:57:03 2007
@@ -1771,14 +1771,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 svn-commits mailing list