mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 18:58:22 +00:00
core: Don't create snapshots with locks.
Snapshots are immutable and are never changed. Allocating them with a lock is wasteful. Review: https://reviewboard.asterisk.org/r/4469/ ........ Merged revisions 432742 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432743 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -232,7 +232,8 @@ struct ast_bridge_snapshot *ast_bridge_snapshot_create(struct ast_bridge *bridge
|
||||
RAII_VAR(struct ast_bridge_snapshot *, snapshot, NULL, ao2_cleanup);
|
||||
struct ast_bridge_channel *bridge_channel;
|
||||
|
||||
snapshot = ao2_alloc(sizeof(*snapshot), bridge_snapshot_dtor);
|
||||
snapshot = ao2_alloc_options(sizeof(*snapshot), bridge_snapshot_dtor,
|
||||
AO2_ALLOC_OPT_LOCK_NOLOCK);
|
||||
if (!snapshot || ast_string_field_init(snapshot, 128)) {
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user