this software.\r
*/\r
\r
+#if defined(ENABLE_TELNET_SERVER) || defined(__DOXYGEN__)\r
+\r
/** \file\r
*\r
* TELNET Webserver Application. When connected to the uIP stack,\r
"\r\n>";\r
\r
/** Header to print before the current connections are printed to the client */\r
-const char PROGMEM CurrentConnectionsHeader = "\r\n* Current TCP Connections: *\r\n";\r
+const char PROGMEM CurrentConnectionsHeader[] = "\r\n* Current TCP Connections: *\r\n";\r
\r
/** Initialization function for the simple HTTP webserver. */\r
void TELNETServerApp_Init(void)\r
TELNETServerApp_DisplayTCPConnections();\r
break;\r
default:\r
- strcpy(AppData, "Invalid Command.\r\n");\r
+ strcpy_P(AppData, PSTR("Invalid Command.\r\n"));\r
uip_send(AppData, strlen(AppData));\r
break;\r
}\r
if (CurrConnection->tcpstateflags != UIP_CLOSED)\r
{\r
/* Add the current connection's details to the out buffer */\r
- ResponseLen += sprintf(&AppData[ResponseLen], "%u) %02d.%02d.%02d.%02d (Local %u, Remote %u)\r\n",\r
- ++ActiveConnCount, CurrConnection->ripaddr.u8[0],\r
- CurrConnection->ripaddr.u8[1],\r
- CurrConnection->ripaddr.u8[2],\r
- CurrConnection->ripaddr.u8[3],\r
- HTONS(CurrConnection->lport), HTONS(CurrConnection->rport));\r
+ ResponseLen += sprintf_P(&AppData[ResponseLen], PSTR("%u) %02d.%02d.%02d.%02d (Local %u, Remote %u)\r\n"),\r
+ ++ActiveConnCount,\r
+ CurrConnection->ripaddr.u8[0],\r
+ CurrConnection->ripaddr.u8[1],\r
+ CurrConnection->ripaddr.u8[2],\r
+ CurrConnection->ripaddr.u8[3],\r
+ HTONS(CurrConnection->lport), HTONS(CurrConnection->rport));\r
}\r
}\r
\r
uip_send(AppData, ResponseLen);\r
-}
\ No newline at end of file
+}\r
+\r
+#endif\r