aboutsummaryrefslogtreecommitdiff
path: root/src/target/openrisc
diff options
context:
space:
mode:
authorTarek BOCHKATI <tarek.bouchkati@gmail.com>2020-06-09 00:15:49 +0100
committerAntonio Borneo <borneo.antonio@gmail.com>2020-11-07 20:49:53 +0000
commit7e6556b3cad8c82d4670a68cd49756dabb8c4729 (patch)
treeea24d284b1f01ff081a1e81804a32775854d188b /src/target/openrisc
parent72a1010c9f60c75faa051cf2033c62b11fa42fcf (diff)
downloadriscv-openocd-7e6556b3cad8c82d4670a68cd49756dabb8c4729.zip
riscv-openocd-7e6556b3cad8c82d4670a68cd49756dabb8c4729.tar.gz
riscv-openocd-7e6556b3cad8c82d4670a68cd49756dabb8c4729.tar.bz2
server: permit the add_service function to return the created service
returning the created service seems useful: as the only method to get the freshly created service is by getting the last item in the services linked list, and this seems to be like an intrusion to service internal mechanism. possibly, we could get the service from a connection but this is possible only from [new_connection|input|connection_closed]_handler_t, but this is not always practical: example: armv7m: add a TCP channel to stream captured trace http://openocd.zylin.com/#/c/5345/ here we poll for trace and broadcast to all connections outside of these xxx_handler_t functions also, storing one of the connections in new_connection_handler_t and get the service from it is possible, but this will make the code less readable. Change-Id: I5fef1baecec1e054953c6faf5b99d864ecc97f02 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/5717 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
Diffstat (limited to 'src/target/openrisc')
-rw-r--r--src/target/openrisc/jsp_server.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/target/openrisc/jsp_server.c b/src/target/openrisc/jsp_server.c
index 4dbe635..b4b2566 100644
--- a/src/target/openrisc/jsp_server.c
+++ b/src/target/openrisc/jsp_server.c
@@ -207,7 +207,8 @@ int jsp_init(struct or1k_jtag *jtag_info, char *banner)
jsp_new_connection,
jsp_input,
jsp_connection_closed,
- jsp_service);
+ jsp_service,
+ NULL);
}
COMMAND_HANDLER(handle_jsp_port_command)