bnicholes 2003/01/07 11:40:05
Modified: dso/netware dso.c
Log:
Normalize the path before trying to load the module.
Revision Changes Path
1.7 +11 -2 apr/dso/netware/dso.c
Index: dso.c
===================================================================
RCS file: /home/cvs/apr/dso/netware/dso.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- dso.c 6 Jan 2003 23:44:16 -0000 1.6
+++ dso.c 7 Jan 2003 19:40:05 -0000 1.7
@@ -107,7 +107,16 @@
const char *path, apr_pool_t *pool)
{
- void *os_handle = dlopen(path, RTLD_NOW | RTLD_LOCAL);
+ void *os_handle = NULL;
+ char *fullpath = NULL;
+ apr_status_t rv;
+
+ if ((rv = apr_filepath_merge(&fullpath, NULL, path,
+ APR_FILEPATH_NATIVE, pool)) != APR_SUCCESS)
{
+ return rv;
+ }
+
+ os_handle = dlopen(fullpath, RTLD_NOW | RTLD_LOCAL);
*res_handle = apr_pcalloc(pool, sizeof(**res_handle));
@@ -120,7 +129,7 @@
(*res_handle)->pool = pool;
(*res_handle)->errormsg = NULL;
(*res_handle)->symbols = NULL;
- (*res_handle)->path = apr_pstrdup(pool, path);
+ (*res_handle)->path = apr_pstrdup(pool, fullpath);
apr_pool_cleanup_register(pool, *res_handle, dso_cleanup,
apr_pool_cleanup_null);