summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2000-05-26 16:24:10 +0000
committerrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2000-05-26 16:24:10 +0000
commit88bdbf339cc25c0b915a025cce1146a32b1a6775 (patch)
treefa318eda63d805ca09c767ec96b802c8c7856e3b /test
parent45ed8327ceaaf12e02fe2b425569aa606496f8e4 (diff)
downloadlibapr-88bdbf339cc25c0b915a025cce1146a32b1a6775.tar.gz
Fix error handling for DSO opening. This probably doesn't fix all
of the dso error handling, but it reports errors when opening with much more detail. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60102 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/testdso.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/testdso.c b/test/testdso.c
index ecc6eeaa1..70e1a0a0c 100644
--- a/test/testdso.c
+++ b/test/testdso.c
@@ -12,6 +12,7 @@ int main (int argc, char ** argv)
ap_dso_handle_t *h = NULL;
ap_dso_handle_sym_t func1 = NULL;
ap_dso_handle_sym_t func2 = NULL;
+ ap_status_t status;
ap_pool_t *cont;
void (*function)(void);
void (*function1)(int);
@@ -38,8 +39,10 @@ int main (int argc, char ** argv)
fprintf(stdout,"OK\n");
fprintf(stdout,"Trying to load DSO now.....................");
fflush(stdout);
- if (ap_dso_load(&h, filename, cont) != APR_SUCCESS){
- fprintf(stderr, "Failed to load %s!\n", filename);
+ if ((status = ap_dso_load(&h, filename, cont)) != APR_SUCCESS){
+ char my_error[256];
+ ap_strerror(status, my_error, sizeof(my_error));
+ fprintf(stderr, "%s!\n", my_error);
exit (-1);
}
fprintf(stdout,"OK\n");