mirror of
https://github.com/falk-werner/webfuse-provider
synced 2024-10-27 20:44:10 +00:00
simplified check
This commit is contained in:
parent
0b0c16bf10
commit
6ccc738d17
@ -94,8 +94,7 @@ void wfp_impl_provider_invoke(
|
|||||||
json_t * params = json_object_get(request, "params");
|
json_t * params = json_object_get(request, "params");
|
||||||
json_t * id_holder = json_object_get(request, "id");
|
json_t * id_holder = json_object_get(request, "id");
|
||||||
|
|
||||||
if ((NULL != method_holder) && (json_is_string(method_holder)) &&
|
if ((json_is_string(method_holder)) && (json_is_array(params)))
|
||||||
(NULL != params) && (json_is_array(params)))
|
|
||||||
{
|
{
|
||||||
char const * method = json_string_value(method_holder);
|
char const * method = json_string_value(method_holder);
|
||||||
int id = json_is_integer(id_holder) ? json_integer_value(id_holder) : 0;
|
int id = json_is_integer(id_holder) ? json_integer_value(id_holder) : 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user