server: remove error value from LOG_INFO
[openocd.git] / src / server / server.c
index c7e1e40cceb45c26de26930ddf49520f1fc0d4e4..70d9566a3624f4005ff4db85eb223906ab384034 100644 (file)
@@ -90,6 +90,11 @@ static int add_connection(struct service *service, struct command_context *cmd_c
                c->fd = service->fd;
                c->fd_out = fileno(stdout);
 
+#ifdef _WIN32
+               /* we are using stdin/out so ignore ctrl-c under windoze */
+               SetConsoleCtrlHandler(NULL, TRUE);
+#endif
+
                /* do not check for new connections again on stdin */
                service->fd = -1;
 
@@ -195,7 +200,7 @@ int add_service(char *name, const char *port, int max_connections, new_connectio
        } else
        {
                char *end;
-               strtol(c->port, &end, 0);
+               portnumber = strtol(c->port, &end, 0);
                if (!*end && (parse_long(c->port, &portnumber) == ERROR_OK))
                {
                        c->portnumber = portnumber;
@@ -268,6 +273,12 @@ int add_service(char *name, const char *port, int max_connections, new_connectio
        }
        else if (c->type == CONNECTION_PIPE)
        {
+#ifdef _WIN32
+               /* we currenty do not support named pipes under win32
+                * so exit openocd for now */
+               LOG_ERROR("Named pipes currently not supported under this os");
+               exit(1);
+#else
                /* Pipe we're reading from */
                c->fd = open(c->port, O_RDONLY | O_NONBLOCK);
                if (c->fd == -1)
@@ -275,6 +286,7 @@ int add_service(char *name, const char *port, int max_connections, new_connectio
                        LOG_ERROR("could not open %s", c->port);
                        exit(1);
                }
+#endif
        }
 
        /* add to the end of linked list */
@@ -473,7 +485,7 @@ int server_loop(struct command_context *command_context)
                                                                shutdown_openocd = 1;
                                                        }
                                                        remove_connection(service, c);
-                                                       LOG_INFO("dropped '%s' connection - error %d", service->name, retval);
+                                                       LOG_INFO("dropped '%s' connection", service->name);
                                                        c = next;
                                                        continue;
                                                }
@@ -526,16 +538,8 @@ int server_preinit(void)
                exit(-1);
        }
 
-       if (server_use_pipes == 0)
-       {
-               /* register ctrl-c handler */
-               SetConsoleCtrlHandler(ControlHandler, TRUE);
-       }
-       else
-       {
-               /* we are using pipes so ignore ctrl-c */
-               SetConsoleCtrlHandler(NULL, TRUE);
-       }
+       /* register ctrl-c handler */
+       SetConsoleCtrlHandler(ControlHandler, TRUE);
 
        signal(SIGINT, sig_handler);
        signal(SIGTERM, sig_handler);

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)