Browse Source

Merge commit 'bf3e158' into bfgminer

Luke Dashjr 13 years ago
parent
commit
9f5d8dda35
2 changed files with 10 additions and 2 deletions
  1. 2 2
      miner.c
  2. 8 0
      miner.php

+ 2 - 2
miner.c

@@ -3850,7 +3850,7 @@ void *miner_thread(void *userdata)
 	struct timeval getwork_start;
 
 	/* Try to cycle approximately 5 times before each log update */
-	const unsigned long cycle = opt_log_interval / 5 ? : 1;
+	const long cycle = opt_log_interval / 5 ? : 1;
 	struct timeval tv_start, tv_end, tv_workstart, tv_lastupdate;
 	struct timeval diff, sdiff, wdiff;
 	uint32_t max_nonce = api->can_limit_work ? api->can_limit_work(mythr) : 0xffffffff;
@@ -3993,7 +3993,7 @@ void *miner_thread(void *userdata)
 				}
 			}
 
-			if (unlikely(sdiff.tv_sec < cycle)) {
+			if (unlikely((long)sdiff.tv_sec < cycle)) {
 				if (likely(!api->can_limit_work || max_nonce == 0xffffffff))
 					continue;
 

+ 8 - 0
miner.php

@@ -60,6 +60,14 @@ $warnfont = '<font color=red><b>';
 $warnoff = '</b></font>';
 $dfmt = 'H:i:s j-M-Y \U\T\CP';
 #
+# This below allows you to put your own settings into a seperate file
+# so you don't need to update miner.php with your preferred settings
+# every time a new version is released
+# Just create the file 'myminer.php' in the same directory as
+# 'miner.php' - and put your own settings in there
+if (file_exists('myminer.php'))
+ include_once('myminer.php');
+#
 # Ensure it is only ever shown once
 global $showndate;
 $showndate = false;