Commit 8faf3c90b8525fbd242fac69196a32993ba6f808

Con Kolivas 2012-06-16T09:22:11

Fix openwrt crashing on regeneratehash() by making check_solve a noop.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/cgminer.c b/cgminer.c
index 81e29ec..f48eff3 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -2178,6 +2178,8 @@ static bool stale_work(struct work *work, bool share)
 
 static void check_solve(struct work *work)
 {
+#ifndef MIPSEB
+	/* This segfaults on openwrt */
 	work->block = regeneratehash(work);
 	if (unlikely(work->block)) {
 		work->pool->solved++;
@@ -2185,6 +2187,7 @@ static void check_solve(struct work *work)
 		work->mandatory = true;
 		applog(LOG_NOTICE, "Found block for pool %d!", work->pool);
 	}
+#endif
 }
 
 static void *submit_work_thread(void *userdata)