mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-14 16:58:05 +00:00
API support new pool status
This commit is contained in:
parent
4987958e6a
commit
a8619ad6f7
15
api.c
15
api.c
@ -164,6 +164,8 @@ static const char *SICK = "Sick";
|
|||||||
static const char *NOSTART = "NoStart";
|
static const char *NOSTART = "NoStart";
|
||||||
static const char *DISABLED = "Disabled";
|
static const char *DISABLED = "Disabled";
|
||||||
static const char *ALIVE = "Alive";
|
static const char *ALIVE = "Alive";
|
||||||
|
static const char *REJECTING = "Rejecting";
|
||||||
|
static const char *UNKNOWN = "Unknown";
|
||||||
#define _DYNAMIC "D"
|
#define _DYNAMIC "D"
|
||||||
static const char *DYNAMIC = _DYNAMIC;
|
static const char *DYNAMIC = _DYNAMIC;
|
||||||
|
|
||||||
@ -1203,13 +1205,22 @@ static void poolstatus(__maybe_unused SOCKETTYPE c, __maybe_unused char *param,
|
|||||||
for (i = 0; i < total_pools; i++) {
|
for (i = 0; i < total_pools; i++) {
|
||||||
struct pool *pool = pools[i];
|
struct pool *pool = pools[i];
|
||||||
|
|
||||||
if (!pool->enabled)
|
switch (pool->enabled) {
|
||||||
|
case POOL_DISABLED:
|
||||||
status = (char *)DISABLED;
|
status = (char *)DISABLED;
|
||||||
else {
|
break;
|
||||||
|
case POOL_REJECTING:
|
||||||
|
status = (char *)REJECTING;
|
||||||
|
break;
|
||||||
|
case POOL_ENABLED:
|
||||||
if (pool->idle)
|
if (pool->idle)
|
||||||
status = (char *)DEAD;
|
status = (char *)DEAD;
|
||||||
else
|
else
|
||||||
status = (char *)ALIVE;
|
status = (char *)ALIVE;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
status = (char *)UNKNOWN;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pool->hdr_path)
|
if (pool->hdr_path)
|
||||||
|
Loading…
Reference in New Issue
Block a user