diff options
author | Russell Bryant <russell@russellbryant.com> | 2007-05-08 16:41:35 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2007-05-08 16:41:35 +0000 |
commit | 314c874d7df740181cb6e140b293948028760f81 (patch) | |
tree | d93cd3a4f30307efaec9d01dda56befb27eb2dd4 /channels/chan_sip.c | |
parent | 42a62a3c21ffe63404ef43bf39dfbe1fd103e45f (diff) |
I noted this on the dev list but got no response, so I just did it myself.
Lock the call features when being used in chan_sip.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 41234b8e2..60e6ee577 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -11653,14 +11653,17 @@ static void handle_request_info(struct sip_pvt *p, struct sip_request *req) pbx. */ /* first, get the feature string, if it exists */ - struct ast_call_feature *feat = ast_find_call_feature("automon"); + struct ast_call_feature *feat; int j; struct ast_frame f = { AST_FRAME_DTMF, }; - + + ast_rdlock_call_features(); + feat = ast_find_call_feature("automon"); if (!feat || ast_strlen_zero(feat->exten)) { ast_log(LOG_WARNING,"Recording requested, but no One Touch Monitor registered. (See features.conf)\n"); /* 403 means that we don't support this feature, so don't request it again */ transmit_response(p, "403 Forbidden", req); + ast_unlock_call_features(); return; } /* OEJ: Why is the DTMF code included in the record section? */ @@ -11671,6 +11674,7 @@ static void handle_request_info(struct sip_pvt *p, struct sip_request *req) if (sipdebug) ast_verbose("* DTMF-relay event received: %c\n", f.subclass); } + ast_unlock_call_features(); #ifdef DISABLED_CODE /* And feat isn't used here - Is this code tested at all??? We just send a reply ... |