From: Ryan Bloom Date: Fri, 19 Jan 2001 17:17:04 +0000 (+0000) Subject: Rely on the APR dso_load cleanup to unload the DSO correctly. There is X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ca370df3e3c6b650e68f86be599c13205889dfb;p=apache Rely on the APR dso_load cleanup to unload the DSO correctly. There is no reason for mod_so to register a second cleanup. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87737 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/mappers/mod_so.c b/modules/mappers/mod_so.c index 9525928fd3..a89e4a9018 100644 --- a/modules/mappers/mod_so.c +++ b/modules/mappers/mod_so.c @@ -185,36 +185,12 @@ static apr_status_t unload_module(void *data) /* remove the module pointer from the core structure */ ap_remove_loaded_module(modi->modp); - /* unload the module space itself */ - if ((status = apr_dso_unload(modi->modp->dynamic_load_handle)) != APR_SUCCESS) { - ap_log_perror(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, - APR_GET_POOL(modi->modp->dynamic_load_handle), - "dso unload failure"); - return status; - } - /* destroy the module information */ modi->modp = NULL; modi->name = NULL; return APR_SUCCESS; } -/* - * This is the cleanup routine for files loaded by - * load_file(). Unfortunately we don't keep a record of the filename - * that was loaded, so we can't report the unload for debug purposes - * or include the filename in error message. - */ - -static apr_status_t unload_file(void *handle) -{ - apr_status_t status; - - if ((status = apr_dso_unload((apr_dso_handle_t *)handle)) != APR_SUCCESS) - return status; - return APR_SUCCESS; -} - /* * This is called for the directive LoadModule and actually loads * a shared object file into the address space of the server process. @@ -340,8 +316,6 @@ static const char *load_file(cmd_parms *cmd, void *dummy, const char *filename) ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, NULL, "loaded file %s", filename); - apr_register_cleanup(cmd->pool, (void *)handle, unload_file, apr_null_cleanup); - return NULL; }