mbed RPC

Dependents:   RPC_Serial_OVFZ RPCHTTPServer SerialRPC_rtos_example RPC_HTTP ... more

Fork of mbed-rpc by mbed official

Revision:
10:d3e03663a6f4
Parent:
9:d8113058854e
Child:
14:188b1505f827
--- a/rpc.cpp	Mon Jun 15 16:27:17 2015 +0000
+++ b/rpc.cpp	Thu Jun 18 07:30:13 2015 +0100
@@ -146,9 +146,9 @@
         /* Look through the methods for the one whose name matches */
         while (true) {
             for (; cur_method->name != NULL; cur_method++) {
-                r.putData<const char*>(cur_method->name);
                 if (strcmp(cur_method->name, args.method_name) == 0) {
                     (cur_method->method_caller)(p, &args, &r);
+                    r.putData<const char*>(cur_method->name);
                     return true;
                 }
             }