- Fixes '=' whitespace
[openocd.git] / src / server / server.c
index 22e01c61eb004df87ff49cf8b122eaf02412fb1a..a93d6ada4c8b4d11deb30831255731d43b5d30cc 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-
 #include "server.h"
-
-#include "log.h"
-#include "telnet_server.h"
 #include "target.h"
 
-#include <command.h>
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <fcntl.h>
 #include <signal.h>
+
 #ifndef _WIN32
 #include <netinet/tcp.h>
 #endif
 
+
 service_t *services = NULL;
 
 /* shutdown_openocd == 1: exit the main event loop, and quit the debugger */
@@ -61,7 +51,7 @@ int add_connection(service_t *service, command_context_t *cmd_ctx)
        socklen_t address_size;
        connection_t *c, **p;
        int retval;
-       int flag=1;
+       int flag = 1;
        
        c = malloc(sizeof(connection_t));
        c->fd = -1;
@@ -80,7 +70,7 @@ int add_connection(service_t *service, command_context_t *cmd_ctx)
                
                /* This increases performance dramatically for e.g. GDB load which
                 * does not have a sliding window protocol. */
-               retval=setsockopt(c->fd,        /* socket affected */
+               retval = setsockopt(c->fd,      /* socket affected */
                                IPPROTO_TCP,            /* set option at TCP level */
                                TCP_NODELAY,            /* name of option */
                                (char *)&flag,          /* the cast is historical cruft */
@@ -126,7 +116,7 @@ int remove_connection(service_t *service, connection_t *connection)
        connection_t *c;
        
        /* find connection */
-       while((c = *p))
+       while ((c = *p))
        {               
                if (c->fd == connection->fd)
                {       
@@ -193,7 +183,7 @@ int add_service(char *name, enum connection_type type, unsigned short port, int
                }
                
 #ifndef _WIN32
-               int segsize=65536;
+               int segsize = 65536;
                setsockopt(c->fd, IPPROTO_TCP, TCP_MAXSEG,  &segsize, sizeof(int));
 #endif
                int window_size = 128 * 1024;   
@@ -247,7 +237,7 @@ int remove_service(unsigned short port)
        service_t *c;
        
        /* find service */
-       while((c = *p))
+       while ((c = *p))
        {               
                if (c->port == port)
                {       
@@ -274,7 +264,7 @@ int remove_services(void)
        service_t *c = services;
 
        /* loop service */
-       while(c)
+       while (c)
        {
                service_t *next = c->next;
 
@@ -320,7 +310,7 @@ int server_loop(command_context_t *command_context)
        tv.tv_sec = 0;
        tv.tv_usec = 10000;
        
-       while(!shutdown_openocd)
+       while (!shutdown_openocd)
        {
                /* monitor sockets for acitvity */
                fd_max = 0;

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)