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); |
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 |
} |
} |
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 |
} |
} |