summaryrefslogtreecommitdiff
path: root/main/channel.c
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2015-03-13 01:12:35 +0000
committerCorey Farrell <git@cfware.com>2015-03-13 01:12:35 +0000
commitc08fd275bf8c45dc09084f104521cbff04eab25b (patch)
tree09cc14b9a9190254980ec88b981d6f561ec8a9b5 /main/channel.c
parent38ee441ea7debef3ebf6b162fc290b121fa3588d (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/channel.c')
-rw-r--r--main/channel.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/main/channel.c b/main/channel.c
index 76b6d524a..58daf5732 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -2174,7 +2174,7 @@ static void ast_channel_destructor(void *obj)
struct varshead *headp;
struct ast_datastore *datastore;
char device_name[AST_CHANNEL_NAME];
- struct ast_callid *callid;
+ ast_callid callid;
/* Stop monitoring */
if (ast_channel_monitor(chan)) {
@@ -2311,9 +2311,6 @@ static void ast_channel_destructor(void *obj)
}
ast_channel_nativeformats_set(chan, NULL);
- if (callid) {
- ast_callid_unref(callid);
- }
ast_channel_named_callgroups_set(chan, NULL);
ast_channel_named_pickupgroups_set(chan, NULL);
@@ -5904,7 +5901,7 @@ struct ast_channel *ast_request(const char *type, struct ast_format_cap *request
}
if (requestor) {
- struct ast_callid *callid;
+ ast_callid callid;
ast_channel_lock_both(c, (struct ast_channel *) requestor);
@@ -5912,7 +5909,6 @@ struct ast_channel *ast_request(const char *type, struct ast_format_cap *request
callid = ast_channel_callid(requestor);
if (callid) {
ast_channel_callid_set(c, callid);
- callid = ast_callid_unref(callid);
}
ast_channel_unlock(c);