mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-23 05:40:52 +00:00
Merged revisions 43553 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r43553 | russell | 2006-09-24 09:53:35 -0400 (Sun, 24 Sep 2006) | 12 lines Merged revisions 43552 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r43552 | russell | 2006-09-24 09:50:30 -0400 (Sun, 24 Sep 2006) | 4 lines Check to see if the channel that is activating the IAXPEER function is actually an IAX2 channel before proceeding to process it to avoid crashing. (issue #8017, reported by admott, fixed by myself) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -9483,9 +9483,11 @@ static int function_iaxpeer(struct ast_channel *chan, char *cmd, char *data, cha
|
|||||||
struct iax2_peer *peer;
|
struct iax2_peer *peer;
|
||||||
char *peername, *colname;
|
char *peername, *colname;
|
||||||
|
|
||||||
if (!(peername = ast_strdupa(data)))
|
if (chan->tech != &iax2_tech)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
peername = ast_strdupa(data);
|
||||||
|
|
||||||
/* if our channel, return the IP address of the endpoint of current channel */
|
/* if our channel, return the IP address of the endpoint of current channel */
|
||||||
if (!strcmp(peername,"CURRENTCHANNEL")) {
|
if (!strcmp(peername,"CURRENTCHANNEL")) {
|
||||||
unsigned short callno = PTR_TO_CALLNO(chan->tech_pvt);
|
unsigned short callno = PTR_TO_CALLNO(chan->tech_pvt);
|
||||||
|
Reference in New Issue
Block a user