MCPcopy Create free account
hub / github.com/apache/httpd / dso_load

Function dso_load

modules/core/mod_so.c:146–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146static const char *dso_load(cmd_parms *cmd, apr_dso_handle_t **modhandlep,
147 const char *filename, const char **used_filename)
148{
149 int retry = 0;
150 const char *fullname = ap_server_root_relative(cmd->temp_pool, filename);
151 char my_error[256];
152 if (filename != NULL && ap_strchr_c(filename, '/') == NULL) {
153 /* retry on error without path to use dlopen()'s search path */
154 retry = 1;
155 }
156
157 if (fullname == NULL && !retry) {
158 return apr_psprintf(cmd->temp_pool, "Invalid %s path %s",
159 cmd->cmd->name, filename);
160 }
161 *used_filename = fullname;
162 if (fullname && apr_dso_load(modhandlep, fullname, cmd->pool) == APR_SUCCESS) {
163 return NULL;
164 }
165 if (retry) {
166 *used_filename = filename;
167 if (apr_dso_load(modhandlep, filename, cmd->pool) == APR_SUCCESS)
168 return NULL;
169 }
170
171 return apr_pstrcat(cmd->temp_pool, "Cannot load ", filename,
172 " into server: ",
173 apr_dso_error(*modhandlep, my_error, sizeof(my_error)),
174 NULL);
175}
176
177/*
178 * This is called for the directive LoadModule and actually loads

Callers 2

load_moduleFunction · 0.85
load_fileFunction · 0.85

Calls 2

ap_server_root_relativeFunction · 0.85
ap_strchr_cFunction · 0.85

Tested by

no test coverage detected