With the removal of old tpiu code, commit
7e6556b3cad8 ("server:
permit the add_service function to return the created service")
http://openocd.zylin.com/5717/ can be reverted.
Fix also the new calls to add_service().
Change-Id: Ib7f2dfc6a9e829239e20313e0f121911085fdc00
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6031
Tested-by: jenkins
Reviewed-by: Adrian M Negreanu <adrian.negreanu@nxp.com>
ret = add_service("gdb",
port, target->gdb_max_connections, &gdb_new_connection, &gdb_input,
- &gdb_connection_closed, gdb_service, NULL);
+ &gdb_connection_closed, gdb_service);
/* initialize all targets gdb service with the same pointer */
{
struct target_list *head;
COMMAND_PARSE_NUMBER(uint, CMD_ARGV[1], service->channel);
ret = add_service("rtt", CMD_ARGV[0], CONNECTION_LIMIT_UNLIMITED,
- rtt_new_connection, rtt_input, rtt_connection_closed, service, NULL);
+ rtt_new_connection, rtt_input, rtt_connection_closed, service);
if (ret != ERROR_OK) {
free(service);
new_connection_handler_t new_connection_handler,
input_handler_t input_handler,
connection_closed_handler_t connection_closed_handler,
- void *priv,
- struct service **new_service)
+ void *priv)
{
struct service *c, **p;
struct hostent *hp;
;
*p = c;
- /* if new_service is not NULL, return the created service into it */
- if (new_service)
- *new_service = c;
-
return ERROR_OK;
}
int add_service(char *name, const char *port,
int max_connections, new_connection_handler_t new_connection_handler,
input_handler_t in_handler, connection_closed_handler_t close_handler,
- void *priv, struct service **new_service);
+ void *priv);
int remove_service(const char *name, const char *port);
int server_host_os_entry(void);
return add_service("tcl", tcl_port, CONNECTION_LIMIT_UNLIMITED,
&tcl_new_connection, &tcl_input,
- &tcl_closed, NULL, NULL);
+ &tcl_closed, NULL);
}
COMMAND_HANDLER(handle_tcl_port_command)
int ret = add_service("telnet", telnet_port, CONNECTION_LIMIT_UNLIMITED,
telnet_new_connection, telnet_input, telnet_connection_closed,
- telnet_service, NULL);
+ telnet_service);
if (ret != ERROR_OK) {
free(telnet_service);
retval = add_service("tpiu_swo_trace", &obj->out_filename[1],
CONNECTION_LIMIT_UNLIMITED, arm_tpiu_swo_service_new_connection,
arm_tpiu_swo_service_input, arm_tpiu_swo_service_connection_closed,
- priv, NULL);
+ priv);
if (retval != ERROR_OK) {
LOG_ERROR("Can't configure trace TCP port %s", &obj->out_filename[1]);
return JIM_ERR;
jsp_new_connection,
jsp_input,
jsp_connection_closed,
- jsp_service,
- NULL);
+ jsp_service);
}
COMMAND_HANDLER(handle_jsp_port_command)