Browse Source

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.
refactor
Noel Maersk 11 years ago
parent
commit
9aaff8ccf5
  1. 6
      api.c

6
api.c

@ -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);

Loading…
Cancel
Save