summaryrefslogtreecommitdiff
path: root/channels/chan_iax2.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2007-08-02 17:09:42 +0000
committerRussell Bryant <russell@russellbryant.com>2007-08-02 17:09:42 +0000
commit12ed8e8d07aa2f662bb2faf405e8291f2223ebf7 (patch)
tree107c301d9a2998107cad2864ceda3a787254a6e4 /channels/chan_iax2.c
parent171791dd8b660c8bead4ba41f49cd6589b4d44bf (diff)
Fix an issue that Simon pointed out to me on IRC. There were cases in the
trunk version of find_idle_thread() where the old full frame processing information was not cleared out. This would have caused full frames to get deferred for processing by threads that weren't actually processing frames for that call. Nice catch!! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77941 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_iax2.c')
-rw-r--r--channels/chan_iax2.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index a93ccb69d..e4be160ba 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -1014,8 +1014,10 @@ static struct iax2_thread *find_idle_thread(void)
AST_LIST_UNLOCK(&idle_list);
/* If we popped a thread off the idle list, just return it */
- if (thread)
+ if (thread) {
+ memset(&thread->ffinfo, 0, sizeof(thread->ffinfo));
return thread;
+ }
/* Pop the head of the dynamic list off */
AST_LIST_LOCK(&dynamic_list);
@@ -1023,8 +1025,10 @@ static struct iax2_thread *find_idle_thread(void)
AST_LIST_UNLOCK(&dynamic_list);
/* If we popped a thread off the dynamic list, just return it */
- if (thread)
+ if (thread) {
+ memset(&thread->ffinfo, 0, sizeof(thread->ffinfo));
return thread;
+ }
/* If we can't create a new dynamic thread for any reason, return no thread at all */
if (iaxdynamicthreadcount >= iaxmaxthreadcount || !(thread = ast_calloc(1, sizeof(*thread))))