mirror of
https://github.com/reactos/reactos.git
synced 2024-08-21 19:03:01 +00:00
[OSKITTCP]
- Fix a crash that occurs during BitTorrent downloads - The official BitTorrent client works now svn path=/trunk/; revision=52627
This commit is contained in:
parent
7ef2dcbe22
commit
8aa496d875
|
@ -550,6 +550,12 @@ int OskitTCPSetAddress( void *socket,
|
||||||
|
|
||||||
OSKLock();
|
OSKLock();
|
||||||
inp = (struct inpcb *)so->so_pcb;
|
inp = (struct inpcb *)so->so_pcb;
|
||||||
|
if (!inp)
|
||||||
|
{
|
||||||
|
OSKUnlock();
|
||||||
|
return OSK_ESHUTDOWN;
|
||||||
|
}
|
||||||
|
|
||||||
inp->inp_laddr.s_addr = LocalAddress;
|
inp->inp_laddr.s_addr = LocalAddress;
|
||||||
inp->inp_lport = LocalPort;
|
inp->inp_lport = LocalPort;
|
||||||
inp->inp_faddr.s_addr = RemoteAddress;
|
inp->inp_faddr.s_addr = RemoteAddress;
|
||||||
|
@ -572,6 +578,12 @@ int OskitTCPGetAddress( void *socket,
|
||||||
|
|
||||||
OSKLock();
|
OSKLock();
|
||||||
inp = (struct inpcb *)so->so_pcb;
|
inp = (struct inpcb *)so->so_pcb;
|
||||||
|
if (!inp)
|
||||||
|
{
|
||||||
|
OSKUnlock();
|
||||||
|
return OSK_ESHUTDOWN;
|
||||||
|
}
|
||||||
|
|
||||||
*LocalAddress = inp->inp_laddr.s_addr;
|
*LocalAddress = inp->inp_laddr.s_addr;
|
||||||
*LocalPort = inp->inp_lport;
|
*LocalPort = inp->inp_lport;
|
||||||
*RemoteAddress = inp->inp_faddr.s_addr;
|
*RemoteAddress = inp->inp_faddr.s_addr;
|
||||||
|
|
Loading…
Reference in a new issue