[asterisk-commits] russell: trunk r47498 - in /trunk: ./ channels/chan_iax2.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Nov 11 23:31:40 MST 2006


Author: russell
Date: Sun Nov 12 00:31:39 2006
New Revision: 47498

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

................
r47497 | russell | 2006-11-12 01:23:23 -0500 (Sun, 12 Nov 2006) | 12 lines

Merged revisions 47496 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r47496 | russell | 2006-11-12 01:09:03 -0500 (Sun, 12 Nov 2006) | 4 lines

Only do the check to determine whether the channel calling this function is an
IAX2 channel when getting the IP address using the special argument, 
CURRENTCHANNEL.  (issue #8341, jcovert)

........

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

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

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

Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=47498&r1=47497&r2=47498
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Sun Nov 12 00:31:39 2006
@@ -9502,14 +9502,14 @@
 	struct iax2_peer *peer;
 	char *peername, *colname;
 
-	if (chan->tech != &iax2_tech)
-		return -1;
-
 	peername = ast_strdupa(data);
 
 	/* if our channel, return the IP address of the endpoint of current channel */
 	if (!strcmp(peername,"CURRENTCHANNEL")) {
-	        unsigned short callno = PTR_TO_CALLNO(chan->tech_pvt);
+	        unsigned short callno;
+		if (chan->tech != &iax2_tech)
+			return -1;
+		callno = PTR_TO_CALLNO(chan->tech_pvt);	
 		ast_copy_string(buf, iaxs[callno]->addr.sin_addr.s_addr ? ast_inet_ntoa(iaxs[callno]->addr.sin_addr) : "", len);
 		return 0;
 	}



More information about the asterisk-commits mailing list