diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-05 22:31:31 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-05 22:31:31 +0000 |
commit | 648d328798ec05d6c17df071cdd92148c46b8c34 (patch) | |
tree | 30d0403cef46ac9e2209d091792ffd673c952a10 | |
parent | a5dab616ab75f1e95befb50250d24c067d757bd3 (diff) |
* Store the call number that a thread is processing without the full frame bit
set to ease debugging
* When deferring a full frame for processing, stick it into the queue for the
thread that is processing frames for that call, not the one that read the
current frame and is about to go back into the idle list
(related to issue #9937)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@73551 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_iax2.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index dd6749c8e..79c121b6b 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -6387,23 +6387,24 @@ static int socket_read(int *id, int fd, short events, void *cbdata) fh = (struct ast_iax2_full_hdr *) thread->buf; if (ntohs(fh->scallno) & IAX_FLAG_FULL) { struct iax2_thread *cur = NULL; + uint16_t callno = ntohs(fh->scallno) & ~IAX_FLAG_FULL; AST_LIST_LOCK(&active_list); AST_LIST_TRAVERSE(&active_list, cur, list) { - if ((cur->ffinfo.callno == ntohs(fh->scallno)) && + if ((cur->ffinfo.callno == callno) && !inaddrcmp(&cur->ffinfo.sin, &thread->iosin)) break; } if (cur) { /* we found another thread processing a full frame for this call, so queue it up for processing later. */ - defer_full_frame(thread); + defer_full_frame(cur); AST_LIST_UNLOCK(&active_list); insert_idle_thread(thread); return 1; } else { /* this thread is going to process this frame, so mark it */ - thread->ffinfo.callno = ntohs(fh->scallno); + thread->ffinfo.callno = callno; memcpy(&thread->ffinfo.sin, &thread->iosin, sizeof(thread->ffinfo.sin)); thread->ffinfo.type = fh->type; thread->ffinfo.csub = fh->csub; |