diff options
author | David Reid <dreid@apache.org> | 2003-11-23 20:33:09 +0000 |
---|---|---|
committer | David Reid <dreid@apache.org> | 2003-11-23 20:33:09 +0000 |
commit | ca5509102d816c9cf906013765255b3082088c5c (patch) | |
tree | 3135c595a8b2ab742d24099f887fc4cff0d2a684 /dso | |
parent | 6230324c9ebad64b5a6b97f8f9fd9123c3f74f49 (diff) | |
download | apr-ca5509102d816c9cf906013765255b3082088c5c.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: https://svn.apache.org/repos/asf/apr/apr/trunk@64792 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dso')
-rw-r--r-- | dso/beos/dso.c | 13 |
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); |