From 8cd915ff6bb01d7c5b74b28c5ebb191876647c67 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 28 Oct 2016 13:02:40 -0500 Subject: [PATCH] Cgitelnet reform json output --- esp-link/cgitelnet.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/esp-link/cgitelnet.c b/esp-link/cgitelnet.c index 8c48985..a00078d 100644 --- a/esp-link/cgitelnet.c +++ b/esp-link/cgitelnet.c @@ -9,9 +9,12 @@ int ICACHE_FLASH_ATTR cgiTelnetGet(HttpdConnData *connData) { char buff[1024]; int len; - + + os_printf("Current telnet ports: port1=%d port2=%d\n", + flashConfig.telnet_port1, flashConfig.telnet_port2); + len = os_sprintf(buff, - "{ \"telnet-port1\":%d, \"telnet-port2\":%d }", + "{ \"telnet-port1\" \":%d\", \"telnet-port2\": \"%d\" }", flashConfig.telnet_port1, flashConfig.telnet_port2); jsonHeader(connData, 200); @@ -43,7 +46,7 @@ int ICACHE_FLASH_ATTR cgiTelnetSet(HttpdConnData *connData) { // we're good, set flashconfig flashConfig.telnet_port1 = port1; flashConfig.telnet_port2 = port2; - os_printf("Ports changed: port1=%d port2=%d\n", + os_printf("Telnet ports changed: port1=%d port2=%d\n", flashConfig.telnet_port1, flashConfig.telnet_port2); // save to flash