static HTTP_IO_RESULT HTTPPostConfig();
Accepts configuration parameters from the form, saves them to a temporary location in RAM, then eventually saves the data to EEPROM or external Flash.
When complete, this function redirects to config/reboot.htm, which will display information on reconnecting to the board.
This function creates a shadow copy of the AppConfig structure in RAM and then overwrites incoming data there as it arrives. For each name/value pair, the name is first read to curHTTP.data[0:5]. Next, the value is read to newAppConfig. Once all data has been read, the new AppConfig is saved back to EEPROM and the browser is redirected to reboot.htm. That file includes an AJAX call to reboot.cgi, which performs the actual reboot of the machine.
If an IP address cannot be parsed, too much data is POSTed, or any other parsing error occurs, the browser reloads config.htm and displays an error message at the top.
None
Return Values |
Description |
HTTP_IO_DONE |
all parameters have been processed |
HTTP_IO_NEED_DATA |
data needed by this function has not yet arrived |