Commit 64c351e378be638e4f91411d4b8a3c840d2ec09e

Con Kolivas 2014-06-08T21:22:16

Merge branch 'master' of github.com:ckolivas/cgminer

diff --git a/01-cgminer.rules b/01-cgminer.rules
index 76f776e..b54984e 100644
--- a/01-cgminer.rules
+++ b/01-cgminer.rules
@@ -43,3 +43,6 @@ ATTRS{idVendor}=="4254", ATTRS{idProduct}=="4153", SUBSYSTEM=="usb", ACTION=="ad
 
 # Cointerra
 ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="0003", SUBSYSTEM=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
+
+# Drillbit Thumb
+ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2404", SUBSYSTEM=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
diff --git a/API-README b/API-README
index 835ab24..3cd2929 100644
--- a/API-README
+++ b/API-README
@@ -100,7 +100,7 @@ The STATUS section is:
    Standard long time of request in seconds
 
   Code=N
-   Each unique reply has a unigue Code (See api.c - #define MSG_NNNNNN)
+   Each unique reply has a unique Code (See api.c - #define MSG_NNNNNN)
 
   Msg=string
    Message matching the Code value N
diff --git a/driver-hashfast.c b/driver-hashfast.c
index 8227416..01083e5 100644
--- a/driver-hashfast.c
+++ b/driver-hashfast.c
@@ -1814,12 +1814,20 @@ static struct api_data *hfa_api_stats(struct cgpu_info *cgpu)
 	root = api_add_int(root, "max rx buf", &varint, true);
 
 	for (i = 0; i < info->asic_count; i++) {
-		struct hf_long_statistics *l = &info->die_statistics[i];
-		struct hf_g1_die_data *d = &info->die_status[i];
+		struct hf_long_statistics *l;
+		struct hf_g1_die_data *d;
 		char which[16];
 		double val;
 		int j;
 
+		if (!info->die_statistics || !info->die_status)
+			continue;
+		l = &info->die_statistics[i];
+		if (!l)
+			continue;
+		d = &info->die_status[i];
+		if (!d)
+			continue;
 		snprintf(which, sizeof(which), "Asic%d", i);
 
 		snprintf(buf, sizeof(buf), "%s hash clockrate", which);