summaryrefslogtreecommitdiff
path: root/src/modl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modl.cpp')
-rwxr-xr-xsrc/modl.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/modl.cpp b/src/modl.cpp
index 77e645c..ca620ce 100755
--- a/src/modl.cpp
+++ b/src/modl.cpp
@@ -1,4 +1,5 @@
#ifndef MODL_CPP
+
#define MODL_CPP
#include <limits.h>
@@ -11,12 +12,12 @@
using namespace std;
-modl::modl() : smap<dynmod*,string>(HMAPOCC)
+modl::modl( ) : smap<dynmod*,string>(HMAPOCC)
{
#ifdef NCURSES
print_cached( 0 );
#endif
-
+
if ( wrap::CONF->get_elem( "httpd.modules.preloadcommands" ).compare( "true" ) == 0 )
preload_modules( wrap::CONF->get_elem("httpd.modules.commandsdir") );
@@ -50,7 +51,7 @@ modl::preload_modules( string s_path )
do
{
if ( iter->length() >= 3 && iter->compare( iter->length()-3, 3, ".so" ) == 0 )
- cache_module( s_path + *iter, false );
+ cache_module( s_path + *iter );
}
while ( ++iter != dir_vec.end() );
}
@@ -69,7 +70,7 @@ modl::dlclose_( dynmod* mod )
}
dynmod*
-modl::cache_module( string s_name, bool b_print_sys_msg )
+modl::cache_module( string s_name )
{
void *the_module = NULL;
function *the_func = NULL;
@@ -91,8 +92,8 @@ modl::cache_module( string s_name, bool b_print_sys_msg )
return NULL;
}
- if ( b_print_sys_msg )
- wrap::system_message( MODULEC + s_name.substr( s_name.find_last_of("/")+1 ) );
+ wrap::system_message( MODULEC + s_name.substr( s_name.find_last_of("/")+1 ) );
+
dynmod *mod = new dynmod; // encapsulates the function and module handler.
mod->the_func = the_func ; // the function to execute
@@ -116,7 +117,7 @@ modl::get_module( string s_name )
{
wrap::system_message( MODULER + s_name.substr( s_name.find_last_of("/")+1 ) );
dynmod* mod = get_elem( s_name );
- return ! mod ? cache_module( s_name, true ) : mod;
+ return ! mod ? cache_module( s_name ) : mod;
}
void
@@ -145,7 +146,6 @@ modl::reload_modules()
preload_modules( wrap::CONF->get_elem("httpd.modules.commandsdir") );
preload_modules( wrap::CONF->get_elem("httpd.modules.htmldir") );
}
-
#ifdef NCURSES
void
modl::print_cached( int i_mods )