diff options
author | Alexander Traud <pabstraud@compuserve.com> | 2015-11-09 10:01:41 +0100 |
---|---|---|
committer | Alexander Traud <pabstraud@compuserve.com> | 2015-11-09 16:58:52 +0100 |
commit | cf79b627789e2c6434419b71508a296c9ee90539 (patch) | |
tree | de7a9f429d1a77bec41957e661d17bd96d8ac06f /main | |
parent | f12ebe35848c2ce82e53b332742e83b2b5875502 (diff) |
ast_format_cap_get_names: To display all formats, the buffer was increased.
ASTERISK-25533 #close
Change-Id: Ie1a9d1a6511b3f1a56b93d04475fbf8a4e40010a
Diffstat (limited to 'main')
-rw-r--r-- | main/channel.c | 12 | ||||
-rw-r--r-- | main/cli.c | 2 | ||||
-rw-r--r-- | main/file.c | 2 | ||||
-rw-r--r-- | main/manager.c | 2 | ||||
-rw-r--r-- | main/sorcery.c | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/main/channel.c b/main/channel.c index 3e2636f5a..013d2e281 100644 --- a/main/channel.c +++ b/main/channel.c @@ -340,7 +340,7 @@ static char *complete_channeltypes(struct ast_cli_args *a) static char *handle_cli_core_show_channeltype(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { struct chanlist *cl = NULL; - struct ast_str *codec_buf = ast_str_alloca(256); + struct ast_str *codec_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN); switch (cmd) { case CLI_INIT: @@ -5094,7 +5094,7 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr) f = fr; } else { if (ast_format_cmp(ast_channel_writeformat(chan), fr->subclass.format) != AST_FORMAT_CMP_EQUAL) { - struct ast_str *codec_buf = ast_str_alloca(256); + struct ast_str *codec_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN); /* * We are not setup to write this frame. Things may have changed @@ -5435,8 +5435,8 @@ static int set_format(struct ast_channel *chan, struct ast_format_cap *cap_set, res = ast_translator_best_choice(cap_native, cap_set, &best_native_fmt, &best_set_fmt); } if (res < 0) { - struct ast_str *codec_native = ast_str_alloca(256); - struct ast_str *codec_set = ast_str_alloca(256); + struct ast_str *codec_native = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN); + struct ast_str *codec_set = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN); ast_format_cap_get_names(cap_native, &codec_native); ast_channel_unlock(chan); @@ -5978,8 +5978,8 @@ struct ast_channel *ast_request(const char *type, struct ast_format_cap *request res = ast_translator_best_choice(tmp_cap, chan->tech->capabilities, &tmp_fmt, &best_audio_fmt); ao2_ref(tmp_cap, -1); if (res < 0) { - struct ast_str *tech_codecs = ast_str_alloca(64); - struct ast_str *request_codecs = ast_str_alloca(64); + struct ast_str *tech_codecs = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN); + struct ast_str *request_codecs = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN); ast_log(LOG_WARNING, "No translator path exists for channel type %s (native %s) to %s\n", type, ast_format_cap_get_names(chan->tech->capabilities, &tech_codecs), diff --git a/main/cli.c b/main/cli.c index e59a856d4..b3d4cac3d 100644 --- a/main/cli.c +++ b/main/cli.c @@ -1528,7 +1528,7 @@ static char *handle_showchan(struct ast_cli_entry *e, int cmd, struct ast_cli_ar struct ast_var_t *var; struct ast_str *write_transpath = ast_str_alloca(256); struct ast_str *read_transpath = ast_str_alloca(256); - struct ast_str *codec_buf = ast_str_alloca(64); + struct ast_str *codec_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN); struct ast_bridge *bridge; ast_callid callid; char callid_buf[32]; diff --git a/main/file.c b/main/file.c index bfad6e025..f0f826a4f 100644 --- a/main/file.c +++ b/main/file.c @@ -1091,7 +1091,7 @@ int ast_streamfile(struct ast_channel *chan, const char *filename, const char *p fs = ast_openstream(chan, filename, preflang); if (!fs) { - struct ast_str *codec_buf = ast_str_alloca(64); + struct ast_str *codec_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN); ast_log(LOG_WARNING, "Unable to open %s (format %s): %s\n", filename, ast_format_cap_get_names(ast_channel_nativeformats(chan), &codec_buf), strerror(errno)); return -1; diff --git a/main/manager.c b/main/manager.c index 6e9ae0010..d6aadf4ec 100644 --- a/main/manager.c +++ b/main/manager.c @@ -4343,7 +4343,7 @@ static void generate_status(struct mansession *s, struct ast_channel *chan, char RAII_VAR(struct ast_str *, variable_str, NULL, ast_free); struct ast_str *write_transpath = ast_str_alloca(256); struct ast_str *read_transpath = ast_str_alloca(256); - struct ast_str *codec_buf = ast_str_alloca(128); + struct ast_str *codec_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN); struct ast_party_id effective_id; int i; RAII_VAR(struct ast_channel_snapshot *, snapshot, diff --git a/main/sorcery.c b/main/sorcery.c index f9f7c3873..b751b9f09 100644 --- a/main/sorcery.c +++ b/main/sorcery.c @@ -307,7 +307,7 @@ static int chararray_handler_fn(const void *obj, const intptr_t *args, char **bu static int codec_handler_fn(const void *obj, const intptr_t *args, char **buf) { - struct ast_str *codec_buf = ast_str_alloca(64); + struct ast_str *codec_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN); struct ast_format_cap **cap = (struct ast_format_cap **)(obj + args[0]); return !(*buf = ast_strdup(ast_format_cap_get_names(*cap, &codec_buf))); } |