]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 10 May 2006 16:47:02 +0000 (16:47 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 10 May 2006 16:47:02 +0000 (16:47 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1418 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_commands/mod_commands.c

index af939f1f7d7f8bc6d4be92bec7db446948269795..458180fe57d7c10bd0fd8e50e1eb3cd4c5867796 100644 (file)
@@ -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) {