changeset 348:314b7ac7f771 trunk

[svn] - handle no account data gracefully (e.g. you only use one of the multiple services available now)
author nenolod
date Sat, 09 Dec 2006 02:43:27 -0800
parents f1b620b679b1
children 8879027752ef
files ChangeLog src/scrobbler/gerpok.c src/scrobbler/scrobbler.c
diffstat 3 files changed, 18 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Dec 09 02:36:47 2006 -0800
+++ b/ChangeLog	Sat Dec 09 02:43:27 2006 -0800
@@ -1,3 +1,11 @@
+2006-12-09 10:36:47 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [758]
+  - make sure username is NULL
+  
+  trunk/src/scrobbler/configure.c |    1 +
+  1 file changed, 1 insertion(+)
+
+
 2006-12-09 03:34:32 +0000  William Pitcock <nenolod@nenolod.net>
   revision [756]
   - rename plugin glue to plugin.c
--- a/src/scrobbler/gerpok.c	Sat Dec 09 02:36:47 2006 -0800
+++ b/src/scrobbler/gerpok.c	Sat Dec 09 02:43:27 2006 -0800
@@ -38,8 +38,8 @@
 		gerpok_sc_major_error_present;
 
 static char 	*gerpok_sc_submit_url,
-		*gerpok_sc_username,
-		*gerpok_sc_password,
+		*gerpok_sc_username = NULL,
+		*gerpok_sc_password = NULL,
 		*gerpok_sc_challenge_hash,
 		gerpok_sc_response_hash[33],
 		*gerpok_sc_srv_res,
@@ -871,6 +871,9 @@
 {
 	int wait;
 
+	if (!gerpok_sc_username || !gerpok_sc_password)
+		return;
+
 	if (gerpok_sc_hs_status)
 		return;
 	if (gerpok_sc_hs_timeout < time(NULL))
--- a/src/scrobbler/scrobbler.c	Sat Dec 09 02:36:47 2006 -0800
+++ b/src/scrobbler/scrobbler.c	Sat Dec 09 02:43:27 2006 -0800
@@ -37,8 +37,8 @@
 		sc_major_error_present;
 
 static char 	*sc_submit_url,
-		*sc_username,
-		*sc_password,
+		*sc_username = NULL,
+		*sc_password = NULL,
 		*sc_challenge_hash,
 		sc_response_hash[33],
 		*sc_srv_res,
@@ -870,6 +870,9 @@
 {
 	int wait;
 
+	if (!sc_username || !sc_password)
+		return;
+
 	if (sc_hs_status)
 		return;
 	if (sc_hs_timeout < time(NULL))