Skip to content

Commit

Permalink
Added fixes for jasson and longpoll fix (all by ArtForz)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lolcust committed Oct 1, 2011
1 parent de74557 commit b86916b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cpu-miner.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -783,7 +783,11 @@ static void parse_arg (int key, char *arg)
json_error_t err; json_error_t err;
if (opt_config) if (opt_config)
json_decref(opt_config); json_decref(opt_config);
#if JANSSON_VERSION_HEX >= 0x020000
opt_config = json_load_file(arg, 0, &err);
#else
opt_config = json_load_file(arg, &err); opt_config = json_load_file(arg, &err);
#endif
if (!json_is_object(opt_config)) { if (!json_is_object(opt_config)) {
applog(LOG_ERR, "JSON decode of %s failed", arg); applog(LOG_ERR, "JSON decode of %s failed", arg);
show_usage(); show_usage();
Expand Down
2 changes: 2 additions & 0 deletions scrypt.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -686,6 +686,8 @@ int scanhash_scrypt(int thr_id, unsigned char *pdata, unsigned char *scratchbuf,
uint32_t n = 0; uint32_t n = 0;
uint32_t Htarg = *(uint32_t *)(ptarget + 28); uint32_t Htarg = *(uint32_t *)(ptarget + 28);
int i; int i;

work_restart[thr_id].restart = 0;


for (i = 0; i < 80/4; i++) for (i = 0; i < 80/4; i++)
((uint32_t *)data)[i] = swab32(((uint32_t *)pdata)[i]); ((uint32_t *)data)[i] = swab32(((uint32_t *)pdata)[i]);
Expand Down

0 comments on commit b86916b

Please sign in to comment.