Commit b948669a4f9af15073c0ae359229a55b6b51a553

Con Kolivas 2013-04-15T11:13:48

Avoid applog while ch_lock is held.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/cgminer.c b/cgminer.c
index bbba3a1..c1a44db 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -3588,8 +3588,9 @@ static void set_curblock(char *hexstr, unsigned char *hash)
 	free(current_fullhash);
 	current_fullhash = bin2hex(block_hash_swap, 32);
 	get_timestamp(blocktime, &block_timeval);
-	applog(LOG_INFO, "New block: %s... diff %s", current_hash, block_diff);
 	cg_wunlock(&ch_lock);
+
+	applog(LOG_INFO, "New block: %s... diff %s", current_hash, block_diff);
 }
 
 /* Search to see if this string is from a block that has been seen before */