aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index ef7c4e001..1fb775179 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -13821,7 +13821,7 @@ static char *sip_show_user(struct ast_cli_entry *e, int cmd, struct ast_cli_args
static char *sip_show_sched(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
- char cbuf[2256];
+ struct ast_str *cbuf;
struct ast_cb_names cbnames = {9, { "retrans_pkt",
"__sip_autodestruct",
"expire_register",
@@ -13851,9 +13851,13 @@ static char *sip_show_sched(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
case CLI_GENERATE:
return NULL;
}
+
+ cbuf = ast_str_alloca(2048);
+
ast_cli(a->fd, "\n");
- ast_sched_report(sched, cbuf, sizeof(cbuf), &cbnames);
- ast_cli(a->fd, "%s", cbuf);
+ ast_sched_report(sched, &cbuf, &cbnames);
+ ast_cli(a->fd, "%s", cbuf->str);
+
return CLI_SUCCESS;
}