[asterisk-commits] irroot: branch irroot/distrotech-customers-trunk r333629 - in /team/irroot/di...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 29 12:08:05 CDT 2011


Author: irroot
Date: Mon Aug 29 12:08:00 2011
New Revision: 333629

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=333629
Log:
Pickup problems with channels with no pvt_tech orphaned channels part 2 RB1397

Modified:
    team/irroot/distrotech-customers-trunk/channels/chan_sip.c
    team/irroot/distrotech-customers-trunk/main/channel.c
    team/irroot/distrotech-customers-trunk/main/features.c

Modified: team/irroot/distrotech-customers-trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/channels/chan_sip.c?view=diff&rev=333629&r1=333628&r2=333629
==============================================================================
--- team/irroot/distrotech-customers-trunk/channels/chan_sip.c (original)
+++ team/irroot/distrotech-customers-trunk/channels/chan_sip.c Mon Aug 29 12:08:00 2011
@@ -6135,7 +6135,7 @@
 
 	if (!p) {
 		ast_debug(1, "Asked to hangup channel that was not connected\n");
-		return 0;
+		return -1;
 	}
 	if (ast_test_flag(ast, AST_FLAG_ANSWERED_ELSEWHERE) || ast->hangupcause == AST_CAUSE_ANSWERED_ELSEWHERE) {
 		ast_debug(1, "This call was answered elsewhere");

Modified: team/irroot/distrotech-customers-trunk/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/main/channel.c?view=diff&rev=333629&r1=333628&r2=333629
==============================================================================
--- team/irroot/distrotech-customers-trunk/main/channel.c (original)
+++ team/irroot/distrotech-customers-trunk/main/channel.c Mon Aug 29 12:08:00 2011
@@ -6680,6 +6680,9 @@
 	/* Start by disconnecting the original's physical side */
 	if (clonechan->tech->hangup && clonechan->tech->hangup(clonechan)) {
 		ast_log(LOG_WARNING, "Hangup failed!  Strange things may happen!\n");
+		ast_channel_unlock(clonechan);
+		ast_hangup(clonechan);
+		clonechan = NULL;
 		res = -1;
 		goto done;
 	}

Modified: team/irroot/distrotech-customers-trunk/main/features.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/main/features.c?view=diff&rev=333629&r1=333628&r2=333629
==============================================================================
--- team/irroot/distrotech-customers-trunk/main/features.c (original)
+++ team/irroot/distrotech-customers-trunk/main/features.c Mon Aug 29 12:08:00 2011
@@ -6940,7 +6940,7 @@
 
 int ast_can_pickup(struct ast_channel *chan)
 {
-	if (!chan->pbx && !chan->masq && !ast_test_flag(chan, AST_FLAG_ZOMBIE)
+	if (chan->tech_pvt && !chan->pbx && !chan->masq && !ast_test_flag(chan, AST_FLAG_ZOMBIE)
 		&& (chan->_state == AST_STATE_RINGING
 			|| chan->_state == AST_STATE_RING
 			/*




More information about the asterisk-commits mailing list