diff --git a/libraries/rpc/rpc.cpp b/libraries/rpc/rpc.cpp index 5f9c71b778..f26716b175 100644 --- a/libraries/rpc/rpc.cpp +++ b/libraries/rpc/rpc.cpp @@ -146,9 +146,9 @@ bool RPC::call(const char *request, char *reply) { /* Look through the methods for the one whose name matches */ while (true) { for (; cur_method->name != NULL; cur_method++) { - r.putData(cur_method->name); if (strcmp(cur_method->name, args.method_name) == 0) { (cur_method->method_caller)(p, &args, &r); + r.putData(cur_method->name); return true; } }