From 8a6946b18003fae6400a137389f0cb13d0ac4bd6 Mon Sep 17 00:00:00 2001 From: m0gg Date: Sat, 3 Nov 2007 22:40:09 +0000 Subject: Split nanoHTTP and cSOAP logging --- libcsoap/soap-admin.c | 74 ++++++++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 42 deletions(-) (limited to 'libcsoap/soap-admin.c') diff --git a/libcsoap/soap-admin.c b/libcsoap/soap-admin.c index efc9651..2e6853d 100644 --- a/libcsoap/soap-admin.c +++ b/libcsoap/soap-admin.c @@ -1,5 +1,6 @@ +/** @file soap-admin.c SOAP administrator application */ /****************************************************************** -* $Id: soap-admin.c,v 1.11 2006/12/31 17:24:22 m0gg Exp $ +* $Id: soap-admin.c,v 1.12 2007/11/03 22:40:09 m0gg Exp $ * * CSOAP Project: A SOAP client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -44,8 +45,8 @@ #include #include -#include #include +#include #include #include #include @@ -68,31 +69,31 @@ _soap_admin_send_title(httpd_conn_t *conn, const char *title) ""); http_output_stream_write_string(conn->out, - ""); + "" + "" + "" + "csoap "); - http_output_stream_write_string(conn->out, - "" - "" - "csoap "); http_output_stream_write_string(conn->out, title); http_output_stream_write_string(conn->out, "
"); - - return; } static inline void _soap_admin_send_footer(httpd_conn_t *conn) { - http_output_stream_write_string(conn->out, ""); - - return; + http_output_stream_write_string(conn->out, + "
" + "Admin page " + "cSOAP Home" + "" + ""); } static void @@ -118,8 +119,6 @@ _soap_admin_list_routers(httpd_conn_t *conn) http_output_stream_write_string(conn->out, ""); _soap_admin_send_footer(conn); - - return; } static void @@ -136,7 +135,7 @@ _soap_admin_list_services(httpd_conn_t *conn, const char *routername) if (!router) { http_output_stream_write_string(conn->out, "Router not found!"); - http_output_stream_write_string(conn->out, ""); + _soap_admin_send_footer(conn); return; } @@ -174,8 +173,6 @@ _soap_admin_list_services(httpd_conn_t *conn, const char *routername) http_output_stream_write_string(conn->out, ""); _soap_admin_send_footer(conn); - - return; } static void @@ -211,16 +208,13 @@ _soap_admin_handle_get(httpd_conn_t * conn, struct hrequest_t * req) ""); _soap_admin_send_footer(conn); } - - return; } - static void _soap_admin_entry(httpd_conn_t * conn, struct hrequest_t * req) { @@ -232,21 +226,18 @@ _soap_admin_entry(httpd_conn_t * conn, struct hrequest_t * req) { httpd_send_header(conn, 200, HTTP_STATUS_200_REASON_PHRASE); http_output_stream_write_string(conn->out, - "" - "" - "" - "" - "

Sorry!

" - "
" - "
POST Service is not implemented now. Use your browser
" - "" - ""); + "" + "" + "" + "" + "

Sorry!

" + "
" + "
Only GET method is implemented now. Use your browser.
" + "" + ""); } - - return; } - herror_t soap_admin_init_args(int argc, char **argv) { @@ -256,10 +247,9 @@ soap_admin_init_args(int argc, char **argv) if (!strcmp(argv[i], CSOAP_ENABLE_ADMIN)) { - httpd_register("/csoap", _soap_admin_entry); + httpd_register(CSOAP_ADMIN_CONTEXT, _soap_admin_entry); break; } } - return H_OK; } -- cgit v1.1-32-gdbae