[asterisk-commits] irroot: branch irroot/distrotech-customers-1.8 r329668 - /team/irroot/distrot...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 27 07:21:13 CDT 2011


Author: irroot
Date: Wed Jul 27 07:21:09 2011
New Revision: 329668

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=329668
Log:
Work arround orphaned channels

Modified:
    team/irroot/distrotech-customers-1.8/main/features.c

Modified: team/irroot/distrotech-customers-1.8/main/features.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-1.8/main/features.c?view=diff&rev=329668&r1=329667&r2=329668
==============================================================================
--- team/irroot/distrotech-customers-1.8/main/features.c (original)
+++ team/irroot/distrotech-customers-1.8/main/features.c Wed Jul 27 07:21:09 2011
@@ -5863,7 +5863,19 @@
 	res = 0;
 
 pickup_failed:
+	ast_autoservice_start(target);
+
 	ast_channel_lock(target);
+	while (target && !ast_test_flag(target, AST_FLAG_ZOMBIE) && 
+	       !ast_check_hangup(target) && !ast_bridged_channel(target)) {
+		ast_channel_unlock(target);
+		usleep(1000);
+		ast_channel_lock(target);
+	}
+	ast_channel_unlock(target);
+	ast_autoservice_stop(target);
+	ast_channel_lock(target);
+
 	if (!ast_channel_datastore_remove(target, ds_pickup)) {
 		ast_datastore_free(ds_pickup);
 	}




More information about the asterisk-commits mailing list