mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-14 08:31:02 +00:00
Don't try to queue up hold/unhold frames on a non-existent channel.
Issue 10276. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2864,6 +2864,10 @@ static int skinny_hold(struct skinny_subchannel *sub)
|
|||||||
struct skinnysession *s = d->session;
|
struct skinnysession *s = d->session;
|
||||||
struct skinny_req *req;
|
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 */
|
/* Channel needs to be put on hold */
|
||||||
if (skinnydebug)
|
if (skinnydebug)
|
||||||
ast_verbose("Putting on Hold(%d)\n", l->instance);
|
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 skinnysession *s = d->session;
|
||||||
struct skinny_req *req;
|
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 */
|
/* Channel is on hold, so we will unhold */
|
||||||
if (skinnydebug)
|
if (skinnydebug)
|
||||||
ast_verbose("Taking off Hold(%d)\n", l->instance);
|
ast_verbose("Taking off Hold(%d)\n", l->instance);
|
||||||
|
Reference in New Issue
Block a user