Explorar el Código

submit some test

lusa hace 5 años
padre
commit
b44a343d67

BIN
app/goahead-5.1.0/build/linux-arm-static/bin/goahead


BIN
app/goahead-5.1.0/build/linux-arm-static/bin/goahead-test


BIN
app/goahead-5.1.0/build/linux-arm-static/bin/goahead-test.gdb


BIN
app/goahead-5.1.0/build/linux-arm-static/bin/goahead.gdb


BIN
app/goahead-5.1.0/build/linux-arm-static/bin/gopass


BIN
app/goahead-5.1.0/build/linux-arm-static/bin/gopass.gdb


BIN
app/goahead-5.1.0/build/linux-arm-static/bin/libgo.a


+ 42 - 37
app/goahead-5.1.0/src/goahead.c

@@ -38,47 +38,50 @@ static LRESULT CALLBACK websWindProc(HWND hwnd, UINT msg, UINT wp, LPARAM lp);
 static void sigHandler(int signo);
 #endif
 
-static void buy(Webs *wp);
-static void actionTest(Webs *wp);
+// static void buy(Webs *wp);
+// static void actionTest(Webs *wp);
 // static void personInfoAction(Webs *wp);
 
 
-static void buy(Webs *wp)
-{
-    char    *name, *age;
-    name = websGetVar(wp, "name", NULL);
-    age = websGetVar(wp, "age", NULL);
-     logmsg(2, "---------------------------------------------");
-    logmsg(2, "name value is : %s", name );
-     logmsg(2, "age value is : %s", age );
-    websSetStatus(wp, 200);
-    websWriteHeaders(wp, 0, 0);
-    websWriteEndHeaders(wp);
-    printf("aa");
-    websWrite(wp, "Name %s", name); 
-    websWrite(wp,  "Age %s", age);
-    websFlush(wp, 0);
-    websDone(wp);
-}
+// static void buy(Webs *wp)
+// {
+//     char    *name, *age;
+//     name = websGetVar(wp, "name", NULL);
+//     age = websGetVar(wp, "age", NULL);
+//      logmsg(2, "---------------------------------------------");
+//     logmsg(2, "name value is : %s", name );
+//      logmsg(2, "age value is : %s", age );
+//     websSetStatus(wp, 200);
+//     websWriteHeaders(wp, 0, 0);
+//     websWriteEndHeaders(wp);
+//     printf("aa");
+//     websWrite(wp, "Name %s", name); 
+//     websWrite(wp,  "Age %s", age);
+//     websFlush(wp, 0);
+//     websDone(wp);
+// }
+
+
+
+// /*
+//     Implement /action/actionTest. Parse the form variables: name, address and echo back.
+//  */
+// static void actionTest(Webs *wp)
+// {
+//     cchar   *name, *address;
+
+//     name = websGetVar(wp, "name", NULL);
+//     address = websGetVar(wp, "address", NULL);
+//     websSetStatus(wp, 200);
+//     websWriteHeaders(wp, -1, 0);
+//     websWriteEndHeaders(wp);
+//     websWrite(wp, "<html><body><h2>name: %s, address: %s</h2></body></html>\n", name, address);
+//     websFlush(wp, 0);
+//     websDone(wp);
+// }
 
 
 
-/*
-    Implement /action/actionTest. Parse the form variables: name, address and echo back.
- */
-static void actionTest(Webs *wp)
-{
-    cchar   *name, *address;
-
-    name = websGetVar(wp, "name", NULL);
-    address = websGetVar(wp, "address", NULL);
-    websSetStatus(wp, 200);
-    websWriteHeaders(wp, -1, 0);
-    websWriteEndHeaders(wp);
-    websWrite(wp, "<html><body><h2>name: %s, address: %s</h2></body></html>\n", name, address);
-    websFlush(wp, 0);
-    websDone(wp);
-}
 
 /*********************************** Code *************************************/
 
@@ -196,9 +199,11 @@ MAIN(goahead, int argc, char **argv, char **envp)
 #endif
 
 //add by lusa start 
-        websDefineAction("buy", buy);
-        websDefineAction("test", actionTest);
+        // websDefineAction("buy", buy);
+        // websDefineAction("test", actionTest);
         websDefineAction("person", personInfoAction);
+
+
         
 // add by lusa end 
 #ifdef GOAHEAD_INIT

+ 7 - 0
app/goahead-5.1.0/src/route.c

@@ -81,6 +81,13 @@ void personInfoAction(Webs *wp)
 }
 
 
+
+/*获取设备信息*/
+void getDeviceInfo(Webs *wp){
+
+}
+
+
 /************************************ Code ************************************/
 /*
     Route the request. If wp->route is already set, test routes after that route