Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 17:c690fb2de477, committed 2015-06-15
- Comitter:
- sarahmarshy
- Date:
- Mon Jun 15 16:07:28 2015 +0000
- Parent:
- 16:cc3f5c53d0d5
- Child:
- 18:08b85ace10c3
- Commit message:
- Included RpcHandler in main HTTPServer header - allowed templating of RPC handler. Changed RPC succesful execution return code from 1 to 200. HTTP was sending a response of 1 on success, causing the client to assume there was an error.
Changed in this revision
| HTTPServer.h | Show annotated file Show diff for this revision Revisions of this file |
| Handler/RpcHandler.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/HTTPServer.h Sat Aug 17 16:17:55 2013 +0000 +++ b/HTTPServer.h Mon Jun 15 16:07:28 2015 +0000 @@ -26,6 +26,7 @@ #include "EthernetInterface.h" #include "HTTPConnection.h" #include "HTTPRequestHandler.h" +#include "RpcHandler.h" #include <map> using std::map;
--- a/Handler/RpcHandler.cpp Sat Aug 17 16:17:55 2013 +0000
+++ b/Handler/RpcHandler.cpp Mon Jun 15 16:07:28 2015 +0000
@@ -53,10 +53,10 @@
}
INFO("RPC to %s", rpc_args.c_str());
retval = rpc.call(rpc_args.c_str(),outBuf);
- INFO("RPC Request returned %d with args : %s", retval==true ? 1 : 0, outBuf);
+ INFO("RPC Request returned %d with args : %s", retval==true ? 200 : 0, outBuf);
if (retval) {
// No error
- startResponse(retval, strlen(outBuf));
+ startResponse(200, strlen(outBuf));
processResponse(strlen(outBuf), outBuf);
endResponse();
err = 0;