[asterisk-commits] jpeeler: branch 1.6.0 r113242 - in /branches/1.6.0: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 7 16:36:48 CDT 2008


Author: jpeeler
Date: Mon Apr  7 16:36:47 2008
New Revision: 113242

URL: http://svn.digium.com/view/asterisk?view=rev&rev=113242
Log:
Merged revisions 113241 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r113241 | jpeeler | 2008-04-07 16:35:48 -0500 (Mon, 07 Apr 2008) | 23 lines

Merged revisions 113013 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r113013 | jpeeler | 2008-04-07 10:18:10 -0500 (Mon, 07 Apr 2008) | 15 lines

Merged revisions 113012 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r113012 | jpeeler | 2008-04-07 10:16:44 -0500 (Mon, 07 Apr 2008) | 7 lines

(closes issue #12362)
(closes issue #12372)
Reported by: vinsik
Tested by: tecnoxarxa

This one line change makes an if inside a for loop (in realtime_peer) check all the ast_variables the loop was intending to test rather than just the first one.

........

................

................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/channels/chan_sip.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/channels/chan_sip.c?view=diff&rev=113242&r1=113241&r2=113242
==============================================================================
--- branches/1.6.0/channels/chan_sip.c (original)
+++ branches/1.6.0/channels/chan_sip.c Mon Apr  7 16:36:47 2008
@@ -3576,9 +3576,9 @@
 			 * is because we only have the IP address and the host field might be
 			 * set as a name (and the reverse PTR might not match).
 			 */
-			if (var) {
+			if (var && sin) {
 				for (tmp = var; tmp; tmp = tmp->next) {
-					if (!strcasecmp(var->name, "host")) {
+					if (!strcasecmp(tmp->name, "host")) {
 						struct hostent *hp;
 						struct ast_hostent ahp;
 						if (!(hp = ast_gethostbyname(tmp->value, &ahp)) || (memcmp(&hp->h_addr, &sin->sin_addr, sizeof(hp->h_addr)))) {




More information about the asterisk-commits mailing list