Browse Source

Only reconnect authorised clients

master
Con Kolivas 10 years ago
parent
commit
f31980b9d0
  1. 4
      src/stratifier.c

4
src/stratifier.c

@ -1344,6 +1344,8 @@ static void reconnect_clients(sdata_t *sdata)
ck_rlock(&sdata->instance_lock); ck_rlock(&sdata->instance_lock);
HASH_ITER(hh, sdata->stratum_instances, client, tmpclient) { HASH_ITER(hh, sdata->stratum_instances, client, tmpclient) {
if (!client->authorised)
continue;
/* This client is bound to a user proxy */ /* This client is bound to a user proxy */
if (client->sdata && client->sdata->proxy && client->sdata->proxy->userid) if (client->sdata && client->sdata->proxy && client->sdata->proxy->userid)
continue; continue;
@ -1584,6 +1586,8 @@ static void check_userproxies(sdata_t *sdata, const int userid)
ck_rlock(&sdata->instance_lock); ck_rlock(&sdata->instance_lock);
HASH_ITER(hh, sdata->stratum_instances, client, tmpclient) { HASH_ITER(hh, sdata->stratum_instances, client, tmpclient) {
if (!client->authorised)
continue;
if (client->user_id != userid) if (client->user_id != userid)
continue; continue;
if (client->sdata && client->sdata->proxy && client->sdata->proxy->userid == userid) if (client->sdata && client->sdata->proxy && client->sdata->proxy->userid == userid)

Loading…
Cancel
Save