Package: asterisk / 1:1.6.2.9-2+squeeze12

skinny_fix_16040 Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From a90226f47e30f8805801fd21a5c80446ad65d6d4 Mon Sep 17 00:00:00 2001
From: Michiel van Baak <michiel@vanbaak.info>
Date: Fri, 4 Dec 2009 16:18:57 +0000
Bug: https://issues.asterisk.org/view.php?id=16040
Origin: http://svnview.digium.com/svn/asterisk?view=rev&rev=233059
Subject: [PATCH] Only assign line and device in handle_transfer_button when
 we have a subchannel.

Simple and minor bug fix required for applying AST-2012-008 .

---
 channels/chan_skinny.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index 7a6337d..3abcbe3 100644
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -4457,8 +4457,8 @@ static int handle_hold_button(struct skinny_subchannel *sub)
 
 static int handle_transfer_button(struct skinny_subchannel *sub)
 {
-	struct skinny_line *l = sub->parent;
-	struct skinny_device *d = l->device;
+	struct skinny_line *l;
+	struct skinny_device *d;
 	struct skinny_subchannel *newsub;
 	struct ast_channel *c;
 	pthread_t t;
@@ -4467,6 +4467,10 @@ static int handle_transfer_button(struct skinny_subchannel *sub)
 		ast_verbose("Transfer: No subchannel to transfer\n");
 		return -1;
 	}
+
+	l = sub->parent;
+	d = l->device;
+
 	if (!sub->related) {
 		/* Another sub has not been created so this must be first XFER press */
 		if (!sub->onhold) {
-- 
1.7.10