diff options
author | Corey Farrell <git@cfware.com> | 2015-03-13 01:12:35 +0000 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2015-03-13 01:12:35 +0000 |
commit | c08fd275bf8c45dc09084f104521cbff04eab25b (patch) | |
tree | 09cc14b9a9190254980ec88b981d6f561ec8a9b5 /main/pbx.c | |
parent | 38ee441ea7debef3ebf6b162fc290b121fa3588d (diff) |
Logger: Convert 'struct ast_callid' to unsigned int.
Switch logger callid's from AO2 objects to simple integers.
This helps in two ways. Copying integers is faster than
referencing AO2 objects, so this will result in a small
reduction in logger overhead. This also erases the possibility
of an infinate loop caused by an invalid callid in
threadstorage.
ASTERISK-24833 #comment Committed callid conversion to trunk.
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4466/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432834 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/pbx.c')
-rw-r--r-- | main/pbx.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/main/pbx.c b/main/pbx.c index 08a1e5fa1..498acf79b 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -6318,7 +6318,7 @@ static enum ast_pbx_result __ast_pbx_run(struct ast_channel *c, int autoloopflag; int error = 0; /* set an error conditions */ struct ast_pbx *pbx; - struct ast_callid *callid; + ast_callid callid; /* A little initial setup here */ if (ast_channel_pbx(c)) { @@ -6346,10 +6346,7 @@ static enum ast_pbx_result __ast_pbx_run(struct ast_channel *c, } } ast_callid_threadassoc_add(callid); - callid = ast_callid_unref(callid); - } else { - /* Nothing to do here, The thread is already bound to a callid. Let's just get rid of the reference. */ - ast_callid_unref(callid); + callid = 0; } ast_channel_pbx_set(c, pbx); |