diff options
author | Thynson <lanxingcan@gmail.com> | 2011-12-16 23:49:12 +0800 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-12-18 13:26:08 +0100 |
commit | 727d44ab2f9b67c5f6b59484b3016f1a44f93215 (patch) | |
tree | 15a1e776b525c1d63614c45fc16603e714008640 /plugins | |
parent | 8b7140f2a9b43e003152e73f69eca1468ba750bf (diff) |
lastfm: avoid corrupt if lastfm plugin is load twice
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/lastfm/lastfm.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/lastfm/lastfm.c b/plugins/lastfm/lastfm.c index 533c32e9..879de316 100644 --- a/plugins/lastfm/lastfm.c +++ b/plugins/lastfm/lastfm.c @@ -831,10 +831,9 @@ lfm_message (uint32_t id, uintptr_t ctx, uint32_t p1, uint32_t p2) { static int lastfm_start (void) { - lfm_sess[0] = 0; - lfm_mutex = 0; - lfm_cond = 9; - lfm_tid = 0; + if (lfm_mutex) { + return; + } lfm_stopthread = 0; lfm_mutex = deadbeef->mutex_create_nonrecursive (); lfm_cond = deadbeef->cond_create (); @@ -942,7 +941,7 @@ static DB_misc_t plugin = { .plugin.type = DB_PLUGIN_MISC, .plugin.name = "last.fm scrobbler", .plugin.descr = "Sends played songs information to your last.fm account, or other service that use AudioScrobbler protocol", - .plugin.copyright = + .plugin.copyright = "Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>\n" "\n" "This program is free software; you can redistribute it and/or\n" |