aboutsummaryrefslogtreecommitdiffstats
path: root/main/channel.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-31 09:31:10 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-31 09:31:10 +0000
commitf052e15a98ca58f37097025bf9bfb4f701f8942b (patch)
tree8e822b0ddf5ed23d4fa8ad08997ae1b70ffa280a /main/channel.c
parent80b1533844da4e4868e91ed6bd648f449d73ef9e (diff)
Use the ast_str API call to reset the string instead of manually editing its internals
(closes issue #13816) Reported by: eliel Patches: channel.c.patch uploaded by eliel (license 64) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153057 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/channel.c')
-rw-r--r--main/channel.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/main/channel.c b/main/channel.c
index fd496e5f0..6ace4c008 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -363,8 +363,7 @@ int ast_channel_trace_serialize(struct ast_channel *chan, struct ast_str **buf)
return total;
}
traced = store->data;
- (*buf)->used = 0;
- (*buf)->str[0] = '\0';
+ ast_str_reset(*buf);
AST_LIST_TRAVERSE(&traced->trace, trace, entry) {
if (ast_str_append(buf, 0, "[%d] => %s, %s, %d\n", total, trace->context, trace->exten, trace->priority) < 0) {
ast_log(LOG_ERROR, "Data Buffer Size Exceeded!\n");