From 2c2b62a0f140221dec44d31d6d04816f3cea4f3f Mon Sep 17 00:00:00 2001 From: waker Date: Sun, 24 Oct 2010 09:45:37 +0200 Subject: fixed notify plugin to use deadbeef threading API --- plugins/notify/notify.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/notify/notify.c b/plugins/notify/notify.c index 5667b6fe..196a0e76 100644 --- a/plugins/notify/notify.c +++ b/plugins/notify/notify.c @@ -47,7 +47,7 @@ notify_thread (void *ctx) { fprintf(stderr, "connection failed: %s",error.message); dbus_error_free(&error); dbus_message_unref (msg); - pthread_exit(); + deadbeef->thread_exit(NULL); } reply = dbus_connection_send_with_reply_and_block (conn, msg, -1, &error); @@ -55,7 +55,7 @@ notify_thread (void *ctx) { fprintf(stderr, "send_with_reply_and_block error: (%s)\n", error.message); dbus_error_free(&error); dbus_message_unref (msg); - pthread_exit(); + deadbeef->thread_exit(NULL); } if (reply != NULL) { @@ -80,7 +80,7 @@ notify_thread (void *ctx) { dbus_message_unref (msg); dbus_connection_unref (conn); - pthread_exit(); + deadbeef->thread_exit(NULL); } @@ -221,7 +221,7 @@ on_songchanged (DB_event_trackchange_t *ev, uintptr_t data) { intptr_t tid = NULL; if ((tid=deadbeef->thread_start(notify_thread, msg)) != 0) { dbus_message_ref (msg); - pthread_detach (tid); + deadbeef->thread_detach (tid); } dbus_message_unref (msg); } -- cgit v1.2.3