[asterisk-commits] coreyfarrell: trunk r418997 - in /trunk: ./ main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jul 18 14:55:27 CDT 2014
Author: coreyfarrell
Date: Fri Jul 18 14:55:24 2014
New Revision: 418997
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=418997
Log:
stasis: use ao2_t_alloc for certain object allocators
Add tags to stasis objects using the name. This makes it
easier to track the source of certain stasis ref leaks.
Review: https://reviewboard.asterisk.org/r/3821/
........
Merged revisions 418996 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/main/stasis.c
trunk/main/stasis_cache_pattern.c
trunk/main/stasis_message.c
trunk/main/stasis_message_router.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.
Modified: trunk/main/stasis.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/stasis.c?view=diff&rev=418997&r1=418996&r2=418997
==============================================================================
--- trunk/main/stasis.c (original)
+++ trunk/main/stasis.c Fri Jul 18 14:55:24 2014
@@ -204,7 +204,7 @@
struct stasis_topic *topic;
int res = 0;
- topic = ao2_alloc(sizeof(*topic), topic_dtor);
+ topic = ao2_t_alloc(sizeof(*topic), topic_dtor, name);
if (!topic) {
return NULL;
}
@@ -311,7 +311,7 @@
}
/* The ao2 lock is used for join_cond. */
- sub = ao2_alloc(sizeof(*sub), subscription_dtor);
+ sub = ao2_t_alloc(sizeof(*sub), subscription_dtor, topic->name);
if (!sub) {
return NULL;
}
Modified: trunk/main/stasis_cache_pattern.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/stasis_cache_pattern.c?view=diff&rev=418997&r1=418996&r2=418997
==============================================================================
--- trunk/main/stasis_cache_pattern.c (original)
+++ trunk/main/stasis_cache_pattern.c Fri Jul 18 14:55:24 2014
@@ -70,7 +70,7 @@
RAII_VAR(char *, cached_name, NULL, ast_free);
RAII_VAR(struct stasis_cp_all *, all, NULL, ao2_cleanup);
- all = ao2_alloc(sizeof(*all), all_dtor);
+ all = ao2_t_alloc(sizeof(*all), all_dtor, name);
if (!all) {
return NULL;
}
@@ -138,7 +138,7 @@
{
RAII_VAR(struct stasis_cp_single *, one, NULL, ao2_cleanup);
- one = ao2_alloc(sizeof(*one), one_dtor);
+ one = ao2_t_alloc(sizeof(*one), one_dtor, name);
if (!one) {
return NULL;
}
Modified: trunk/main/stasis_message.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/stasis_message.c?view=diff&rev=418997&r1=418996&r2=418997
==============================================================================
--- trunk/main/stasis_message.c (original)
+++ trunk/main/stasis_message.c Fri Jul 18 14:55:24 2014
@@ -55,7 +55,7 @@
{
struct stasis_message_type *type;
- type = ao2_alloc(sizeof(*type), message_type_dtor);
+ type = ao2_t_alloc(sizeof(*type), message_type_dtor, name);
if (!type) {
return NULL;
}
@@ -108,7 +108,7 @@
return NULL;
}
- message = ao2_alloc(sizeof(*message), stasis_message_dtor);
+ message = ao2_t_alloc(sizeof(*message), stasis_message_dtor, type->name);
if (message == NULL) {
return NULL;
}
@@ -191,4 +191,4 @@
struct ast_event *stasis_message_to_event(struct stasis_message *msg)
{
return INVOKE_VIRTUAL(to_event, msg);
-}
+}
Modified: trunk/main/stasis_message_router.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/stasis_message_router.c?view=diff&rev=418997&r1=418996&r2=418997
==============================================================================
--- trunk/main/stasis_message_router.c (original)
+++ trunk/main/stasis_message_router.c Fri Jul 18 14:55:24 2014
@@ -212,7 +212,7 @@
int res;
RAII_VAR(struct stasis_message_router *, router, NULL, ao2_cleanup);
- router = ao2_alloc(sizeof(*router), router_dtor);
+ router = ao2_t_alloc(sizeof(*router), router_dtor, topic->name);
if (!router) {
return NULL;
}
More information about the asterisk-commits
mailing list