#! /bin/sh /usr/share/dpatch/dpatch-run ## tune_ast_softhangup_nolock.dpatch by Philipp Berndt ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Improve timing behaviour by touching flags before waiting for log-lock @DPATCH@ diff -urNad asterisk-1.2.13~dfsg~/channel.c asterisk-1.2.13~dfsg/channel.c --- asterisk-1.2.13~dfsg~/channel.c 2008-02-11 13:39:19.000000000 +0100 +++ asterisk-1.2.13~dfsg/channel.c 2008-02-11 13:40:10.000000000 +0100 @@ -1163,10 +1163,10 @@ { int res = 0; struct ast_frame f = { AST_FRAME_NULL }; - if (option_debug) - ast_log(LOG_DEBUG, "Soft-Hanging up channel '%s'\n", chan->name); /* Inform channel driver that we need to be hung up, if it cares */ chan->_softhangup |= cause; + if (option_debug) + ast_log(LOG_DEBUG, "Soft-Hanging up channel '%s'\n", chan->name); ast_queue_frame(chan, &f); /* Interrupt any poll call or such */ if (ast_test_flag(chan, AST_FLAG_BLOCKING))