Browse Source

Merge branches 'avalon-dev' and 'master' of github.com:ckolivas/cgminer

nfactor-troky
Con Kolivas 12 years ago
parent
commit
c17a175e17
  1. 4
      cgminer.c
  2. 4
      usbutils.c
  3. 2
      usbutils.h
  4. 8
      util.c

4
cgminer.c

@ -242,7 +242,7 @@ static char datestamp[40];
static char blocktime[32]; static char blocktime[32];
struct timeval block_timeval; struct timeval block_timeval;
static char best_share[8] = "0"; static char best_share[8] = "0";
double current_diff = 0xFFFFFFFFFFFFFFFF; double current_diff = 0xFFFFFFFFFFFFFFFFULL;
static char block_diff[8]; static char block_diff[8];
uint64_t best_diff = 0; uint64_t best_diff = 0;
@ -1123,7 +1123,7 @@ static struct opt_table opt_config_table[] = {
#ifdef USE_FPGA_SERIAL #ifdef USE_FPGA_SERIAL
OPT_WITH_ARG("--scan-serial|-S", OPT_WITH_ARG("--scan-serial|-S",
add_serial, NULL, NULL, add_serial, NULL, NULL,
"Serial port to probe for FPGA Mining device"), "Serial port to probe for Icarus FPGA Mining device"),
#endif #endif
OPT_WITH_ARG("--scan-time|-s", OPT_WITH_ARG("--scan-time|-s",
set_int_0_to_9999, opt_show_intval, &opt_scantime, set_int_0_to_9999, opt_show_intval, &opt_scantime,

4
usbutils.c

@ -294,6 +294,8 @@ static const char *C_REQUESTQUEJOB_S = "RequestQueJob";
static const char *C_REQUESTQUEJOBSTATUS_S = "RequestQueJobStatus"; static const char *C_REQUESTQUEJOBSTATUS_S = "RequestQueJobStatus";
static const char *C_QUEJOB_S = "QueJob"; static const char *C_QUEJOB_S = "QueJob";
static const char *C_QUEJOBSTATUS_S = "QueJobStatus"; static const char *C_QUEJOBSTATUS_S = "QueJobStatus";
static const char *C_QUEFLUSH_S = "QueFlush";
static const char *C_QUEFLUSHREPLY_S = "QueFlushReply";
#ifdef EOL #ifdef EOL
#undef EOL #undef EOL
@ -759,6 +761,8 @@ static void cgusb_check_init()
usb_commands[C_REQUESTQUEJOBSTATUS] = C_REQUESTQUEJOBSTATUS_S; usb_commands[C_REQUESTQUEJOBSTATUS] = C_REQUESTQUEJOBSTATUS_S;
usb_commands[C_QUEJOB] = C_QUEJOB_S; usb_commands[C_QUEJOB] = C_QUEJOB_S;
usb_commands[C_QUEJOBSTATUS] = C_QUEJOBSTATUS_S; usb_commands[C_QUEJOBSTATUS] = C_QUEJOBSTATUS_S;
usb_commands[C_QUEFLUSH] = C_QUEFLUSH_S;
usb_commands[C_QUEFLUSHREPLY] = C_QUEFLUSHREPLY_S;
stats_initialised = true; stats_initialised = true;
} }

2
usbutils.h

@ -131,6 +131,8 @@ enum usb_cmds {
C_REQUESTQUEJOBSTATUS, C_REQUESTQUEJOBSTATUS,
C_QUEJOB, C_QUEJOB,
C_QUEJOBSTATUS, C_QUEJOBSTATUS,
C_QUEFLUSH,
C_QUEFLUSHREPLY,
C_MAX C_MAX
}; };

8
util.c

@ -1429,8 +1429,14 @@ static bool setup_stratum_curl(struct pool *pool)
mutex_lock(&pool->stratum_lock); mutex_lock(&pool->stratum_lock);
pool->stratum_active = false; pool->stratum_active = false;
if (pool->stratum_curl) if (pool->stratum_curl) {
#if CURL_HAS_KEEPALIVE
curl_easy_cleanup(pool->stratum_curl); curl_easy_cleanup(pool->stratum_curl);
#else
/* See above in suspend_stratum */
CLOSESOCKET(pool->sock);
#endif
}
pool->stratum_curl = curl_easy_init(); pool->stratum_curl = curl_easy_init();
if (unlikely(!pool->stratum_curl)) if (unlikely(!pool->stratum_curl))
quit(1, "Failed to curl_easy_init in initiate_stratum"); quit(1, "Failed to curl_easy_init in initiate_stratum");

Loading…
Cancel
Save