Andrew Boyson / motorhome

Dependencies:   net lpc1768 crypto clock web fram log

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers web-system-query.c Source File

web-system-query.c

00001 #include <string.h>
00002 #include <stdlib.h>
00003 
00004 #include "http.h"
00005 #include "values.h"
00006 
00007 void WebSystemQuery(char* pQuery)
00008 {
00009     while (pQuery)
00010     {
00011         char* pName;
00012         char* pValue;
00013         pQuery = HttpQuerySplit(pQuery, &pName, &pValue);
00014         
00015         HttpQueryUnencode(pValue);
00016 
00017         int value = HttpQueryValueAsInt(pValue);
00018 
00019         if (HttpSameStr(pName, "tftpserver"    )) ValuesSetServerName        (pValue          );
00020         if (HttpSameStr(pName, "tftpfilename"  )) ValuesSetFileName          (pValue          );
00021         if (HttpSameStr(pName, "tftpwriteint"  )) ValuesSetWriteSize         (value           );
00022         if (HttpSameStr(pName, "tftpreadint"   )) ValuesSetReadInterval      (value           );        
00023     }
00024 }