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
This commit is contained in:
Corey Farrell
2015-03-13 01:12:35 +00:00
parent 38ee441ea7
commit c08fd275bf
33 changed files with 182 additions and 373 deletions

View File

@@ -2367,12 +2367,11 @@ static void recall_callback(struct ast_dial *dial)
*/
static void common_recall_channel_setup(struct ast_channel *recall, struct ast_channel *transferer)
{
struct ast_callid *callid;
ast_callid callid;
callid = ast_read_threadstorage_callid();
if (callid) {
ast_channel_callid_set(recall, callid);
ast_callid_unref(callid);
}
ast_channel_inherit_variables(transferer, recall);
@@ -2973,7 +2972,7 @@ static enum attended_transfer_stimulus wait_for_stimulus(struct attended_transfe
static void *attended_transfer_monitor_thread(void *data)
{
struct attended_transfer_properties *props = data;
struct ast_callid *callid;
ast_callid callid;
/*
* Set thread callid to the transferer's callid because we
@@ -3018,7 +3017,6 @@ static void *attended_transfer_monitor_thread(void *data)
attended_transfer_properties_shutdown(props);
if (callid) {
ast_callid_unref(callid);
ast_callid_threadassoc_remove();
}