Update of /cvsroot/mod-c/mod_c/src
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv13608/src
Modified Files:
mod_c.c
Log Message:
Don't close libs that are not in the cache (for now) - temporarily fixes bug #1469355.
Index: mod_c.c
===================================================================
RCS file: /cvsroot/mod-c/mod_c/src/mod_c.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** mod_c.c 22 Aug 2006 20:31:58 -0000 1.15
--- mod_c.c 22 Aug 2006 22:26:45 -0000 1.16
***************
*** 53,57 ****
mod_c_config * config = ( mod_c_config * ) ap_get_module_config( r->server->module_config, &c_module );
mod_c_dir_config* dir_config = (mod_c_dir_config*) ap_get_module_config( r->per_dir_config, &c_module );
! char noCache = 0;
// Try to load the handle to the loaded library from the cache
--- 53,57 ----
mod_c_config * config = ( mod_c_config * ) ap_get_module_config( r->server->module_config, &c_module );
mod_c_dir_config* dir_config = (mod_c_dir_config*) ap_get_module_config( r->per_dir_config, &c_module );
! void * handle_to_lib = 0;
// Try to load the handle to the loaded library from the cache
***************
*** 61,77 ****
{
// The handle wasn't there - load the library to memory
! if ( ( handle = dlopen( r->filename, RTLD_LAZY ) ) )
{
! void* _tmp = dlsym( handle, EHTML_ENTRY_FUNC );
! if ( _tmp )
! {
! handle = _tmp;
! noCache = 1;
! }
! else
! {
! dlclose( handle );
! handle = 0;
! }
}
}
--- 61,69 ----
{
// The handle wasn't there - load the library to memory
! if ( ( handle_to_lib = dlopen( r->filename, RTLD_LAZY ) ) )
{
! handle = dlsym( handle_to_lib, EHTML_ENTRY_FUNC );
! if ( !handle )
! dlclose( handle_to_lib );
}
}
***************
*** 85,91 ****
retVal = _tmp( &rc );
// If the EHTML application wasn't loaded from the cache, close the handle
! if ( noCache )
! dlclose( handle );
}
else
--- 77,86 ----
retVal = _tmp( &rc );
+ // TODO: We don't close the EHTML file as is seems to cause a crash
+ // Why would closing a dl lib crash mod_c?
+
// If the EHTML application wasn't loaded from the cache, close the handle
! /*if ( handle_to_lib )
! dlclose( handle_to_lib );*/
}
else
|