Andrew Boyson / web

Dependents:   oldheating gps motorhome heating

base/firmware/web-firmware-query.c

Committer:
andrewboyson
Date:
2020-03-11
Revision:
133:98c6bf14bc37
Parent:
118:53430a2a2595

File content as of revision 133:98c6bf14bc37:

#include "http.h"
#include "restart.h"
#include "web-pages-base.h"

void WebFirmwareQuery(char* pQuery)
{
    while (pQuery)
    {
        char* pName;
        char* pValue;
        pQuery = HttpQuerySplit(pQuery, &pName, &pValue);
        int value = HttpQueryValueAsInt(pValue);    
        
        if (HttpSameStr(pName, "restart")) Restart(RESTART_CAUSE_SOFTWARE_RESET);
    }
}