Merge branch 'master' into usb-dev
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
diff --git a/API.class b/API.class
old mode 100755
new mode 100644
Binary files a/API.class and b/API.class differ
diff --git a/NEWS b/NEWS
index 10a36aa..920aedb 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,25 @@
+Version 2.10.5 - February 7, 2013
+
+- Fix logic fail on partial writes with stratum send that was leading to corrupt
+message submissions.
+- Do not consider every call to stratum_resumed a pool recovery unless it was
+actually idle.
+- Do not enable the pool disable on reject feature unless explicitly enabled
+with --disable-rejecting.
+- Stratum disconnect shares - count total against stale
+- Use sanity checking to prevent a possible overflow with invalid data being
+given by the pool for difficulty as reported by luke-Jr.
+- Check for calloc failure for completeness in gen_stratum_work.
+- Cache the coinbase length to speed up stratum work generation.
+- Cache the header length when generating stratum work to avoid calculating it
+on every work generation, and to only need one alloc+sprintf, speeding up work
+generation.
+- Use heap ram for coinbase in gen_stratum_work, zeroing it before use.
+- Provide a wrapper for aligning lengths of size_t to 4 byte boundaries.
+- Fix memory leak on stratum share submission.
+- Zero the best share string memory when zeroing stats.
+
+
Version 2.10.4 - December 29, 2012
- Change the pool stratum socket buffer to be dynamically allocated to
diff --git a/api-example.c b/api-example.c
old mode 100755
new mode 100644
diff --git a/cgminer.c b/cgminer.c
index 6085b2a..dfa22ab 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -4698,9 +4698,10 @@ static void stratum_resumed(struct pool *pool)
{
if (!pool->stratum_notify)
return;
- applog(LOG_INFO, "Stratum connection to pool %d resumed", pool->pool_no);
- pool_tclear(pool, &pool->idle);
- pool_resus(pool);
+ if (pool_tclear(pool, &pool->idle)) {
+ applog(LOG_INFO, "Stratum connection to pool %d resumed", pool->pool_no);
+ pool_resus(pool);
+ }
}
/* One stratum thread per pool that has stratum waits on the socket checking
diff --git a/configure.ac b/configure.ac
index 72b8f14..6caa382 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
m4_define([v_maj], [2])
m4_define([v_min], [10])
-m4_define([v_mic], [4])
+m4_define([v_mic], [5])
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
m4_define([v_ver], [v_maj.v_min.v_mic])
m4_define([lt_rev], m4_eval(v_maj + v_min))
diff --git a/util.c b/util.c
index ba2f470..555e709 100644
--- a/util.c
+++ b/util.c
@@ -932,7 +932,7 @@ static bool __stratum_send(struct pool *pool, char *s, ssize_t len)
sent = 0;
}
ssent += sent;
- len -= ssent;
+ len -= sent;
}
pool->cgminer_pool_stats.times_sent++;