summaryrefslogtreecommitdiff
path: root/main/channel_internal_api.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2017-01-31 16:32:18 -0600
committerRichard Mudgett <rmudgett@digium.com>2017-02-02 13:02:03 -0600
commit72e3fc58455e08307a06e57099c8362879688ea0 (patch)
tree5317a774bdc20a7d305b43e5abe00274afc0530b /main/channel_internal_api.c
parent3c558b4b4a0b4b8943a5d0231ffab6d6b6d9878f (diff)
Frame deferral: Revert API refactoring.
There are several issues with deferring frames that are caused by the refactoring. 1) The code deferring frames mishandles adding a deferred frame to the deferred queue. As a result the deferred queue can only be one frame long. 2) Deferrable frames can come directly from the channel driver as well as the read queue. These frames need to be added to the deferred queue. 3) Whoever is deferring frames is really only doing the __ast_read() to collect deferred frames and doesn't care about the returned frames except to detect a hangup event. When frame deferral is completed we must make the normal frame processing see the hangup as a frame anyway. As such, there is no need to have varying hangup frame deferral methods. We also need to be aware of the AST_SOFTHANGUP_ASYNCGOTO hangup that isn't real. That fake hangup is to cause the PBX thread to break out of loops to go execute a new dialplan location. 4) To properly deal with deferrable frames from the channel driver as pointed out by (2) above, means that it is possible to process a dialplan interception routine while frames are deferred because of the AST_CONTROL_READ_ACTION control frame. Deferring frames is not implemented as a re-entrant operation so you could have the unsupported case of two sections of code thinking they have control of the media stream. A worse problem is because of the bad implementation of the AMI PlayDTMF action. It can cause two threads to be deferring frames on the same channel at the same time. (ASTERISK_25940) * Rather than fix all these problems simply revert the API refactoring as there is going to be only autoservice and safe_sleep deferring frames anyway. ASTERISK-26343 ASTERISK-26716 #close Change-Id: I45069c779aa3a35b6c863f65245a6df2c7865496
Diffstat (limited to 'main/channel_internal_api.c')
-rw-r--r--main/channel_internal_api.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/main/channel_internal_api.c b/main/channel_internal_api.c
index 691dec0a1..a0cbe8643 100644
--- a/main/channel_internal_api.c
+++ b/main/channel_internal_api.c
@@ -221,7 +221,6 @@ struct ast_channel {
struct stasis_cp_single *topics; /*!< Topic for all channel's events */
struct stasis_forward *endpoint_forward; /*!< Subscription for event forwarding to endpoint's topic */
struct stasis_forward *endpoint_cache_forward; /*!< Subscription for cache updates to endpoint's topic */
- struct ast_readq_list deferred_readq;
};
/*! \brief The monotonically increasing integer counter for channel uniqueids */
@@ -1730,8 +1729,3 @@ enum ast_channel_error ast_channel_internal_errno(void)
return *error_code;
}
-
-struct ast_readq_list *ast_channel_deferred_readq(struct ast_channel *chan)
-{
- return &chan->deferred_readq;
-}