mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 08:53:02 +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
1 changed files with 12 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue