mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 04:11:08 +00:00
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) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@47497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -9473,14 +9473,14 @@ static int function_iaxpeer(struct ast_channel *chan, char *cmd, char *data, cha
|
||||
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user