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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@418996 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Corey Farrell
2014-07-18 19:53:31 +00:00
parent 6da297cfc3
commit f4d21fb97e
4 changed files with 8 additions and 8 deletions

View File

@@ -55,7 +55,7 @@ struct stasis_message_type *stasis_message_type_create(const char *name,
{
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 @@ struct stasis_message *stasis_message_create_full(struct stasis_message_type *ty
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_json *stasis_message_to_json(
struct ast_event *stasis_message_to_event(struct stasis_message *msg)
{
return INVOKE_VIRTUAL(to_event, msg);
}
}