Browse Source

Merge commit 'a3bbe0e' into cg_merges_20130524b

Conflicts:
	miner.c
Luke Dashjr 12 years ago
parent
commit
225ba8d527
1 changed files with 5 additions and 1 deletions
  1. 5 1
      deviceapi.c

+ 5 - 1
deviceapi.c

@@ -580,7 +580,7 @@ out:
 	return NULL;
 	return NULL;
 }
 }
 
 
-bool add_cgpu(struct cgpu_info*cgpu)
+bool add_cgpu(struct cgpu_info *cgpu)
 {
 {
 	int lpcount;
 	int lpcount;
 	
 	
@@ -632,6 +632,10 @@ bool add_cgpu(struct cgpu_info*cgpu)
 	}
 	}
 	
 	
 	wr_unlock(&devices_lock);
 	wr_unlock(&devices_lock);
+
+	mutex_lock(&stats_lock);
+	cgpu->last_device_valid_work = time(NULL);
+	mutex_unlock(&stats_lock);
 	
 	
 	return true;
 	return true;
 }
 }