Browse Source

ckdb - give workinfo (and others) separate cmd values

master
kanoi 8 years ago
parent
commit
2e88c53c70
  1. 15
      src/ckdb.c
  2. 7
      src/ckdb.h
  3. 8
      src/ckdb_cmd.c

15
src/ckdb.c

@ -6121,7 +6121,10 @@ static void *process_socket(__maybe_unused void *arg)
case CMD_AUTH: case CMD_AUTH:
case CMD_ADDRAUTH: case CMD_ADDRAUTH:
case CMD_HEARTBEAT: case CMD_HEARTBEAT:
case CMD_SHARELOG: case CMD_WORKINFO:
case CMD_SHARES:
case CMD_SHAREERRORS:
case CMD_AGEWORKINFO:
case CMD_POOLSTAT: case CMD_POOLSTAT:
case CMD_USERSTAT: case CMD_USERSTAT:
case CMD_WORKERSTAT: case CMD_WORKERSTAT:
@ -6399,7 +6402,10 @@ static void *process_socket(__maybe_unused void *arg)
FREENULL(ans); FREENULL(ans);
replied = true; replied = true;
// Always queue (ok.queued) // Always queue (ok.queued)
case CMD_SHARELOG: case CMD_WORKINFO:
case CMD_SHARES:
case CMD_SHAREERRORS:
case CMD_AGEWORKINFO:
case CMD_POOLSTAT: case CMD_POOLSTAT:
case CMD_USERSTAT: case CMD_USERSTAT:
case CMD_WORKERSTAT: case CMD_WORKERSTAT:
@ -6799,7 +6805,10 @@ static void process_reload_item(PGconn *conn, K_ITEM *bq_item)
case CMD_ADDRAUTH: case CMD_ADDRAUTH:
if (confirm_sharesummary) if (confirm_sharesummary)
break; break;
case CMD_SHARELOG: case CMD_WORKINFO:
case CMD_SHARES:
case CMD_SHAREERRORS:
case CMD_AGEWORKINFO:
// This will return the same cmdnum or DUP // This will return the same cmdnum or DUP
cmdnum = process_seq(msgline); cmdnum = process_seq(msgline);
if (cmdnum != CMD_DUPSEQ) { if (cmdnum != CMD_DUPSEQ) {

7
src/ckdb.h

@ -58,7 +58,7 @@
#define DB_VLOCK "1" #define DB_VLOCK "1"
#define DB_VERSION "1.0.7" #define DB_VERSION "1.0.7"
#define CKDB_VERSION DB_VERSION"-2.436" #define CKDB_VERSION DB_VERSION"-2.437"
#define WHERE_FFL " - from %s %s() line %d" #define WHERE_FFL " - from %s %s() line %d"
#define WHERE_FFL_HERE __FILE__, __func__, __LINE__ #define WHERE_FFL_HERE __FILE__, __func__, __LINE__
@ -677,7 +677,10 @@ enum cmd_values {
CMD_VERSION, CMD_VERSION,
CMD_LOGLEVEL, CMD_LOGLEVEL,
CMD_FLUSH, CMD_FLUSH,
CMD_SHARELOG, CMD_WORKINFO,
CMD_SHARES,
CMD_SHAREERRORS,
CMD_AGEWORKINFO,
CMD_AUTH, CMD_AUTH,
CMD_ADDRAUTH, CMD_ADDRAUTH,
CMD_ADDUSER, CMD_ADDUSER,

8
src/ckdb_cmd.c

@ -8448,10 +8448,10 @@ struct CMDS ckdb_cmds[] = {
{ CMD_VERSION, "version", true, false, NULL, SEQ_NONE, ACCESS_SYSTEM | ACCESS_WEB }, { CMD_VERSION, "version", true, false, NULL, SEQ_NONE, ACCESS_SYSTEM | ACCESS_WEB },
{ CMD_LOGLEVEL, "loglevel", true, false, NULL, SEQ_NONE, ACCESS_SYSTEM }, { CMD_LOGLEVEL, "loglevel", true, false, NULL, SEQ_NONE, ACCESS_SYSTEM },
{ CMD_FLUSH, "flush", true, false, NULL, SEQ_NONE, ACCESS_SYSTEM }, { CMD_FLUSH, "flush", true, false, NULL, SEQ_NONE, ACCESS_SYSTEM },
{ CMD_SHARELOG, STR_WORKINFO, false, true, cmd_sharelog, SEQ_WORKINFO, ACCESS_POOL }, { CMD_WORKINFO, STR_WORKINFO, false, true, cmd_sharelog, SEQ_WORKINFO, ACCESS_POOL },
{ CMD_SHARELOG, STR_SHARES, false, true, cmd_sharelog, SEQ_SHARES, ACCESS_POOL }, { CMD_SHARES, STR_SHARES, false, true, cmd_sharelog, SEQ_SHARES, ACCESS_POOL },
{ CMD_SHARELOG, STR_SHAREERRORS,false, true, cmd_sharelog, SEQ_SHAREERRORS,ACCESS_POOL }, { CMD_SHAREERRORS,STR_SHAREERRORS,false,true, cmd_sharelog, SEQ_SHAREERRORS,ACCESS_POOL },
{ CMD_SHARELOG, STR_AGEWORKINFO,false, true, cmd_sharelog, SEQ_AGEWORKINFO,ACCESS_POOL }, { CMD_AGEWORKINFO,STR_AGEWORKINFO,false,true, cmd_sharelog, SEQ_AGEWORKINFO,ACCESS_POOL },
{ CMD_AUTH, "authorise", false, true, cmd_auth, SEQ_AUTH, ACCESS_POOL }, { CMD_AUTH, "authorise", false, true, cmd_auth, SEQ_AUTH, ACCESS_POOL },
{ CMD_ADDRAUTH, "addrauth", false, true, cmd_addrauth, SEQ_ADDRAUTH, ACCESS_POOL }, { CMD_ADDRAUTH, "addrauth", false, true, cmd_addrauth, SEQ_ADDRAUTH, ACCESS_POOL },
{ CMD_HEARTBEAT,"heartbeat", false, true, cmd_heartbeat, SEQ_HEARTBEAT, ACCESS_POOL }, { CMD_HEARTBEAT,"heartbeat", false, true, cmd_heartbeat, SEQ_HEARTBEAT, ACCESS_POOL },

Loading…
Cancel
Save