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/sip | |
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/sip')
-rw-r--r-- | channels/sip/dialplan_functions.c | 2 | ||||
-rw-r--r-- | channels/sip/include/dialog.h | 2 | ||||
-rw-r--r-- | channels/sip/include/sip.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/channels/sip/dialplan_functions.c b/channels/sip/dialplan_functions.c index c3e113a83..03441aa72 100644 --- a/channels/sip/dialplan_functions.c +++ b/channels/sip/dialplan_functions.c @@ -340,7 +340,7 @@ AST_TEST_DEFINE(test_sip_rtpqos_1) ast_rtp_engine_register2(&test_engine, NULL); /* Have to associate this with a SIP pvt and an ast_channel */ - if (!(p = sip_alloc(NULL, NULL, 0, SIP_NOTIFY, NULL, NULL))) { + if (!(p = sip_alloc(0, NULL, 0, SIP_NOTIFY, NULL, 0))) { res = AST_TEST_NOT_RUN; goto done; } diff --git a/channels/sip/include/dialog.h b/channels/sip/include/dialog.h index ea2fb457c..6b08109a1 100644 --- a/channels/sip/include/dialog.h +++ b/channels/sip/include/dialog.h @@ -35,7 +35,7 @@ struct sip_pvt *dialog_ref_debug(struct sip_pvt *p, const char *tag, char *file, struct sip_pvt *dialog_unref_debug(struct sip_pvt *p, const char *tag, char *file, int line, const char *func); struct sip_pvt *sip_alloc(ast_string_field callid, struct ast_sockaddr *sin, - int useglobal_nat, const int intended_method, struct sip_request *req, struct ast_callid *logger_callid); + int useglobal_nat, const int intended_method, struct sip_request *req, ast_callid logger_callid); void sip_scheddestroy_final(struct sip_pvt *p, int ms); void sip_scheddestroy(struct sip_pvt *p, int ms); int sip_cancel_destroy(struct sip_pvt *p); diff --git a/channels/sip/include/sip.h b/channels/sip/include/sip.h index 68c2ee860..ab682ebfa 100644 --- a/channels/sip/include/sip.h +++ b/channels/sip/include/sip.h @@ -991,7 +991,7 @@ struct sip_msg_hdr { struct sip_pvt { struct sip_pvt *next; /*!< Next dialog in chain */ enum invitestates invitestate; /*!< Track state of SIP_INVITEs */ - struct ast_callid *logger_callid; /*!< Identifier for call used in log messages */ + ast_callid logger_callid; /*!< Identifier for call used in log messages */ int method; /*!< SIP method that opened this dialog */ AST_DECLARE_STRING_FIELDS( AST_STRING_FIELD(callid); /*!< Global CallID */ |