Remote Procedure Call (RPC) over Websockets (uses MbedJSONValue)
Dependents: RPC_mbed_client RPC_Wifly_HelloWorld RPC_Ethernet_HelloWorld
Diff: MbedJSONRpc.h
- Revision:
- 6:0ec91dd0e80e
- Parent:
- 5:88e1902947e5
- Child:
- 7:067cb01b491e
--- a/MbedJSONRpc.h Thu Sep 22 11:11:06 2011 +0000 +++ b/MbedJSONRpc.h Mon Oct 03 08:40:53 2011 +0000 @@ -260,7 +260,9 @@ std::string path = webs->getPath(); std::string token = "/"; size_t found; - found = path.find(token, 3); + found = path.find(token); + if (found != std::string::npos) + found = path.find(token, found + 1); if (found != std::string::npos) path = path.substr(found + 1, std::string::npos); strcpy(my_id, path.c_str());