summaryrefslogtreecommitdiff
path: root/main/format_cache.c
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 /main/format_cache.c
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 'main/format_cache.c')
-rw-r--r--main/format_cache.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/main/format_cache.c b/main/format_cache.c
index 3e729769c..def795c9d 100644
--- a/main/format_cache.c
+++ b/main/format_cache.c
@@ -457,22 +457,14 @@ int ast_format_cache_set(struct ast_format *format)
return 0;
}
-struct ast_format *__ast_format_cache_get(const char *name)
+struct ast_format *__ast_format_cache_get(const char *name,
+ const char *tag, const char *file, int line, const char *func)
{
if (ast_strlen_zero(name)) {
return NULL;
}
- return ao2_find(formats, name, OBJ_SEARCH_KEY);
-}
-
-struct ast_format *__ast_format_cache_get_debug(const char *name, const char *tag, const char *file, int line, const char *func)
-{
- if (ast_strlen_zero(name)) {
- return NULL;
- }
-
- return __ao2_find_debug(formats, name, OBJ_SEARCH_KEY, S_OR(tag, "ast_format_cache_get"), file, line, func);
+ return __ao2_find(formats, name, OBJ_SEARCH_KEY, tag, file, line, func);
}
struct ast_format *ast_format_cache_get_slin_by_rate(unsigned int rate)