1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-22 20:44:19 +00:00

Add more debugging to avalon reads.

This commit is contained in:
Con Kolivas 2013-05-26 01:24:14 +10:00
parent ab73935875
commit b6b1abb5d9

View File

@ -627,7 +627,8 @@ static void avalon_parse_results(struct cgpu_info *avalon, struct avalon_info *i
struct work *work;
ar = (struct avalon_result *)&buf[i];
if ((work = avalon_valid_result(avalon, ar)) != NULL) {
work = avalon_valid_result(avalon, ar);
if (work) {
bool gettemp = false;
found = true;
@ -651,6 +652,7 @@ static void avalon_parse_results(struct cgpu_info *avalon, struct avalon_info *i
spare = *offset - AVALON_READ_SIZE - 1;
else
spare = AVALON_READ_SIZE + i;
applog(LOG_WARNING, "Avalon: Discarding %d bytes from buffer", spare);
*offset -= spare;
memmove(buf, buf + spare, *offset);
if (!found) {
@ -703,6 +705,11 @@ static void *avalon_get_results(void *userdata)
continue;
}
if (opt_debug) {
applog(LOG_DEBUG, "Avalon: get:");
hexdump((uint8_t *)buf, ret);
}
memcpy(&readbuf[offset], buf, ret);
offset += ret;