summaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-13 13:25:47 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-13 13:25:47 -0800
commit98723c4ecdbe06f90c66f3abec27b792c3b38e34 (patch)
treec6ea2a1627e8f7109e3aa0589cd625ac0c740aa7 /src/server
parentd16968e24f5d9e436ae4e136cd27652c4c948203 (diff)
downloadopenocd+libswd-98723c4ecdbe06f90c66f3abec27b792c3b38e34.tar.gz
openocd+libswd-98723c4ecdbe06f90c66f3abec27b792c3b38e34.tar.bz2
openocd+libswd-98723c4ecdbe06f90c66f3abec27b792c3b38e34.tar.xz
openocd+libswd-98723c4ecdbe06f90c66f3abec27b792c3b38e34.zip
command_context_t -> struct command_context
Remove misleading typedef and redundant suffix from struct command_context.
Diffstat (limited to 'src/server')
-rw-r--r--src/server/gdb_server.c6
-rw-r--r--src/server/gdb_server.h2
-rw-r--r--src/server/server.c6
-rw-r--r--src/server/server.h6
-rw-r--r--src/server/tcl_server.c2
-rw-r--r--src/server/tcl_server.h2
-rw-r--r--src/server/telnet_server.c6
-rw-r--r--src/server/telnet_server.h2
8 files changed, 16 insertions, 16 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index f49f352f..4151ec79 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -650,7 +650,7 @@ int gdb_output_con(struct connection *connection, const char* line)
return retval;
}
-int gdb_output(struct command_context_s *context, const char* line)
+int gdb_output(struct command_context *context, const char* line)
{
/* this will be dumped to the log and also sent as an O packet if possible */
LOG_USER_N("%s", line);
@@ -1556,7 +1556,7 @@ static int compare_bank (const void * a, const void * b)
int gdb_query_packet(struct connection *connection, struct target *target, char *packet, int packet_size)
{
- command_context_t *cmd_ctx = connection->cmd_ctx;
+ struct command_context *cmd_ctx = connection->cmd_ctx;
struct gdb_connection *gdb_connection = connection->priv;
if (strstr(packet, "qRcmd,"))
@@ -2371,7 +2371,7 @@ COMMAND_HANDLER(handle_gdb_breakpoint_override_command)
return ERROR_OK;
}
-int gdb_register_commands(command_context_t *command_context)
+int gdb_register_commands(struct command_context *command_context)
{
register_command(command_context, NULL, "gdb_sync",
handle_gdb_sync_command, COMMAND_ANY,
diff --git a/src/server/gdb_server.h b/src/server/gdb_server.h
index de84e200..4513e8a0 100644
--- a/src/server/gdb_server.h
+++ b/src/server/gdb_server.h
@@ -55,7 +55,7 @@ struct gdb_service
};
int gdb_init(void);
-int gdb_register_commands(command_context_t *command_context);
+int gdb_register_commands(struct command_context *command_context);
#define ERROR_GDB_BUFFER_TOO_SMALL (-800)
#define ERROR_GDB_TIMEOUT (-801)
diff --git a/src/server/server.c b/src/server/server.c
index 5614ef98..7416784c 100644
--- a/src/server/server.c
+++ b/src/server/server.c
@@ -45,7 +45,7 @@ static int shutdown_openocd = 0;
/* set when using pipes rather than tcp */
int server_use_pipes = 0;
-int add_connection(struct service *service, command_context_t *cmd_ctx)
+int add_connection(struct service *service, struct command_context *cmd_ctx)
{
socklen_t address_size;
struct connection *c, **p;
@@ -288,7 +288,7 @@ int remove_services(void)
extern void openocd_sleep_prelude(void);
extern void openocd_sleep_postlude(void);
-int server_loop(command_context_t *command_context)
+int server_loop(struct command_context *command_context)
{
struct service *service;
@@ -541,7 +541,7 @@ COMMAND_HANDLER(handle_shutdown_command)
return ERROR_COMMAND_CLOSE_CONNECTION;
}
-int server_register_commands(command_context_t *context)
+int server_register_commands(struct command_context *context)
{
register_command(context, NULL, "shutdown",
handle_shutdown_command, COMMAND_ANY,
diff --git a/src/server/server.h b/src/server/server.h
index 062691b0..5e862815 100644
--- a/src/server/server.h
+++ b/src/server/server.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;
@@ -77,9 +77,9 @@ int add_service(char *name, enum connection_type type, unsigned short port,
int server_init(void);
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);
/**
* Defines an extended command handler function declaration to enable
diff --git a/src/server/tcl_server.c b/src/server/tcl_server.c
index eed483ca..40a0428d 100644
--- a/src/server/tcl_server.c
+++ b/src/server/tcl_server.c
@@ -175,7 +175,7 @@ COMMAND_HANDLER(handle_tcl_port_command)
return CALL_COMMAND_HANDLER(server_port_command, &tcl_port);
}
-int tcl_register_commands(command_context_t *cmd_ctx)
+int tcl_register_commands(struct command_context *cmd_ctx)
{
register_command(cmd_ctx, NULL, "tcl_port",
handle_tcl_port_command, COMMAND_CONFIG,
diff --git a/src/server/tcl_server.h b/src/server/tcl_server.h
index d6c9e10b..1f6ba62e 100644
--- a/src/server/tcl_server.h
+++ b/src/server/tcl_server.h
@@ -23,6 +23,6 @@
#include "server.h"
int tcl_init(void);
-int tcl_register_commands(command_context_t *cmd_ctx);
+int tcl_register_commands(struct command_context *cmd_ctx);
#endif /* _TCL_SERVER_H_ */
diff --git a/src/server/telnet_server.c b/src/server/telnet_server.c
index 93028b14..46d438e0 100644
--- a/src/server/telnet_server.c
+++ b/src/server/telnet_server.c
@@ -94,7 +94,7 @@ int telnet_outputline(struct connection *connection, const char *line)
return ERROR_OK;
}
-int telnet_output(struct command_context_s *cmd_ctx, const char* line)
+int telnet_output(struct command_context *cmd_ctx, const char* line)
{
struct connection *connection = cmd_ctx->output_handler_priv;
@@ -198,7 +198,7 @@ int telnet_input(struct connection *connection)
char buffer[TELNET_BUFFER_SIZE];
char *buf_p;
struct telnet_connection *t_con = connection->priv;
- command_context_t *command_context = connection->cmd_ctx;
+ struct command_context *command_context = connection->cmd_ctx;
bytes_read = read_socket(connection->fd, buffer, TELNET_BUFFER_SIZE);
@@ -616,7 +616,7 @@ COMMAND_HANDLER(handle_exit_command)
return ERROR_COMMAND_CLOSE_CONNECTION;
}
-int telnet_register_commands(command_context_t *command_context)
+int telnet_register_commands(struct command_context *command_context)
{
register_command(command_context, NULL, "exit",
&handle_exit_command, COMMAND_EXEC,
diff --git a/src/server/telnet_server.h b/src/server/telnet_server.h
index c45a4236..7e398222 100644
--- a/src/server/telnet_server.h
+++ b/src/server/telnet_server.h
@@ -69,6 +69,6 @@ struct telnet_service
};
int telnet_init(char *banner);
-int telnet_register_commands(command_context_t *command_context);
+int telnet_register_commands(struct command_context *command_context);
#endif /* TELNET_SERVER_H */