diff options
author | Richard Mudgett <rmudgett@digium.com> | 2013-09-06 20:21:21 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2013-09-06 20:21:21 +0000 |
commit | a4c18f4e10b00714d5a25370d50a6699e59a0662 (patch) | |
tree | 8f92800771586a35f26285aec175ecda0dab595d | |
parent | 51bd4fe8fec4d2b026148ba46d879eb9b9ff7fea (diff) |
core_local: Fix LocalOptimizationBegin AMI event missing Source channel snapshot.
* Fix the LocalOptimizationBegin AMI event by eliminating an artificial
buffer size limitation that is too small anyway.
........
Merged revisions 398572 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | main/core_local.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/main/core_local.c b/main/core_local.c index 8825739a6..88bf3ae4c 100644 --- a/main/core_local.c +++ b/main/core_local.c @@ -422,7 +422,7 @@ static struct ast_manager_event_blob *local_message_to_ami(struct stasis_message struct ast_channel_snapshot *local_snapshot_two; RAII_VAR(struct ast_str *, local_channel_one, NULL, ast_free); RAII_VAR(struct ast_str *, local_channel_two, NULL, ast_free); - struct ast_str *event_buffer = ast_str_alloca(128); + RAII_VAR(struct ast_str *, event_buffer, NULL, ast_free); const char *event; local_snapshot_one = ast_multi_channel_blob_get_channel(obj, "1"); @@ -431,9 +431,10 @@ static struct ast_manager_event_blob *local_message_to_ami(struct stasis_message return NULL; } + event_buffer = ast_str_create(1024); local_channel_one = ast_manager_build_channel_state_string_prefix(local_snapshot_one, "LocalOne"); local_channel_two = ast_manager_build_channel_state_string_prefix(local_snapshot_two, "LocalTwo"); - if (!local_channel_one || !local_channel_two) { + if (!event_buffer || !local_channel_one || !local_channel_two) { return NULL; } |