Commit for the 100219 release.
authorDean Camera <dean@fourwalledcubicle.com>
Fri, 19 Feb 2010 00:07:22 +0000 (00:07 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Fri, 19 Feb 2010 00:07:22 +0000 (00:07 +0000)
LUFA/ManPages/ChangeLog.txt
LUFA/ManPages/MigrationInformation.txt
Projects/Webserver/Lib/DHCPClientApp.c
Projects/Webserver/Lib/HTTPServerApp.c

index c5dc911..9b3154f 100644 (file)
@@ -8,6 +8,8 @@
   *\r
   *  \section Sec_ChangeLogXXXXXX Version XXXXXX\r
   *\r
+  *  \section Sec_ChangeLog100219 Version 100219\r
+  *\r
   *  <b>New:</b>\r
   *  - Added TPI programming support for 6-pin ATTINY devices to the AVRISP programmer project (thanks to Tom Light)\r
   *  - Added command timeout counter to the AVRISP project so that the device no longer freezes when incorrectly connected\r
index 23fbc1e..169b787 100644 (file)
@@ -10,7 +10,9 @@
  *  to the next version released. It does not indicate all new additions to the library in each version change, only\r
  *  areas relevant to making older projects compatible with the API changes of each new release.\r
  *\r
- * \section Sec_MigrationXXXXXX Migrating from 091223 to XXXXXX\r
+ * \section Sec_MigrationXXXXXX Migrating from 100219 to XXXXXX\r
+ *\r
+ * \section Sec_Migration100219 Migrating from 091223 to 100219\r
  *\r
  *  <b>Non-USB Library Components</b>\r
  *    - Due to some ADC channels not being identical to their ADC MUX selection masks for single-ended conversions on some AVR models,\r
index 09bae73..cf51273 100644 (file)
 /** Initialization function for the DHCP client. */\r
 void DHCPClientApp_Init(void)\r
 {\r
-       /* Create an IP address to the broadcast network address */\r
-       uip_ipaddr_t DHCPServerIPAddress;\r
-       uip_ipaddr(&DHCPServerIPAddress, 255, 255, 255, 255);\r
-\r
        /* Create a new UDP connection to the DHCP server port for the DHCP solicitation */\r
-       struct uip_udp_conn* Connection = uip_udp_new(&DHCPServerIPAddress, HTONS(DHCPC_SERVER_PORT));\r
+       struct uip_udp_conn* Connection = uip_udp_new(&uip_broadcast_addr, HTONS(DHCPC_SERVER_PORT));\r
        \r
        /* If the connection was successfully created, bind it to the local DHCP client port */\r
        if (Connection != NULL)\r
index b6277d3..4e00952 100644 (file)
@@ -100,13 +100,9 @@ void HTTPServerApp_Callback(void)
 \r
        if (uip_aborted() || uip_timedout() || uip_closed())\r
        {\r
-               /* Connection is being terminated for some reason - close file handle */\r
-               f_close(&AppState->HTTPServer.FileHandle);\r
-               AppState->HTTPServer.FileOpen = false;\r
-               \r
                /* Lock to the closed state so that no further processing will occur on the connection */\r
-               AppState->HTTPServer.CurrentState  = WEBSERVER_STATE_Closed;\r
-               AppState->HTTPServer.NextState     = WEBSERVER_STATE_Closed;\r
+               AppState->HTTPServer.CurrentState  = WEBSERVER_STATE_Closing;\r
+               AppState->HTTPServer.NextState     = WEBSERVER_STATE_Closing;\r
        }\r
 \r
        if (uip_connected())\r
@@ -148,9 +144,15 @@ void HTTPServerApp_Callback(void)
                                HTTPServerApp_SendData();\r
                                break;\r
                        case WEBSERVER_STATE_Closing:\r
+                               /* Connection is being terminated for some reason - close file handle */\r
+                               f_close(&AppState->HTTPServer.FileHandle);\r
+                               AppState->HTTPServer.FileOpen = false;\r
+               \r
+                               /* If connection is not already closed, close it */\r
                                uip_close();\r
                                \r
-                               AppState->HTTPServer.NextState = WEBSERVER_STATE_Closed;\r
+                               AppState->HTTPServer.CurrentState = WEBSERVER_STATE_Closed;\r
+                               AppState->HTTPServer.NextState    = WEBSERVER_STATE_Closed;\r
                                break;\r
                }                 \r
        }               \r