aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-23 17:57:53 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-23 17:57:53 +0000
commit49fa234763c27662cf6abeaa88578822042b04e3 (patch)
tree6aa05981c380cf9c055df7c47e0aac8f2b974c39 /channels
parentc2af80d220584cf84f5542d5acde79cf30ba37f3 (diff)
Don't try to queue up hold/unhold frames on a non-existent channel.
Issue 10276. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@76620 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_skinny.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index 8ed576536..2804bcd53 100644
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -2864,6 +2864,10 @@ static int skinny_hold(struct skinny_subchannel *sub)
struct skinnysession *s = d->session;
struct skinny_req *req;
+ /* Don't try to hold a channel that doesn't exist */
+ if (!sub || !sub->owner)
+ return 0;
+
/* Channel needs to be put on hold */
if (skinnydebug)
ast_verbose("Putting on Hold(%d)\n", l->instance);
@@ -2904,6 +2908,10 @@ static int skinny_unhold(struct skinny_subchannel *sub)
struct skinnysession *s = d->session;
struct skinny_req *req;
+ /* Don't try to unhold a channel that doesn't exist */
+ if (!sub || !sub->owner)
+ return 0;
+
/* Channel is on hold, so we will unhold */
if (skinnydebug)
ast_verbose("Taking off Hold(%d)\n", l->instance);