convert the final clients of ast_build_string to use ast_str_*()

Now the only module left using it is chan_sip.c



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Luigi Rizzo
2006-12-18 15:38:50 +00:00
parent 684e4dc373
commit ccebf3511c
7 changed files with 24 additions and 20 deletions

View File

@@ -1565,13 +1565,15 @@ static void do_hang(struct callattempt *o)
static char *vars2manager(struct ast_channel *chan, char *vars, size_t len)
{
char *tmp = alloca(len);
struct ast_str *buf = ast_str_alloca(len + 1);
char *tmp;
if (pbx_builtin_serialize_variables(chan, tmp, len)) {
if (pbx_builtin_serialize_variables(chan, &buf)) {
int i, j;
/* convert "\n" to "\nVariable: " */
strcpy(vars, "Variable: ");
tmp = buf->str;
for (i = 0, j = 10; (i < len - 1) && (j < len - 1); i++, j++) {
vars[j] = tmp[i];