#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 */
socklen_t address_size;
connection_t *c, **p;
int retval;
- int flag=1;
+ int flag = 1;
c = malloc(sizeof(connection_t));
c->fd = -1;
/* 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 */
connection_t *c;
/* find connection */
- while((c = *p))
+ while ((c = *p))
{
if (c->fd == connection->fd)
{
}
#ifndef _WIN32
- int segsize=65536;
+ int segsize = 65536;
setsockopt(c->fd, IPPROTO_TCP, TCP_MAXSEG, &segsize, sizeof(int));
#endif
int window_size = 128 * 1024;
service_t *c;
/* find service */
- while((c = *p))
+ while ((c = *p))
{
if (c->port == port)
{
service_t *c = services;
/* loop service */
- while(c)
+ while (c)
{
service_t *next = c->next;
tv.tv_sec = 0;
tv.tv_usec = 10000;
- while(!shutdown_openocd)
+ while (!shutdown_openocd)
{
/* monitor sockets for acitvity */
fd_max = 0;