MXS-1220: Unify resource member naming
All resoures now use the `state` member to describe their internal state. This includes servers, services and monitors. This means that the `status` keyword can be reserved for something else and it can be removed until it is needed again. Changed the module maturity field to `maturity` to better describe its purpose.
This commit is contained in:
@ -156,8 +156,19 @@ json_t* mxs_json_self_link(const char* host, const char* path, const char* id)
|
||||
return links;
|
||||
}
|
||||
|
||||
json_t* mxs_json_error(const char* message)
|
||||
json_t* mxs_json_error(const char* format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start(args, format);
|
||||
int len = vsnprintf(NULL, 0, format, args);
|
||||
va_end(args);
|
||||
|
||||
char message[len + 1];
|
||||
va_start(args, format);
|
||||
vsnprintf(message, sizeof(message), format, args);
|
||||
va_end(args);
|
||||
|
||||
json_t* err = json_object();
|
||||
json_object_set_new(err, "detail", json_string(message));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user