[asterisk-commits] mmichelson: branch 1.4 r189277 - /branches/1.4/main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 20 09:04:50 CDT 2009


Author: mmichelson
Date: Mon Apr 20 09:04:41 2009
New Revision: 189277

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=189277
Log:
Move the check for chan->fdno == -1 to after the zombie/hangup check.

Many users were finding that their hung up channels were staying up and
causing 100% CPU usage.

(issue #14723)
Reported by: seadweller
Patches:
      14723_1-4-tip.patch uploaded by mmichelson (license 60)
Tested by: falves11, bamby


Modified:
    branches/1.4/main/channel.c

Modified: branches/1.4/main/channel.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.4/main/channel.c?view=diff&rev=189277&r1=189276&r2=189277
==============================================================================
--- branches/1.4/main/channel.c (original)
+++ branches/1.4/main/channel.c Mon Apr 20 09:04:41 2009
@@ -2047,6 +2047,13 @@
 		goto done;
 	}
 
+	/* Stop if we're a zombie or need a soft hangup */
+	if (ast_test_flag(chan, AST_FLAG_ZOMBIE) || ast_check_hangup(chan)) {
+		if (chan->generator)
+			ast_deactivate_generator(chan);
+		goto done;
+	}
+
 	if (chan->fdno == -1) {
 #ifdef AST_DEVMODE
 		ast_log(LOG_ERROR, "ast_read() called with no recorded file descriptor.\n");
@@ -2056,13 +2063,6 @@
 		}
 #endif
 		f = &ast_null_frame;
-		goto done;
-	}
-
-	/* Stop if we're a zombie or need a soft hangup */
-	if (ast_test_flag(chan, AST_FLAG_ZOMBIE) || ast_check_hangup(chan)) {
-		if (chan->generator)
-			ast_deactivate_generator(chan);
 		goto done;
 	}
 	prestate = chan->_state;




More information about the asterisk-commits mailing list