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

Loading…
Cancel
Save