osrfLogInfo( OSRF_LOG_MARK, "Registering application %s with file %s", appName, soFile );
+ dlerror(); // clear any existing errors
+
// Open the shared object.
void* handle = dlopen( soFile, RTLD_NOW );
if( ! handle ) {
// Add the newly-constructed app to the list.
osrfHashSet( _osrfAppHash, app, appName );
+ dlerror(); // clear any existing errors
+
// Try to run the initialize method. Typically it will register one or more
// methods of the application.
int (*init) (void);
/* see if we can run the initialize method */
char* error;
void (*onExit) (void);
+ dlerror(); // clear any existing errors
+
*(void **) (&onExit) = dlsym(app->handle, "osrfAppChildExit");
if( (error = dlerror()) != NULL ) {
char* error;
int ret;
int (*childInit) (void);
+ dlerror(); // clear any existing errors
*(void**) (&childInit) = dlsym(app->handle, "osrfAppChildInit");
// Function pointer through which we will call the function dynamically
int (*meth) (osrfMethodContext*);
+ dlerror(); // clear any existing errors
// Open the function that implements the method
meth = dlsym(app->handle, method->symbol);