mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-19 03:07:59 +00:00
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:
@@ -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];
|
||||
|
Reference in New Issue
Block a user