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 /channels/sig_analog.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 'channels/sig_analog.c')
-rw-r--r-- | channels/sig_analog.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/channels/sig_analog.c b/channels/sig_analog.c index 1d44a29b9..0608c3429 100644 --- a/channels/sig_analog.c +++ b/channels/sig_analog.c @@ -1715,7 +1715,7 @@ static void *__analog_ss_thread(void *data) int len = 0; int res; int idx; - struct ast_callid *callid; + ast_callid callid; RAII_VAR(struct ast_features_pickup_config *, pickup_cfg, NULL, ao2_cleanup); const char *pickupexten; @@ -1730,7 +1730,6 @@ static void *__analog_ss_thread(void *data) if ((callid = ast_channel_callid(chan))) { ast_callid_threadassoc_add(callid); - ast_callid_unref(callid); } /* in the bizarre case where the channel has become a zombie before we @@ -3194,7 +3193,7 @@ static struct ast_frame *__analog_handle_event(struct analog_pvt *p, struct ast_ ast_queue_control(p->subs[ANALOG_SUB_REAL].owner, AST_CONTROL_FLASH); goto winkflashdone; } else if (!analog_check_for_conference(p)) { - struct ast_callid *callid = NULL; + ast_callid callid = 0; int callid_created; char cid_num[256]; char cid_name[256]; @@ -3657,7 +3656,7 @@ void *analog_handle_init_event(struct analog_pvt *i, int event) int res; pthread_t threadid; struct ast_channel *chan; - struct ast_callid *callid = NULL; + ast_callid callid = 0; int callid_created; ast_debug(1, "channel (%d) - signaling (%d) - event (%s)\n", |