server: fix confusing wording for incoming tcp connections
[openocd.git] / src / server / server.c
index 01e844123e9ad373508d42a596bf1979b127be62..5169319c54905d0b8886ae7ccebf683374652189 100644 (file)
@@ -80,7 +80,7 @@ static int add_connection(struct service *service, struct command_context *cmd_c
                        (char *)&flag,                  /* the cast is historical cruft */
                        sizeof(int));                   /* length of option value */
 
-               LOG_INFO("accepting '%s' connection from %s", service->name, service->port);
+               LOG_INFO("accepting '%s' connection on tcp/%s", service->name, service->port);
                retval = service->new_connection(c);
                if (retval != ERROR_OK) {
                        close_socket(c->fd);
@@ -303,14 +303,14 @@ static int remove_services(void)
                struct service *next = c->next;
 
                if (c->name)
-                       free((void *)c->name);
+                       free(c->name);
 
                if (c->type == CONNECTION_PIPE) {
                        if (c->fd != -1)
                                close(c->fd);
                }
                if (c->port)
-                       free((void *)c->port);
+                       free(c->port);
 
                if (c->priv)
                        free(c->priv);
@@ -612,7 +612,7 @@ int server_register_commands(struct command_context *cmd_ctx)
        return register_commands(cmd_ctx, NULL, server_command_handlers);
 }
 
-SERVER_PORT_COMMAND()
+COMMAND_HELPER(server_port_command, unsigned short *out)
 {
        switch (CMD_ARGC) {
                case 0:
@@ -631,7 +631,7 @@ SERVER_PORT_COMMAND()
        return ERROR_OK;
 }
 
-SERVER_PIPE_COMMAND()
+COMMAND_HELPER(server_pipe_command, char **out)
 {
        switch (CMD_ARGC) {
                case 0:
@@ -643,9 +643,8 @@ SERVER_PIPE_COMMAND()
                                LOG_WARNING("unable to change server port after init");
                                return ERROR_COMMAND_ARGUMENT_INVALID;
                        }
-                       const char *t = strdup(CMD_ARGV[0]);
-                       free((void *)*out);
-                       *out = t;
+                       free(*out);
+                       *out = strdup(CMD_ARGV[0]);
                        break;
                }
                default:

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)