mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 09:51:22 +02:00
- nhttpd: remove unused mod_testhook
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -41,7 +41,6 @@
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// modules
|
// modules
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//#define Y_CONFIG_USE_TESTHOOK y // Add mod: "Test-Hook" (hook example)
|
|
||||||
#define Y_CONFIG_USE_YPARSER y // Add mod: "y-Parsing"
|
#define Y_CONFIG_USE_YPARSER y // Add mod: "y-Parsing"
|
||||||
#define Y_CONFIG_USE_AUTHHOOK y // Add mod: "Authentication"
|
#define Y_CONFIG_USE_AUTHHOOK y // Add mod: "Authentication"
|
||||||
#define Y_CONFIG_USE_WEBLOG y // Add mod: "WebLogging"
|
#define Y_CONFIG_USE_WEBLOG y // Add mod: "WebLogging"
|
||||||
|
@@ -249,11 +249,6 @@ void Cyhttpd::hooks_attach() {
|
|||||||
CyhookHandler::attach(auth);
|
CyhookHandler::attach(auth);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Y_CONFIG_USE_TESTHOOK
|
|
||||||
testhook = new CTesthook();
|
|
||||||
CyhookHandler::attach(testhook);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_SYSTEM_TUXBOX
|
#ifdef CONFIG_SYSTEM_TUXBOX
|
||||||
NeutrinoAPI = new CNeutrinoAPI();
|
NeutrinoAPI = new CNeutrinoAPI();
|
||||||
CyhookHandler::attach(NeutrinoAPI->NeutrinoYParser);
|
CyhookHandler::attach(NeutrinoAPI->NeutrinoYParser);
|
||||||
@@ -287,11 +282,6 @@ void Cyhttpd::hooks_detach() {
|
|||||||
delete auth;
|
delete auth;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Y_CONFIG_USE_TESTHOOK
|
|
||||||
CyhookHandler::detach(testhook);
|
|
||||||
delete testhook;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_SYSTEM_TUXBOX
|
#ifdef CONFIG_SYSTEM_TUXBOX
|
||||||
CyhookHandler::detach(NeutrinoAPI->NeutrinoYParser);
|
CyhookHandler::detach(NeutrinoAPI->NeutrinoYParser);
|
||||||
#else
|
#else
|
||||||
|
@@ -16,5 +16,9 @@ AM_CPPFLAGS += -fno-rtti -fno-exceptions -D_FILE_OFFSET_BITS=64
|
|||||||
noinst_LIBRARIES = libyhttpdmods.a
|
noinst_LIBRARIES = libyhttpdmods.a
|
||||||
|
|
||||||
libyhttpdmods_a_SOURCES = \
|
libyhttpdmods_a_SOURCES = \
|
||||||
mod_yparser.cpp mod_testhook.cpp mod_auth.cpp mod_cache.cpp mod_sendfile.cpp mod_weblog.cpp
|
mod_auth.cpp \
|
||||||
|
mod_cache.cpp \
|
||||||
|
mod_sendfile.cpp \
|
||||||
|
mod_weblog.cpp \
|
||||||
|
mod_yparser.cpp
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
//=============================================================================
|
//=============================================================================
|
||||||
// YHTTPD
|
// YHTTPD
|
||||||
// TestHook
|
// mod_auth : Authentication
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
@@ -1,17 +0,0 @@
|
|||||||
//=============================================================================
|
|
||||||
// YHTTPD
|
|
||||||
// TestHook
|
|
||||||
//=============================================================================
|
|
||||||
|
|
||||||
#include "mod_testhook.h"
|
|
||||||
|
|
||||||
THandleStatus CTesthook::Hook_SendResponse(CyhookHandler *hh)
|
|
||||||
{
|
|
||||||
THandleStatus status = HANDLED_NONE;
|
|
||||||
if(hh->UrlData["filename"] == "test2")
|
|
||||||
{
|
|
||||||
hh->yresult = "test it 2222\n";
|
|
||||||
status = HANDLED_READY;
|
|
||||||
}
|
|
||||||
return status;
|
|
||||||
}
|
|
@@ -1,21 +0,0 @@
|
|||||||
//=============================================================================
|
|
||||||
// YHTTPD
|
|
||||||
// TestHook
|
|
||||||
//=============================================================================
|
|
||||||
#ifndef TESTHOOK_H_
|
|
||||||
#define TESTHOOK_H_
|
|
||||||
|
|
||||||
|
|
||||||
#include <yhook.h>
|
|
||||||
class CTesthook : public Cyhook
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
THandleStatus Hook_SendResponse(CyhookHandler *hh);
|
|
||||||
CTesthook(){};
|
|
||||||
~CTesthook(){};
|
|
||||||
|
|
||||||
virtual std::string getHookName(void) {return std::string("Testhook");}
|
|
||||||
|
|
||||||
};
|
|
||||||
#endif /*TESTHOOK_H_*/
|
|
||||||
|
|
Reference in New Issue
Block a user