mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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:
@@ -78,7 +78,7 @@ static int as_chan_list_state;
|
||||
|
||||
static void *autoservice_run(void *ign)
|
||||
{
|
||||
struct ast_callid *callid = NULL;
|
||||
ast_callid callid = 0;
|
||||
struct ast_frame hangup_frame = {
|
||||
.frametype = AST_FRAME_CONTROL,
|
||||
.subclass.integer = AST_CONTROL_HANGUP,
|
||||
@@ -132,9 +132,6 @@ static void *autoservice_run(void *ign)
|
||||
|
||||
callid = ast_channel_callid(chan);
|
||||
ast_callid_threadassoc_change(callid);
|
||||
if (callid) {
|
||||
callid = ast_callid_unref(callid);
|
||||
}
|
||||
|
||||
f = ast_read(chan);
|
||||
|
||||
@@ -184,7 +181,7 @@ static void *autoservice_run(void *ign)
|
||||
* If we did, we'd need to ast_frfree(f) if (f). */
|
||||
}
|
||||
|
||||
ast_callid_threadassoc_change(NULL);
|
||||
ast_callid_threadassoc_change(0);
|
||||
asthread = AST_PTHREADT_NULL;
|
||||
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user