Skip to content
Snippets Groups Projects
Commit aadcbdd5 authored by Suru Dissanaike's avatar Suru Dissanaike
Browse files

Merge branch 'devel' into 'master'

ubus_api_validator: refactor pass/fail

See merge request !2
parents 1a89e2da 8a8dc412
No related branches found
No related tags found
1 merge request!2ubus_api_validator: refactor pass/fail
......@@ -80,7 +80,7 @@ static int validate_jobj(struct json_object *jobj) {
const char *defstr = "no result";
int rv = 0;
int rv_validation = 0;
int rv_validation = 1;
char *format = NULL;
tmp = json_object_array_get_idx(ubus_methods, i);
......@@ -119,12 +119,12 @@ static int validate_jobj(struct json_object *jobj) {
}
}
if (!rv_validation || rc != res->rc) {
if (rv_validation && rc == res->rc)
ok(true, format);
else {
ok(false, format);
failed = 1;
} else
ok(true, format);
}
free(res);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment