Author: cgutman
Date: Mon Jul 11 02:44:32 2011
New Revision: 52627
URL:
http://svn.reactos.org/svn/reactos?rev=52627&view=rev
Log:
[OSKITTCP]
- Fix a crash that occurs during BitTorrent downloads
- The official BitTorrent client works now
Modified:
trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c
Modified: trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/oskittcp/oskit…
==============================================================================
--- trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c [iso-8859-1] Mon Jul 11
02:44:32 2011
@@ -550,6 +550,12 @@
OSKLock();
inp = (struct inpcb *)so->so_pcb;
+ if (!inp)
+ {
+ OSKUnlock();
+ return OSK_ESHUTDOWN;
+ }
+
inp->inp_laddr.s_addr = LocalAddress;
inp->inp_lport = LocalPort;
inp->inp_faddr.s_addr = RemoteAddress;
@@ -572,6 +578,12 @@
OSKLock();
inp = (struct inpcb *)so->so_pcb;
+ if (!inp)
+ {
+ OSKUnlock();
+ return OSK_ESHUTDOWN;
+ }
+
*LocalAddress = inp->inp_laddr.s_addr;
*LocalPort = inp->inp_lport;
*RemoteAddress = inp->inp_faddr.s_addr;