Commit f6d35a70a88422e92cf2b8e80cb6fe335f2029d2

Con Kolivas 2011-09-27T17:52:54

Must initialise the donorpool mutex or it fails on windows.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/main.c b/main.c
index a045af6..4d0145f 100644
--- a/main.c
+++ b/main.c
@@ -5583,6 +5583,8 @@ int main (int argc, char *argv[])
 		if (!get_dondata(&donationpool.rpc_url, &donationpool.rpc_userpass))
 			opt_donation = 0.0;
 		else {
+			if (unlikely(pthread_mutex_init(&donationpool.pool_lock, NULL)))
+				quit (1, "Failed to pthread_mutex_init in add donpool");
 			donationpool.enabled = true;
 			donationpool.pool_no = MAX_POOLS;
 			if (!pool_active(&donationpool, false))