Part of the merge did not happen correctly, which resulted in a compile error

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
certified/1.8.6
Tilghman Lesher 17 years ago
parent a6adc84e69
commit ec37b8e527

@ -3605,7 +3605,7 @@ void ast_str_substitute_variables_full(struct ast_str **buf, ssize_t maxlen, str
cp4 = ast_func_read2(c, finalvars, &substr3, 0) ? NULL : ast_str_buffer(substr3); cp4 = ast_func_read2(c, finalvars, &substr3, 0) ? NULL : ast_str_buffer(substr3);
/* Don't deallocate the varshead that was passed in */ /* Don't deallocate the varshead that was passed in */
memcpy(&bogus->varshead, &old, sizeof(bogus->varshead)); memcpy(&bogus->varshead, &old, sizeof(bogus->varshead));
ast_channel_free(bogus); ast_channel_release(bogus);
} else { } else {
ast_log(LOG_ERROR, "Unable to allocate bogus channel for variable substitution. Function results may be blank.\n"); ast_log(LOG_ERROR, "Unable to allocate bogus channel for variable substitution. Function results may be blank.\n");
} }
@ -3694,7 +3694,7 @@ void ast_str_substitute_variables_varshead(struct ast_str **buf, ssize_t maxlen,
void pbx_substitute_variables_helper_full(struct ast_channel *c, struct varshead *headp, const char *cp1, char *cp2, int count, size_t *used) void pbx_substitute_variables_helper_full(struct ast_channel *c, struct varshead *headp, const char *cp1, char *cp2, int count, size_t *used)
{ {
/* Substitutes variables into cp2, based on string cp1, cp2 NO LONGER NEEDS TO BE ZEROED OUT!!!! */ /* Substitutes variables into cp2, based on string cp1, cp2 NO LONGER NEEDS TO BE ZEROED OUT!!!! */
char *cp4; char *cp4 = NULL;
const char *tmp, *whereweare, *orig_cp2 = cp2; const char *tmp, *whereweare, *orig_cp2 = cp2;
int length, offset, offset2, isfunction; int length, offset, offset2, isfunction;
char *workspace = NULL; char *workspace = NULL;
@ -3805,8 +3805,9 @@ void pbx_substitute_variables_helper_full(struct ast_channel *c, struct varshead
/* Don't deallocate the varshead that was passed in */ /* Don't deallocate the varshead that was passed in */
memcpy(&bogus->varshead, &old, sizeof(bogus->varshead)); memcpy(&bogus->varshead, &old, sizeof(bogus->varshead));
bogus = ast_channel_release(bogus); bogus = ast_channel_release(bogus);
} else } else {
ast_log(LOG_ERROR, "Unable to allocate bogus channel for variable substitution. Function results may be blank.\n"); ast_log(LOG_ERROR, "Unable to allocate bogus channel for variable substitution. Function results may be blank.\n");
}
} }
ast_debug(2, "Function result is '%s'\n", cp4 ? cp4 : "(null)"); ast_debug(2, "Function result is '%s'\n", cp4 ? cp4 : "(null)");
} else { } else {

Loading…
Cancel
Save