gdb: fix regression in gdb_port command
[fw/openocd] / src / server / server.h
index 062691b0a2c5be1df5ad854f8e26b7c9944c2f91..a25920ed0d6495f6a759b0ed7820aa52c618a5c8 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef SERVER_H
 #define SERVER_H
 
-#include "log.h"
+#include <helper/log.h>
 
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
@@ -42,7 +42,7 @@ struct connection
 {
        int fd;
        struct sockaddr_in sin;
-       command_context_t *cmd_ctx;
+       struct command_context *cmd_ctx;
        struct service *service;
        int input_pending;
        void *priv;
@@ -74,12 +74,22 @@ int add_service(char *name, enum connection_type type, unsigned short port,
                input_handler_t in_handler, connection_closed_handler_t close_handler,
                void *priv);
 
-int server_init(void);
+int server_preinit(void);
+int server_init(struct command_context *cmd_ctx);
 int server_quit(void);
 
-int server_loop(command_context_t *command_context);
+int server_loop(struct command_context *command_context);
 
-int server_register_commands(command_context_t *context);
+int server_register_commands(struct command_context *context);
+
+/**
+ * Used by server_loop(), defined in server_stubs.c, httpd.c, or ecosboard.c
+ */
+void openocd_sleep_prelude(void);
+/**
+ * Used by server_loop(), defined in server_stubs.c, httpd.c, or ecosboard.c
+ */
+void openocd_sleep_postlude(void);
 
 /**
  * Defines an extended command handler function declaration to enable