src/server: usage/help/doc updates
[openocd.git] / src / server / httpd.c
index 9554ff0e40264800e534c77fca551aaafc0459b1..af8c3c8bb5f7097b403b498591f485c26599b78f 100644 (file)
@@ -118,11 +118,11 @@ static int httpd_Jim_Command_writeform(Jim_Interp *interp, int argc,
        // Find length
        const char *data;
        int actual;
-
        int retcode;
-
-       const char *script = alloc_printf("set dummy_val $httppostdata(%s); set dummy_val",
+       const char *script = alloc_printf(
+                       "set dummy_val $httppostdata(%s); set dummy_val",
                        name);
+
        retcode = Jim_Eval_Named(interp, script, __FILE__, __LINE__);
        free((void *) script);
        if (retcode != JIM_OK)
@@ -154,27 +154,25 @@ httpd_Jim_Command_formfetch(Jim_Interp *interp,
                                    int argc,
                                    Jim_Obj *const *argv)
 {
-    if (argc != 2)
-    {
-        Jim_WrongNumArgs(interp, 1, argv, "method ?CMD_ARGV ...?");
-        return JIM_ERR;
-    }
-    char *name = (char*)Jim_GetString(argv[1], NULL);
-
-
-    const char *script = alloc_printf("set dummy_val $httppostdata(%s); set dummy_val",
-                       name);
-       int retcode = Jim_Eval_Named(interp, script, __FILE__, __LINE__);
-       free((void *) script);
-       if (retcode != JIM_OK)
-       {
-           Jim_SetResult(interp, Jim_NewEmptyStringObj(interp));
-       } else
-       {
-           Jim_SetResult(interp, Jim_GetResult(interp));
-       }
-
-    return JIM_OK;
+       if (argc != 2)
+       {
+               Jim_WrongNumArgs(interp, 1, argv, "method ?CMD_ARGV ...?");
+               return JIM_ERR;
+       }
+
+       char *name = (char*)Jim_GetString(argv[1], NULL);
+       const char *script = alloc_printf(
+               "set dummy_val $httppostdata(%s); set dummy_val",
+               name);
+       int retcode = Jim_Eval_Named(interp, script, __FILE__, __LINE__);
+
+       free((void *) script);
+       if (retcode != JIM_OK)
+               Jim_SetResult(interp, Jim_NewEmptyStringObj(interp));
+       else
+               Jim_SetResult(interp, Jim_GetResult(interp));
+
+       return JIM_OK;
 }
 
 struct httpd_request
@@ -467,16 +465,16 @@ static struct MHD_Daemon * d;
 static const struct command_registration httpd_command_handlers[] = {
        {
                .name = "formfetch",
-               .jim_handler = &httpd_Jim_Command_formfetch,
+               .jim_handler = httpd_Jim_Command_formfetch,
                .mode = COMMAND_EXEC,
-               .usage = "<parameter_name>",
+               .usage = "parameter_name",
                .help = "Reads a posted form value.",
        },
        {
                .name = "writeform",
-               .jim_handler = &httpd_Jim_Command_writeform,
+               .jim_handler = httpd_Jim_Command_writeform,
                .mode = COMMAND_EXEC,
-               .usage = "<parameter_name> <file>",
+               .usage = "parameter_name filename",
                .help = "Writes a form value to a file.",
        },
        COMMAND_REGISTRATION_DONE

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)