Added incomplete MIDIToneGenerator project.
[pub/USBasp.git] / Projects / Webserver / Lib / TELNETServerApp.c
index d1f1d7f..2855f8d 100644 (file)
@@ -28,6 +28,8 @@
   this software.\r
 */\r
 \r
   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
 /** \file\r
  *\r
  *  TELNET Webserver Application. When connected to the uIP stack,\r
@@ -114,7 +116,7 @@ void TELNETServerApp_Callback(void)
                                                TELNETServerApp_DisplayTCPConnections();\r
                                                break;\r
                                        default:\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
                                                uip_send(AppData, strlen(AppData));\r
                                                break;\r
                                }\r
@@ -144,14 +146,17 @@ static void TELNETServerApp_DisplayTCPConnections(void)
                if (CurrConnection->tcpstateflags != UIP_CLOSED)\r
                {\r
                        /* Add the current connection's details to the out buffer */\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
                }\r
        }\r
 \r
        uip_send(AppData, ResponseLen);\r
-}
\ No newline at end of file
+}\r
+\r
+#endif\r