summaryrefslogtreecommitdiff
path: root/dso
diff options
context:
space:
mode:
authordreid <dreid@13f79535-47bb-0310-9956-ffa450edef68>2003-11-23 20:33:09 +0000
committerdreid <dreid@13f79535-47bb-0310-9956-ffa450edef68>2003-11-23 20:33:09 +0000
commitbb661f315bcffc0012719103158e8c6f7749913b (patch)
tree3135c595a8b2ab742d24099f887fc4cff0d2a684 /dso
parent706881ec7da4e9d140715370746e8cee68892f92 (diff)
downloadlibapr-bb661f315bcffc0012719103158e8c6f7749913b.tar.gz
Modify the beos dso code to always return a structure, adding the errormsg
field as this seems to be the raison'd'etre for returning the structure. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64792 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dso')
-rw-r--r--dso/beos/dso.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/dso/beos/dso.c b/dso/beos/dso.c
index 087ed42e8..7370a814c 100644
--- a/dso/beos/dso.c
+++ b/dso/beos/dso.c
@@ -71,14 +71,17 @@ static apr_status_t dso_cleanup(void *thedso)
APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
const char *path, apr_pool_t *pool)
{
- image_id newid;
-
- if((newid = load_add_on(path)) < B_NO_ERROR)
- return APR_EDSOOPEN;
+ image_id newid = -1;
*res_handle = apr_pcalloc(pool, sizeof(*res_handle));
- (*res_handle)->handle = newid;
+
+ if((newid = load_add_on(path)) < B_NO_ERROR) {
+ (*res_handle)->errormsg = strerror(newid);
+ return APR_EDSOOPEN;
+ }
+
(*res_handle)->pool = pool;
+ (*res_handle)->handle = newid;
apr_pool_cleanup_register(pool, *res_handle, dso_cleanup, apr_pool_cleanup_null);