mirror of
https://github.com/reactos/reactos.git
synced 2024-12-30 19:14:31 +00:00
don't zero out OtcpEvent structure from InitOskitTCP(), because it has already been initialized at this point. Also added a check for null to avoid crash in ifa_ifwithnet()
svn path=/trunk/; revision=10975
This commit is contained in:
parent
bebf5b5e5e
commit
b608a8ac83
1 changed files with 7 additions and 3 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
#include <stdio.h>
|
||||||
#include <oskittcp.h>
|
#include <oskittcp.h>
|
||||||
#include <oskitdebug.h>
|
#include <oskitdebug.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
@ -56,7 +57,6 @@ void InitOskitTCP() {
|
||||||
tcp_init();
|
tcp_init();
|
||||||
OS_DbgPrint(OSK_MID_TRACE,("Init routing\n"));
|
OS_DbgPrint(OSK_MID_TRACE,("Init routing\n"));
|
||||||
domaininit();
|
domaininit();
|
||||||
memset( &OtcpEvent, 0, sizeof( OtcpEvent ) );
|
|
||||||
OS_DbgPrint(OSK_MID_TRACE,("Init Finished\n"));
|
OS_DbgPrint(OSK_MID_TRACE,("Init Finished\n"));
|
||||||
tcp_iss = 1024;
|
tcp_iss = 1024;
|
||||||
}
|
}
|
||||||
|
@ -455,9 +455,13 @@ struct ifaddr *ifa_ifwithnet(addr)
|
||||||
struct sockaddr_in *sin;
|
struct sockaddr_in *sin;
|
||||||
struct ifaddr *ifaddr = ifa_iffind(addr, IFF_UNICAST);
|
struct ifaddr *ifaddr = ifa_iffind(addr, IFF_UNICAST);
|
||||||
|
|
||||||
|
if( ifaddr )
|
||||||
|
{
|
||||||
sin = (struct sockaddr *)&ifaddr->ifa_addr;
|
sin = (struct sockaddr *)&ifaddr->ifa_addr;
|
||||||
|
|
||||||
OS_DbgPrint(OSK_MID_TRACE,("ifaddr->addr = %x\n", sin->sin_addr.s_addr));
|
OS_DbgPrint(OSK_MID_TRACE,("ifaddr->addr = %x\n",
|
||||||
|
sin->sin_addr.s_addr));
|
||||||
|
}
|
||||||
|
|
||||||
return ifaddr;
|
return ifaddr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue