[osmonweb commit] remove support for GoAhead
Joel Sherrill
joel at rtems.org
Mon Jan 6 15:45:07 UTC 2014
Module: osmonweb
Branch: master
Commit: cb943625b57e889f13ed119715b21b9b535094a6
Changeset: http://git.rtems.org/osmonweb/commit/?id=cb943625b57e889f13ed119715b21b9b535094a6
Author: Chirayu Desai <cdesai at cyanogenmod.org>
Date: Sun Jan 5 12:14:43 2014 +0530
remove support for GoAhead
---
Makefile | 14 +------
README | 4 +-
init.c | 28 ------------
osmonweb.c | 6 ---
osmonweb_goahead.c | 120 ----------------------------------------------------
osmonweb_int.h | 4 --
6 files changed, 3 insertions(+), 173 deletions(-)
diff --git a/Makefile b/Makefile
index 4c0602c..b7a137e 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,6 @@ PGM=${ARCH}/osmonweb.exe
MANAGERS=all
# Application Configuration parameters
-USE_GOAHEAD=no
USE_SIMPLE=yes
USE_FTPD=yes
USE_DEBUG=no
@@ -15,9 +14,6 @@ USE_DEBUG=no
C_FILES=init.c osmonweb.c htmlprintf.c \
osmonweb_RTEID.c \
osmonweb_RTEID_queues.c
-ifeq ($(USE_GOAHEAD),yes)
- C_FILES+= osmonweb_goahead.c
-endif
ifeq ($(USE_SIMPLE),yes)
C_FILES+= osmonweb_shttpd.c shttpd_ext.c
endif
@@ -47,14 +43,6 @@ include $(PROJECT_ROOT)/make/leaf.cfg
# (OPTIONAL) Add local stuff here using +=
#
-ifeq ($(USE_GOAHEAD),yes)
- HTTPD = GoAhead Web Server
- HTTPD_LOGO = webserver_logo2.gif
- HTTPD_INDEX = index_goahead.html
- CFLAGS += -DWEBS -DUEMF -DUSE_GOAHEAD_HTTPD
- LD_LIBS += -lhttpd
-endif
-
ifeq ($(USE_SIMPLE),yes)
HTTPD = Simple HTTPD Web Server
HTTPD_LOGO = SimpleHTTPD.png
@@ -114,7 +102,7 @@ FilesystemImage: $(ARCH) rootfs/etc/host.conf rootfs/etc/hosts rootfs/index.html
FilesystemImage.c FilesystemImage.h: $(ARCH) FilesystemImage
$(PROJECT_ROOT)/bin/bin2c FilesystemImage FilesystemImage
-rootfs/index.html: index_goahead.html index_shttpd.html
+rootfs/index.html: index_shttpd.html
cp $(HTTPD_INDEX) $@
osmonweb_tar: $(ARCH) $(HTML_GEN)
diff --git a/README b/README
index 68f352b..7f13e0f 100644
--- a/README
+++ b/README
@@ -17,8 +17,8 @@ Warnings about the conversion and update:
+ Simple HTTPD does NOT have the same type of argument parsing
as GoAhead did. The html argument parsing is new for Simple HTTPD.
-+ Joel left ifdef's in for GoAhead but didn't test on GoAhead.
- - GoAhead's server has been obsoleted. Code should be removed.
++ Simple HTTPD has been renamed to Mongoose HTTPD, the code should
+ be adapted for that.
There is one serious bug and a number of open issues to address:
diff --git a/init.c b/init.c
index e39edbc..8405709 100644
--- a/init.c
+++ b/init.c
@@ -43,7 +43,6 @@ rtems_task Init(
#include <rtems/ftpd.h>
#include <rtems/untar.h>
-
#include <rtems/error.h>
#include <rpc/rpc.h>
#include <netinet/in.h>
@@ -71,25 +70,8 @@ rtems_task Init(
#endif
/*
- * Include the standard RTEMS Webserver Header file
- */
-#include <rtems_webserver.h>
-
-/*
* Some data declarations that are server dependent
*/
-#if defined(USE_GOAHEAD_HTTPD)
- boolean GoAhead_HTTPD_enabled = TRUE;
-
- /* GoAhead Trace Handler */
- #include <goahead/uemf.h>
- void quietTraceHandler(int level, char *buf)
- {
- /* do nothing */
- }
-#else
- boolean GoAhead_HTTPD_enabled = FALSE;
-#endif
#if defined(USE_SIMPLE_HTTPD)
boolean Simple_HTTPD_enabled = TRUE;
@@ -120,7 +102,6 @@ rtems_task Init(
rtems_status_code status;
printf("\n\n*** OSMONWEB TEST ***\n\r" );
- printf("GoAhead HTTPD Enabled: %s\n", bool2string(GoAhead_HTTPD_enabled) );
printf("Simple HTTPD Enabled: %s\n", bool2string(Simple_HTTPD_enabled) );
printf("FTPD Enabled: %s\n", bool2string(FTPD_enabled) );
printf("\n");
@@ -143,15 +124,6 @@ rtems_task Init(
rtems_initialize_ftpd();
#endif
- #if defined(USE_GOAHEAD_HTTPD)
- printf( "Initializing GoAhead HTTPD\n" );
- status = rtems_initialize_webserver();
- if ( status )
- printf( "ERROR -- failed to initialize webserver\n" );
-
- traceSetHandler( quietTraceHandler );
- #endif
-
#if defined(USE_SIMPLE_HTTPD)
printf( "Initializing Simple HTTPD\n" );
status = rtems_initialize_webserver(
diff --git a/osmonweb.c b/osmonweb.c
index 847792f..a412ee3 100644
--- a/osmonweb.c
+++ b/osmonweb.c
@@ -527,12 +527,6 @@ rtems_status_code osmonweb_init
if (gethostname(osmonweb_hostname, sizeof(osmonweb_hostname)) < 0) {
strcpy(osmonweb_hostname,"RTEMS Target");
}
- /*
- * define form handler
- */
- #if defined(USE_GOAHEAD_HTTPD)
- websFormDefine(T("osmonweb"), osmonweb_form);
- #endif
}
return RTEMS_SUCCESSFUL;
}
diff --git a/osmonweb_goahead.c b/osmonweb_goahead.c
deleted file mode 100644
index 32a2b99..0000000
--- a/osmonweb_goahead.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/*===============================================================*\
-| Project: OSMONWEB GoAhead Webserver Adapter |
-+-----------------------------------------------------------------+
-| File: osmonweb_goahead.c |
-+-----------------------------------------------------------------+
-| Copyright (c) 2003 IMD |
-| Ingenieurbuero fuer Microcomputertechnik Th. Doerfler |
-| all rights reserved |
-+-----------------------------------------------------------------+
-| this file contains the top-level functions to visualize the |
-| RTEMS OS structures with a web browser |
-| GNU C Compiler |
-| |
-+-----------------------------------------------------------------+
- $Id$
-\*===============================================================*/
-
-#include "osmonweb.h"
-#include "osmonweb_int.h"
-
-#if defined(USE_GOAHEAD_HTTPD)
- #include <stdlib.h>
- #include <string.h>
- #include <stdio.h>
- #include <limits.h>
- #include <errno.h>
-
- #include <goahead/uemf.h>
-
-/*=========================================================================*\
-| Function: |
-\*-------------------------------------------------------------------------*/
-uint32_t osmonweb_getvar_u32
-(
-/*-------------------------------------------------------------------------*\
-| Purpose: |
-| get variable from URL |
-+---------------------------------------------------------------------------+
-| Input Parameters: |
-\*-------------------------------------------------------------------------*/
- osmonweb_ctx_t wp, /* web handle */
- char_t *key, /* key/name of variable */
- uint32_t default_val /* default value, if absent */
-)
-/*-------------------------------------------------------------------------*\
-| Return Value: |
-| value of variable |
-\*=========================================================================*/
-{
- const char *tmp_var;
- char *end_ptr;
- uint32_t ret_val;
-
- ret_val = default_val;
- tmp_var = websGetVar(wp, key,NULL);
- if (tmp_var != NULL) {
- ret_val = strtoul(tmp_var,&end_ptr,0);
- if (end_ptr == NULL) {
- ret_val = default_val;
- }
- }
- return ret_val;
-}
-
-void *osmonweb_getCommonOptions(
- osmonweb_ctx_t wp, /* web handle */
- osmonweb_common_option_t *c
-)
-{
- c->api_type = websGetVar(wp,T("api"),NULL);
- c->obj_type = websGetVar(wp,T("obj_type"),NULL);
- c->action = websGetVar(wp,T("action"),NULL);
- c->multi_node_enable = osmonweb_getvar_u32(wp, T("multi_node_enable"), 0);
- c->node_curr = osmonweb_getvar_u32(wp, T("node_curr"), 0);
- c->multi_obj_enable = osmonweb_getvar_u32(wp, T("multi_obj_enab"), 1);
- c->obj_curr = osmonweb_getvar_u32(wp, T("obj_curr"), 0);
- c->auto_rfsh_enable = osmonweb_getvar_u32(wp, T("auto_rfsh_enab"), 0);
- c->auto_rfsh_time = osmonweb_getvar_u32(wp, T("auto_rfsh_time"), 0);
- c->sort_dir = osmonweb_getvar_u32(wp, T("sort_dir"), 0);
- c->sort_select = osmonweb_getvar_u32(wp, T("sort_select"), 0);
- c->hdr_rep_enable = osmonweb_getvar_u32(wp, T("hdr_rep_enable"), 0);
- c->hdr_repcnt = osmonweb_getvar_u32(wp, T("hdr_rep_cnt"), 0);
- return NULL;
-}
-
-int osmonweb_WriteBlock(
- osmonweb_ctx_t wp, /* web handle */
- char *buf,
- int nChars
-)
-{
- return websWriteBlock( wp, buf, nChars );
-}
-
-void osmonweb_header(
- osmonweb_ctx_t wp /* web handle */
-)
-{
- websHeader(wp);
-}
-
-void osmonweb_footer(
- osmonweb_ctx_t wp /* web handle */
-)
-{
- websFooter(wp);
- websDone(wp, 200);
-}
-
-const char *osmonweb_httpdname(void)
-{
- return "GoAhead Webserver";
-}
-
-const char *osmonweb_logoname(void)
-{
- return "webserver_logo2.gif";
-}
-
-#endif
diff --git a/osmonweb_int.h b/osmonweb_int.h
index 9e425cd..7a8a00c 100644
--- a/osmonweb_int.h
+++ b/osmonweb_int.h
@@ -91,10 +91,6 @@ typedef struct {
#include <shttpd/shttpd.h>
typedef struct shttpd_ctx *osmonweb_ctx_t;
#endif
-#if defined(USE_GOAHEAD_HTTPD)
- #include <goahead/wsIntrn.h>
- typedef webs_t osmonweb_ctx_t;
-#endif
void *osmonweb_getCommonOptions(
osmonweb_ctx_t wp, /* web handle */
More information about the vc
mailing list