adress MODAPP-55

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6491 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2007-12-04 16:22:02 +00:00
parent 41a97ef575
commit ae9f41c379
4 changed files with 66 additions and 2 deletions

View File

@@ -1545,9 +1545,13 @@ static int show_callback(void *pArg, int argc, char **argv, char **columnNames)
for (x = 0; x < argc; x++) {
char *val = switch_str_nil(argv[x]);
if (holder->http) {
char aval[512];
switch_amp_encode(argv[x], aval, sizeof(aval));
holder->stream->write_function(holder->stream, "<td>");
holder->stream->write_function(holder->stream, "%s%s", val, x == (argc - 1) ? "</td></tr>\n" : "</td><td>");
holder->stream->write_function(holder->stream, "%s%s", aval, x == (argc - 1) ? "</td></tr>\n" : "</td><td>");
} else {
holder->stream->write_function(holder->stream, "%s%s", val, x == (argc - 1) ? "\n" : holder->delim);
}
@@ -1582,7 +1586,7 @@ SWITCH_STANDARD_API(show_function)
}
}
if (!as && stream->event) {
if (stream->event) {
holder.http = switch_event_get_header(stream->event, "http-host");
}