summaryrefslogtreecommitdiff
path: root/channels/chan_unistim.c
diff options
context:
space:
mode:
authorAlexander Traud <pabstraud@compuserve.com>2015-11-09 10:01:41 +0100
committerAlexander Traud <pabstraud@compuserve.com>2015-11-09 16:58:52 +0100
commitcf79b627789e2c6434419b71508a296c9ee90539 (patch)
treede7a9f429d1a77bec41957e661d17bd96d8ac06f /channels/chan_unistim.c
parentf12ebe35848c2ce82e53b332742e83b2b5875502 (diff)
ast_format_cap_get_names: To display all formats, the buffer was increased.
ASTERISK-25533 #close Change-Id: Ie1a9d1a6511b3f1a56b93d04475fbf8a4e40010a
Diffstat (limited to 'channels/chan_unistim.c')
-rw-r--r--channels/chan_unistim.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c
index 874f6b2dc..c96a9c087 100644
--- a/channels/chan_unistim.c
+++ b/channels/chan_unistim.c
@@ -2890,7 +2890,7 @@ static void start_rtp(struct unistim_subchannel *sub)
ast_rtp_instance_set_remote_address(sub->rtp, &sin_tmp);
if (ast_format_cap_iscompatible_format(ast_channel_nativeformats(sub->owner), ast_channel_readformat(sub->owner)) == AST_FORMAT_CMP_NOT_EQUAL) {
struct ast_format *tmpfmt;
- struct ast_str *cap_buf = ast_str_alloca(64);
+ struct ast_str *cap_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
tmpfmt = ast_format_cap_get_format(ast_channel_nativeformats(sub->owner), 0);
ast_log(LOG_WARNING,
@@ -5143,7 +5143,7 @@ static struct ast_frame *unistim_rtp_read(const struct ast_channel *ast,
/* We already hold the channel lock */
if (f->frametype == AST_FRAME_VOICE) {
if (ast_format_cap_iscompatible_format(ast_channel_nativeformats(sub->owner), f->subclass.format) == AST_FORMAT_CMP_NOT_EQUAL) {
- struct ast_str *cap_buf = ast_str_alloca(64);
+ struct ast_str *cap_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
struct ast_format_cap *caps;
ast_debug(1,
@@ -5193,7 +5193,7 @@ static int unistim_write(struct ast_channel *ast, struct ast_frame *frame)
}
} else {
if (ast_format_cap_iscompatible_format(ast_channel_nativeformats(ast), frame->subclass.format) == AST_FORMAT_CMP_NOT_EQUAL) {
- struct ast_str *cap_buf = ast_str_alloca(64);
+ struct ast_str *cap_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
ast_log(LOG_WARNING,
"Asked to transmit frame type %s, while native formats is %s (read/write = (%s/%s)\n",
@@ -5724,9 +5724,9 @@ static struct ast_channel *unistim_new(struct unistim_subchannel *sub, int state
tmpfmt = ast_format_cap_get_format(ast_channel_nativeformats(tmp), 0);
if (unistimdebug) {
- struct ast_str *native_buf = ast_str_alloca(64);
- struct ast_str *cap_buf = ast_str_alloca(64);
- struct ast_str *global_buf = ast_str_alloca(64);
+ struct ast_str *native_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
+ struct ast_str *cap_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
+ struct ast_str *global_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
ast_verb(0, "Best codec = %s from nativeformats %s (line cap=%s global=%s)\n",
ast_format_get_name(tmpfmt),
@@ -5939,8 +5939,8 @@ static struct ast_channel *unistim_request(const char *type, struct ast_format_c
char tmp[256];
if (!(ast_format_cap_iscompatible(cap, global_cap))) {
- struct ast_str *cap_buf = ast_str_alloca(64);
- struct ast_str *global_buf = ast_str_alloca(64);
+ struct ast_str *cap_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
+ struct ast_str *global_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
ast_log(LOG_NOTICE,
"Asked to get a channel of unsupported format %s while capability is %s\n",
ast_format_cap_get_names(cap, &cap_buf),
@@ -6015,7 +6015,7 @@ static char *unistim_show_info(struct ast_cli_entry *e, int cmd, struct ast_cli_
struct unistim_line *line;
struct unistim_subchannel *sub;
struct unistimsession *s;
- struct ast_str *cap_buf = ast_str_alloca(64);
+ struct ast_str *cap_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
switch (cmd) {
case CLI_INIT: