summaryrefslogtreecommitdiff
blob: e61fb900c42d06d7ddec590f86c4b7bb683d707a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- orig/scrobbler.c
+++ mod/scrobbler.c
@@ -488,6 +488,7 @@
 {
 	GString *submitentry;
 	int nsubmit;
+	int i;
 	int wait;
 
 	if(sc_submit_timeout < time(NULL) && sc_bad_users < 3)
@@ -512,7 +513,12 @@
 				pthread_mutex_lock(&mutex);
 
 #ifdef ALLOW_MULTIPLE
-				q_free();
+				if (nsubmit < q_len()) {
+					for (i=0; i<nsubmit; i++)
+						q_get();
+				} else {
+					q_free();
+				}
 #else
 				q_get();
 #endif