X10 Server - IOT device to leverage a collection of old X10 devices for home automation and lighting control.
Dependencies: IniManager mbed HTTPClient SWUpdate mbed-rtos Watchdog X10 SW_HTTPServer SW_String EthernetInterface TimeInterface SSDP
X10 Server
See the X10 Server Nodebook page
Diff: WebPages.cpp
- Revision:
- 2:ca5d12560ff7
- Parent:
- 1:016d4400254b
- Child:
- 4:5da66fab599c
--- a/WebPages.cpp Tue Jul 03 16:26:21 2018 +0000 +++ b/WebPages.cpp Tue Jul 10 03:09:19 2018 +0000 @@ -77,7 +77,7 @@ // The /setup.xml file // // sprintf(buf, SETUP_TEMPLATE, "FriendlyName", "udn_hexstring", "serialNum", "ip.ad.dr", portNum); -static const char * SETUP_TEMPLATE = +static const char SETUP_TEMPLATE[] = "<?xml version=\"1.0\"?>\n" "<root xmlns=\"urn:Belkin:device-1-0\">\n" " <specVersion>\n" @@ -186,7 +186,7 @@ HTTPServer::CallBackResults Setup_xml(HTTPServer *svr, HTTPServer::CallBackType type, char * path, const HTTPServer::namevalue *queryParams, int queryParamCount) { - char BigBuffer[1000]; + char BigBuffer[sizeof(SETUP_TEMPLATE) + 150]; HTTPServer::CallBackResults ret = HTTPServer::ACCEPT_ERROR; printf("Setup.xml responder\n"); switch (type) {