[asterisk-commits] mvanbaak: trunk r233059 - /trunk/channels/chan_skinny.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Dec 4 10:19:02 CST 2009


Author: mvanbaak
Date: Fri Dec  4 10:18:57 2009
New Revision: 233059

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=233059
Log:
Only assign line and device in handle_transfer_button when we have a subchannel.

(closes issue #16040)
Reported by: ebroad

Modified:
    trunk/channels/chan_skinny.c

Modified: trunk/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=233059&r1=233058&r2=233059
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Fri Dec  4 10:18:57 2009
@@ -4544,8 +4544,8 @@
 
 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;
@@ -4554,6 +4554,10 @@
 		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) {




More information about the asterisk-commits mailing list