1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-02-02 10:04:33 +00:00

api: bump version, but allow name/desc/algo to be missing when adding pool details.

This will have unintended consequences, since API clients are sure to
send pool details without name/desc/algo. pooldetails() will allow them
to do that, and add_pool_details() will fill the pool structure with
NULLs.
This commit is contained in:
Noel Maersk 2014-04-11 15:17:42 +03:00
parent 3c3a58475e
commit 9aaff8ccf5

6
api.c
View File

@ -124,7 +124,7 @@ static const char GPUSEP = ',';
#define JOIN_CMD "CMD=" #define JOIN_CMD "CMD="
#define BETWEEN_JOIN SEPSTR #define BETWEEN_JOIN SEPSTR
static const char *APIVERSION = "3.1"; static const char *APIVERSION = "3.2";
static const char *DEAD = "Dead"; static const char *DEAD = "Dead";
static const char *SICK = "Sick"; static const char *SICK = "Sick";
static const char *NOSTART = "NoStart"; static const char *NOSTART = "NoStart";
@ -2133,8 +2133,8 @@ static bool pooldetails(char *param, char **url, char **user, char **pass,
*pass = buf; *pass = buf;
copyadvanceafter(',', &param, &buf); copyadvanceafter(',', &param, &buf);
if (!*param) // missing name if (!*param) // missing name (allowed)
goto exitsama; return true;
*name = buf; *name = buf;
copyadvanceafter(',', &param, &buf); copyadvanceafter(',', &param, &buf);