mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-13 15:50:59 +00:00
update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1418 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
4977d27788
commit
ffedb5163a
@ -37,8 +37,14 @@ static switch_status_t status_function(char *cmd, switch_stream_handle_t *stream
|
||||
{
|
||||
switch_core_time_duration_t duration;
|
||||
switch_core_measure_time(switch_core_uptime(), &duration);
|
||||
uint8_t html = 0;
|
||||
|
||||
stream->write_function(stream, "<b>UP %u year%s, %u day%s, %u hour%s, %u minute%s, %u second%s, %u millisecond%s, %u microsecond%s</b>\n",
|
||||
if (cmd && strstr(cmd, "html")) {
|
||||
html = 1;
|
||||
stream->write_function(stream, "<h1>FreeSWITCH Status</h1>\n<b>");
|
||||
}
|
||||
|
||||
stream->write_function(stream, "UP %u year%s, %u day%s, %u hour%s, %u minute%s, %u second%s, %u millisecond%s, %u microsecond%s\n",
|
||||
duration.yr, duration.yr == 1 ? "" : "s",
|
||||
duration.day, duration.day == 1 ? "" : "s",
|
||||
duration.hr, duration.hr == 1 ? "" : "s",
|
||||
@ -48,6 +54,10 @@ static switch_status_t status_function(char *cmd, switch_stream_handle_t *stream
|
||||
duration.mms, duration.mms == 1 ? "" : "s"
|
||||
);
|
||||
|
||||
if (html) {
|
||||
stream->write_function(stream, "</b>\n");
|
||||
}
|
||||
|
||||
if (cmd && strstr(cmd, "refresh=")) {
|
||||
char *refresh = strchr(cmd, '=');
|
||||
if (refresh) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user