]> git.sur5r.net Git - openocd/commitdiff
fixed gaffe in post handling
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Wed, 17 Dec 2008 12:50:07 +0000 (12:50 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Wed, 17 Dec 2008 12:50:07 +0000 (12:50 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1254 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/server/httpd.c

index f24e58ade8269df1ea24fa3123e62c12f9da7c13..b9df9085e7acbab7f1fd1f50e67c0138366c86d6 100644 (file)
@@ -175,9 +175,13 @@ httpd_Jim_Command_formfetch(Jim_Interp *interp,
        int retcode = Jim_Eval_Named(interp, script, "httpd.c", __LINE__ );\r
        free((void *) script);\r
        if (retcode != JIM_OK)\r
-               return retcode;\r
+       {\r
+           Jim_SetResult(interp, Jim_NewEmptyStringObj(interp));\r
+       } else\r
+       {\r
+           Jim_SetResult(interp, Jim_GetResult(interp));\r
+       }\r
 \r
-    Jim_SetResult(interp, Jim_GetResult(interp));\r
     return JIM_OK;\r
 }\r
 \r
@@ -292,8 +296,7 @@ static int ahc_echo(void * cls, struct MHD_Connection * connection,
                r = (struct httpd_request *) *ptr;\r
 \r
                r->post = post;\r
-\r
-//             r->dict = Jim_NewDictObj(interp, NULL, 0);\r
+               Jim_SetVariableStr(interp, "httppostdata", Jim_NewDictObj(interp, NULL, 0));\r
 \r
                /* fill in url query strings in dictonary */\r
                MHD_get_connection_values(connection, MHD_GET_ARGUMENT_KIND,\r
@@ -327,7 +330,6 @@ static int ahc_echo(void * cls, struct MHD_Connection * connection,
        }\r
 \r
        /* hand over to request who will be using it. */\r
-       //Jim_SetGlobalVariableStr(interp, "httppostdata", Jim_GetVariableStr(interp, "httppostdata", 0));\r
        //      r->dict = NULL;\r
 \r
 \r