Only assign line and device in handle_transfer_button when we have a subchannel.
(closes issue #16040) Reported by: ebroad git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@233059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
494647fbe7
commit
c1dfce9753
|
@ -4544,8 +4544,8 @@ static int handle_hold_button(struct skinny_subchannel *sub)
|
||||||
|
|
||||||
static int handle_transfer_button(struct skinny_subchannel *sub)
|
static int handle_transfer_button(struct skinny_subchannel *sub)
|
||||||
{
|
{
|
||||||
struct skinny_line *l = sub->parent;
|
struct skinny_line *l;
|
||||||
struct skinny_device *d = l->device;
|
struct skinny_device *d;
|
||||||
struct skinny_subchannel *newsub;
|
struct skinny_subchannel *newsub;
|
||||||
struct ast_channel *c;
|
struct ast_channel *c;
|
||||||
pthread_t t;
|
pthread_t t;
|
||||||
|
@ -4554,6 +4554,10 @@ static int handle_transfer_button(struct skinny_subchannel *sub)
|
||||||
ast_verbose("Transfer: No subchannel to transfer\n");
|
ast_verbose("Transfer: No subchannel to transfer\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
l = sub->parent;
|
||||||
|
d = l->device;
|
||||||
|
|
||||||
if (!sub->related) {
|
if (!sub->related) {
|
||||||
/* Another sub has not been created so this must be first XFER press */
|
/* Another sub has not been created so this must be first XFER press */
|
||||||
if (!sub->onhold) {
|
if (!sub->onhold) {
|
||||||
|
|
Loading…
Reference in New Issue