From ed6aa99d128bf1ea1c5b966b668e1ccc24d71c92 Mon Sep 17 00:00:00 2001 From: Mike Beattie Date: Fri, 23 Mar 2012 08:41:50 +1300 Subject: use global buffers in doHandler() Signed-off-by: Mike Beattie --- HouseControl.ino | 10 +++++----- 1 file 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); -- cgit v1.2.3