/*
    CGI Script - (Called by HTTP Server)
*/
TMO LedTmo = 1000;
void CgiScriptLedSetting(T_HTTP_SERVER *http)
{
    char *cgi_name[2];
    char *cgi_value[2];
    int  cgi_cnt;
    T_HTTP_HEADER *env = &http->hdr;

    /* Parse the query string to argument list */
    CgiGetParam(env->Content, env->ContentLen, cgi_name, cgi_value, &cgi_cnt);

    /* Set LED blinking Timeout                */
    if (cgi_cnt && strcmp(cgi_name[0], "led_tmo") == 0) {
        LedTmo = atoi(cgi_value[0]) * 100;
    }

    /* Response Page: LED Setting successful */
    HttpSendText(http, (char *)cgi_okay, sizeof(cgi_okay));
}
