From 9aaff8ccf5132a8b349bf550e6bed50b0faf242c Mon Sep 17 00:00:00 2001 From: Noel Maersk Date: Fri, 11 Apr 2014 15:17:42 +0300 Subject: [PATCH] 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. --- api.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api.c b/api.c index d2893fa3..7a738ce2 100644 --- a/api.c +++ b/api.c @@ -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, *pass = buf; copyadvanceafter(',', ¶m, &buf); - if (!*param) // missing name - goto exitsama; + if (!*param) // missing name (allowed) + return true; *name = buf; copyadvanceafter(',', ¶m, &buf);