diff options
author | waker <wakeroid@gmail.com> | 2010-10-24 09:45:37 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2010-11-14 19:30:26 +0100 |
commit | 2c2b62a0f140221dec44d31d6d04816f3cea4f3f (patch) | |
tree | ae616a690ce7d034df1932c75f4ff8e736ba4dd6 | |
parent | 66ba08512d156c4eba0ebdd8e173cb53540d3ec3 (diff) |
fixed notify plugin to use deadbeef threading API
-rw-r--r-- | plugins/notify/notify.c | 8 |
1 files 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); } |