/[monit]/monit/http/cervlet.c
ViewVC logotype

Diff of /monit/http/cervlet.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.184 by hauk, Sun Feb 20 23:14:46 2005 UTC revision 1.185 by martinp, Fri Apr 1 22:00:59 2005 UTC
# Line 127  static void print_service_params_device( Line 127  static void print_service_params_device(
127  static void print_service_params_size(HttpResponse, Service_T);  static void print_service_params_size(HttpResponse, Service_T);
128  static void print_service_params_checksum(HttpResponse, Service_T);  static void print_service_params_checksum(HttpResponse, Service_T);
129  static void print_service_params_process(HttpResponse, Service_T);  static void print_service_params_process(HttpResponse, Service_T);
130  static void print_status(HttpResponse, int);  static void print_status(HttpRequest, HttpResponse);
131  static void status_system_txt(HttpResponse);  static void status_system_txt(HttpResponse);
132  static void status_service_txt(Service_T, HttpResponse);  static void status_service_txt(Service_T, HttpResponse);
133  static char *get_service_status_html(Service_T);  static char *get_service_status_html(Service_T);
# Line 220  static void doGet(HttpRequest req, HttpR Line 220  static void doGet(HttpRequest req, HttpR
220    } else if(ACTION(PIXEL)) {    } else if(ACTION(PIXEL)) {
221      printPixel(res);      printPixel(res);
222    } else if(ACTION(STATUS)) {    } else if(ACTION(STATUS)) {
223      const char *format= get_parameter(req, "format");      print_status(req, res);
     if(format && Util_startsWith(format, "xml"))  
       print_status(res, XML_STATUS);  
     else {  
       /* Text status output is default */  
       print_status(res, TEXT_STATUS);  
     }  
224    } else {    } else {
225      handle_action(req, res);      handle_action(req, res);
226    }    }
# Line 2076  static int is_readonly(HttpRequest req) Line 2070  static int is_readonly(HttpRequest req)
2070    
2071    
2072  /* Print status in the given format. Text status is default. */  /* Print status in the given format. Text status is default. */
2073  static void print_status(HttpResponse res, int format) {  static void print_status(HttpRequest req, HttpResponse res) {
   
2074    Service_T s;    Service_T s;
2075      const char *format= get_parameter(req, "format");
2076    
2077    if(format==XML_STATUS)    if(format && Util_startsWith(format, "xml"))
2078    {    {
2079      char *D;      char *D = status_xml(NULL);
   
2080      set_content_type(res, "text/xml");      set_content_type(res, "text/xml");
     D = status_xml(NULL);  
2081      out_print(res, "%s", D);      out_print(res, "%s", D);
2082      FREE(D);      FREE(D);
2083    }    }

Legend:
Removed from v.1.184  
changed lines
  Added in v.1.185

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26