summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2007-07-05 22:32:30 +0000
committerRussell Bryant <russell@russellbryant.com>2007-07-05 22:32:30 +0000
commitd339ac7156687458b8f687cc494f98bf67120937 (patch)
tree0eedd9a4f6eaa6cdb7b4924eaf1b8eaf95f0a3fe /channels
parentcc19ba80f5d01b7f1deb91da0423fc00e1ff2f9b (diff)
Merged revisions 73551 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r73551 | russell | 2007-07-05 17:31:31 -0500 (Thu, 05 Jul 2007) | 6 lines * 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: https://origsvn.digium.com/svn/asterisk/trunk@73552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_iax2.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 462a32f53..795c2f2a6 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -6624,23 +6624,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;