diff options
author | Mike Beattie <mike@ethernal.org> | 2012-03-23 08:41:50 +1300 |
---|---|---|
committer | Mike Beattie <mike@ethernal.org> | 2012-03-23 08:41:50 +1300 |
commit | ed6aa99d128bf1ea1c5b966b668e1ccc24d71c92 (patch) | |
tree | be2b2cdad87fd3949848d748e6d252745ec1537a | |
parent | 16a2e35747fe4e19f8d86777566e041505c6d294 (diff) |
use global buffers in doHandler()
Signed-off-by: Mike Beattie <mike@ethernal.org>
-rw-r--r-- | HouseControl.ino | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/HouseControl.ino b/HouseControl.ino index 61ccb15..d76daf4 100644 --- a/HouseControl.ino +++ b/HouseControl.ino @@ -298,17 +298,17 @@ void jsonHandler(WebServer &server, WebServer::ConnectionType type, char *url_ta void doHandler(WebServer &server, WebServer::ConnectionType type, char *url_tail, bool tail_complete) { if (type == WebServer::POST) { bool repeat; - char name[16], value[16]; +// char name[16], value[16]; do { - repeat = server.readPOSTparam(name, 16, value, 16); + repeat = server.readPOSTparam((char*)buf2, BUF2_SIZE, (char*)buf1, BUF1_SIZE); - if ((strcmp(name, "frontdoor") == 0)) + if ((strcmp((const char*)buf2, "frontdoor") == 0)) toggleDoorControl(&frontDoor); - if ((strcmp(name, "garagedoor1") == 0)) + if ((strcmp((const char*)buf2, "garagedoor1") == 0)) toggleDoorControl(&garageDoor1); - if ((strcmp(name, "garagedoor2") == 0)) + if ((strcmp((const char*)buf2, "garagedoor2") == 0)) toggleDoorControl(&garageDoor2); } while (repeat); |