summaryrefslogtreecommitdiff
path: root/main/autoservice.c
diff options
context:
space:
mode:
authorJonathan Rose <jrose@digium.com>2012-06-26 21:45:22 +0000
committerJonathan Rose <jrose@digium.com>2012-06-26 21:45:22 +0000
commit5eb94d7ebbc2c29d4de8201103bcb62ae8afcd31 (patch)
tree454a727e077efa3f74ea80469d0f863066f59c13 /main/autoservice.c
parentee1111869585af74ea79a0bf45edcee49c00508b (diff)
Unique Call ID logging Phases III and IV
Adds call ID logging changes to specific channel drivers that weren't handled handled in phase II of Call ID Logging. Also covers logging for threads for threads created by systems that may be involved with many different calls. Extra special thanks to Richard for rigorous review of chan_dahdi and its various signalling modules. review: https://reviewboard.asterisk.org/r/1927/ review: https://reviewboard.asterisk.org/r/1950/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/autoservice.c')
-rw-r--r--main/autoservice.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/main/autoservice.c b/main/autoservice.c
index 4d53f15e5..37bbee682 100644
--- a/main/autoservice.c
+++ b/main/autoservice.c
@@ -90,6 +90,7 @@ static void *autoservice_run(void *ign)
int i, x = 0, ms = 50;
struct ast_frame *f = NULL;
struct ast_frame *defer_frame = NULL;
+ struct ast_callid *callid = NULL;
AST_LIST_LOCK(&aslist);
@@ -128,6 +129,10 @@ static void *autoservice_run(void *ign)
continue;
}
+ if ((callid = ast_channel_callid(chan))) {
+ ast_callid_threadassoc_add(callid);
+ }
+
f = ast_read(chan);
if (!f) {
@@ -168,6 +173,11 @@ static void *autoservice_run(void *ign)
} else if (f) {
ast_frfree(f);
}
+
+ if (callid) {
+ ast_callid_threadassoc_remove();
+ callid = ast_callid_unref(callid);
+ }
}
asthread = AST_PTHREADT_NULL;