Skip to content

Commit

Permalink
increase the max password len to 384
Browse files Browse the repository at this point in the history
and handle the benchmark yiimp guest user for stats
  • Loading branch information
tpruvot committed May 18, 2016
1 parent 710d929 commit 4a8e3d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions miner.h
Original file line number Diff line number Diff line change
Expand Up @@ -668,10 +668,10 @@ struct pool_infos {
int algo;
char name[64];
// credentials
char url[256];
char url[512];
char short_url[64];
char user[64];
char pass[128];
char pass[384];
// config options
double max_diff;
double max_rate;
Expand Down
2 changes: 1 addition & 1 deletion pools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ bool pool_switch(int thr_id, int pooln)
want_stratum = have_stratum = (p->type & POOL_STRATUM) != 0;

// yiimp stats reporting
opt_stratum_stats = (strstr(p->pass, "stats") != NULL) || (strcmp(p->user, "test") == 0);
opt_stratum_stats = (strstr(p->pass, "stats") != NULL) || (strcmp(p->user, "benchmark") == 0);

pthread_mutex_unlock(&stratum_work_lock);

Expand Down
4 changes: 2 additions & 2 deletions util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ static json_t *json_rpc_call(CURL *curl, const char *url,
json_t *json_rpc_call_pool(CURL *curl, struct pool_infos *pool, const char *req,
bool longpoll_scan, bool longpoll, int *curl_err)
{
char userpass[256];
char userpass[512];
// todo, malloc and store that in pool array
snprintf(userpass, sizeof(userpass), "%s%c%s", pool->user,
strlen(pool->pass)?':':'\0', pool->pass);
Expand All @@ -625,7 +625,7 @@ json_t *json_rpc_call_pool(CURL *curl, struct pool_infos *pool, const char *req,
/* called only from longpoll thread, we have the lp_url */
json_t *json_rpc_longpoll(CURL *curl, char *lp_url, struct pool_infos *pool, const char *req, int *curl_err)
{
char userpass[256];
char userpass[512];
snprintf(userpass, sizeof(userpass), "%s%c%s", pool->user,
strlen(pool->pass)?':':'\0', pool->pass);

Expand Down

0 comments on commit 4a8e3d9

Please sign in to comment.