summaryrefslogtreecommitdiff
path: root/plugins/lastfm
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-28 20:25:22 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-28 20:25:22 +0100
commit11af0fd25871ee652bf92eaeeb50c66af75d01d3 (patch)
tree6701f3dfa58b81bacf5c786e10b0aabb3251ddee /plugins/lastfm
parentf7625e7d59e4807221f864e2ec9f2d09df4f4b37 (diff)
don't try to auth with lastfm on empty login/password
Diffstat (limited to 'plugins/lastfm')
-rw-r--r--plugins/lastfm/lastfm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/lastfm/lastfm.c b/plugins/lastfm/lastfm.c
index 3a8de2c0..d188c5e6 100644
--- a/plugins/lastfm/lastfm.c
+++ b/plugins/lastfm/lastfm.c
@@ -23,8 +23,8 @@
#include <curl/curl.h>
#include "../../deadbeef.h"
-//#define trace(...) { fprintf(stderr, __VA_ARGS__); }
-#define trace(fmt,...)
+#define trace(...) { fprintf(stderr, __VA_ARGS__); }
+//#define trace(fmt,...)
#define LFM_TESTMODE 0
#define LFM_IGNORE_RULES 0
@@ -180,6 +180,9 @@ auth (void) {
if (lfm_sess[0]) {
return 0;
}
+ if (!lfm_user[0] || !lfm_pass[0]) {
+ return -1;
+ }
char req[4096];
time_t timestamp = time(NULL);
uint8_t sig[16];