Commit a362dfa6 authored by Sebastien Decugis's avatar Sebastien Decugis
Browse files

Add ability to skip dlclose() calls since it creates problems on FreeBSD8.1 64bits

parent 6a6f3d28
......@@ -47,6 +47,7 @@
#cmakedefine DEBUG_SCTP
#cmakedefine SCTP_USE_MAPPED_ADDRESSES
#cmakedefine SCTP_CONNECTX_4_ARGS
#cmakedefine SKIP_DLCLOSE
#cmakedefine ERRORS_ON_TODO
#cmakedefine DEBUG
......
......@@ -171,6 +171,7 @@ int fd_ext_term( void )
(*ext->fini)();
}
#ifndef SKIP_DLCLOSE
/* Now unload the extension */
if (ext->handler) {
TRACE_DEBUG (FULL, "Unloading %s", ext->filename);
......@@ -178,6 +179,7 @@ int fd_ext_term( void )
TRACE_DEBUG (INFO, "Unloading [%s] failed : %s\n", ext->filename, dlerror());
}
}
#endif /* SKIP_DLCLOSE */
/* Free the object and continue */
free(ext->filename);
......
......@@ -68,7 +68,6 @@ int main(int argc, char *argv[])
if (dot && !(strcmp(dot, ".fdx"))) {
/* We found a file with name *.fdx, attempt to load it */
void *hdl, * ep;
int r;
snprintf(fullname + pathlen, sizeof(fullname) - pathlen, "%s", dp->d_name);
TRACE_DEBUG(INFO, "Extension: '%s'", dp->d_name);
......@@ -88,11 +87,9 @@ int main(int argc, char *argv[])
CHECK( 0, ep == NULL ? 1 : 0 );
/* Done, now unload */
r = dlclose(hdl);
if (r) {
TRACE_DEBUG(INFO, "Unable to dlclose '%s': %s.", fullname, dlerror());
}
CHECK( 0, r );
#ifndef SKIP_DLCLOSE
CHECK( 0, dlclose(hdl) );
#endif /* SKIP_DLCLOSE */
}
}
......
......@@ -109,7 +109,7 @@ static void * timeout_catch(void * arg)
{
int sig;
sigset_t ss;
fd_log_threadname ( "timeout catcher" );
fd_log_threadname ( "Test alarm catcher" );
sigemptyset(&ss);
sigaddset(&ss, SIGALRM);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment