#if defined(XMMS) || defined(BMP) || defined(AUDACIOUS)
void check_dlerror(void)
{
- const char *error;
+ static const char *error;
if ((error = dlerror()) != NULL) {
ERR("error grabbing function symbol");
check_dlerror();
xmms_remote_is_paused = dlsym(handle, "xmms_remote_is_paused");
- if ((error = dlerror()) != NULL) {
- ERR("error grabbing function symbol");
- pthread_exit(NULL);
- }
+ check_dlerror();
+
xmms_remote_is_playing = dlsym(handle, "xmms_remote_is_playing");
- if ((error = dlerror()) != NULL) {
- ERR("error grabbing function symbol");
- pthread_exit(NULL);
- }
+ check_dlerror();
+
xmms_remote_get_playlist_pos = dlsym(handle, "xmms_remote_get_playlist_pos");
- if ((error = dlerror()) != NULL) {
- ERR("error grabbing function symbol");
- pthread_exit(NULL);
- }
+ check_dlerror();
+
xmms_remote_get_playlist_title = dlsym(handle, "xmms_remote_get_playlist_title");
- if ((error = dlerror()) != NULL) {
- ERR("error grabbing function symbol");
- pthread_exit(NULL);
- }
+ check_dlerror();
+
xmms_remote_get_playlist_time = dlsym(handle, "xmms_remote_get_playlist_time");
- if ((error = dlerror()) != NULL) {
- ERR("error grabbing function symbol");
- pthread_exit(NULL);
- }
+ check_dlerror();
+
xmms_remote_get_output_time = dlsym(handle, "xmms_remote_get_output_time");
- if ((error = dlerror()) != NULL) {
- ERR("error grabbing function symbol");
- pthread_exit(NULL);
- }
+ check_dlerror();
+
xmms_remote_get_info = dlsym(handle, "xmms_remote_get_info");
- if ((error = dlerror()) != NULL) {
- ERR("error grabbing function symbol");
- pthread_exit(NULL);
- }
+
xmms_remote_get_playlist_file = dlsym(handle, "xmms_remote_get_playlist_file");
- if ((error = dlerror()) != NULL) {
- ERR("error grabbing function symbol");
- pthread_exit(NULL);
- }
+ check_dlerror();
+
xmms_remote_get_playlist_length = dlsym(handle, "xmms_remote_get_playlist_length");
- if ((error = dlerror()) != NULL) {
- ERR("error grabbing function symbol");
- pthread_exit(NULL);
- }
+ check_dlerror();
/* Grab the runnable signal. Should be non-zero here or we do nothing. */
pthread_mutex_lock(&info.xmms.runnable_mutex);