winedbg: Set reuseaddr flag for gdb remote socket.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
829c06741b
commit
820a866f0d
|
@ -2157,6 +2157,7 @@ static BOOL gdb_exec(unsigned port, unsigned flags)
|
||||||
static BOOL gdb_startup(struct gdb_context* gdbctx, unsigned flags, unsigned port)
|
static BOOL gdb_startup(struct gdb_context* gdbctx, unsigned flags, unsigned port)
|
||||||
{
|
{
|
||||||
SOCKET sock;
|
SOCKET sock;
|
||||||
|
BOOL reuseaddr = TRUE;
|
||||||
struct sockaddr_in s_addrs = {0};
|
struct sockaddr_in s_addrs = {0};
|
||||||
int s_len = sizeof(s_addrs);
|
int s_len = sizeof(s_addrs);
|
||||||
fd_set read_fds;
|
fd_set read_fds;
|
||||||
|
@ -2172,6 +2173,8 @@ static BOOL gdb_startup(struct gdb_context* gdbctx, unsigned flags, unsigned por
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char*)&reuseaddr, sizeof(reuseaddr));
|
||||||
|
|
||||||
s_addrs.sin_family = AF_INET;
|
s_addrs.sin_family = AF_INET;
|
||||||
s_addrs.sin_addr.S_un.S_addr = INADDR_ANY;
|
s_addrs.sin_addr.S_un.S_addr = INADDR_ANY;
|
||||||
s_addrs.sin_port = htons(port);
|
s_addrs.sin_port = htons(port);
|
||||||
|
|
Loading…
Reference in New Issue