mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-08 19:08:14 +00:00
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: https://origsvn.digium.com/svn/asterisk/trunk@153057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -363,8 +363,7 @@ int ast_channel_trace_serialize(struct ast_channel *chan, struct ast_str **buf)
|
|||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
traced = store->data;
|
traced = store->data;
|
||||||
(*buf)->used = 0;
|
ast_str_reset(*buf);
|
||||||
(*buf)->str[0] = '\0';
|
|
||||||
AST_LIST_TRAVERSE(&traced->trace, trace, entry) {
|
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) {
|
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");
|
ast_log(LOG_ERROR, "Data Buffer Size Exceeded!\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user