summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2015-04-17 03:16:59 -0400
committerCorey Farrell <git@cfware.com>2015-04-27 18:37:26 -0400
commit5c1d07baf083fd791c8f717209551d9227413ef7 (patch)
tree7eff8c651efb82e89fd7918038102b84fe888ced /channels
parentd7f4788341f08f386341416aa3944c7f9bc0dc1b (diff)
Astobj2: Allow reference debugging to be enabled/disabled by config.
* The REF_DEBUG compiler flag no longer has any effect on code that uses Astobj2. It is used to determine if reference debugging is enabled by default. Reference debugging can be enabled or disabled in asterisk.conf. * Caller information is provided in logger errors for ao2 bad magic numbers. * Optimizes AO2 by merging internal functions with the public counterpart. This was possible now that we no longer require a dual ABI. ASTERISK-24974 #close Reported by: Corey Farrell Change-Id: Icf3552721fe999365ba8a8cf00a965aa6b897cc1
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 3ee92da5e..aa616cde1 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -8599,9 +8599,9 @@ struct sip_pvt *__sip_alloc(ast_string_field callid, struct ast_sockaddr *addr,
{
struct sip_pvt *p;
- p = __ao2_alloc_debug(sizeof(*p), sip_destroy_fn,
+ p = __ao2_alloc(sizeof(*p), sip_destroy_fn,
AO2_ALLOC_OPT_LOCK_MUTEX, "allocate a dialog(pvt) struct",
- file, line, func, 1);
+ file, line, func);
if (!p) {
return NULL;
}
@@ -9178,7 +9178,7 @@ static struct sip_pvt *__find_call(struct sip_request *req, struct ast_sockaddr
struct sip_pvt tmp_dialog = {
.callid = callid,
};
- sip_pvt_ptr = __ao2_find_debug(dialogs, &tmp_dialog, OBJ_POINTER,
+ sip_pvt_ptr = __ao2_find(dialogs, &tmp_dialog, OBJ_POINTER,
"find_call in dialogs", file, line, func);
if (sip_pvt_ptr) { /* well, if we don't find it-- what IS in there? */
/* Found the call */
@@ -9193,7 +9193,7 @@ static struct sip_pvt *__find_call(struct sip_request *req, struct ast_sockaddr
struct sip_pvt *fork_pvt = NULL;
struct match_req_args args = { 0, };
int found;
- struct ao2_iterator *iterator = __ao2_callback_debug(dialogs,
+ struct ao2_iterator *iterator = __ao2_callback(dialogs,
OBJ_POINTER | OBJ_MULTIPLE,
dialog_find_multiple,
&tmp_dialog,
@@ -9243,7 +9243,7 @@ static struct sip_pvt *__find_call(struct sip_request *req, struct ast_sockaddr
/* This is likely a forked Request that somehow resulted in us receiving multiple parts of the fork.
* RFC 3261 section 8.2.2.2, Indicate that we want to merge requests by sending a 482 response. */
transmit_response_using_temp(callid, addr, 1, intended_method, req, "482 (Loop Detected)");
- __ao2_ref_debug(sip_pvt_ptr, -1, "pvt did not match incoming SIP msg, unref from search.",
+ __ao2_ref(sip_pvt_ptr, -1, "pvt did not match incoming SIP msg, unref from search.",
file, line, func);
ao2_iterator_destroy(iterator);
dialog_unref(fork_pvt, "unref fork_pvt");
@@ -9255,7 +9255,7 @@ static struct sip_pvt *__find_call(struct sip_request *req, struct ast_sockaddr
/* fall through */
case SIP_REQ_NOT_MATCH:
default:
- __ao2_ref_debug(sip_pvt_ptr, -1, "pvt did not match incoming SIP msg, unref from search",
+ __ao2_ref(sip_pvt_ptr, -1, "pvt did not match incoming SIP msg, unref from search",
file, line, func);
break;
}