Merge pull request #85 from riscv/print_port
Print out which port OpenOCD is listening on.gdb_next_port
commit
73dee3ad4a
|
@ -298,6 +298,12 @@ int add_service(char *name,
|
|||
free_service(c);
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
|
||||
struct sockaddr_in addr_in;
|
||||
socklen_t addr_in_size = sizeof(addr_in);
|
||||
getsockname(c->fd, &addr_in, &addr_in_size);
|
||||
LOG_INFO("Listening on port %d for %s connections",
|
||||
ntohs(addr_in.sin_port), name);
|
||||
} else if (c->type == CONNECTION_STDINOUT) {
|
||||
c->fd = fileno(stdin);
|
||||
|
||||
|
|
Loading…
Reference in New Issue