mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
fix inet_aton problem
svn path=/trunk/; revision=18687
This commit is contained in:
parent
1060e47c32
commit
5f32912b73
3 changed files with 5 additions and 3 deletions
|
@ -30,6 +30,7 @@ u_int32_t arc4random()
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int inet_aton(const char *cp, struct in_addr *inp)
|
||||
{
|
||||
inp->S_un.S_addr = inet_addr(cp);
|
||||
|
@ -38,3 +39,4 @@ int inet_aton(const char *cp, struct in_addr *inp)
|
|||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -1986,7 +1986,7 @@ int
|
|||
ipv4addrs(char * buf)
|
||||
{
|
||||
char *tmp;
|
||||
unsigned long jnk;
|
||||
struct in_addr jnk;
|
||||
int i = 0;
|
||||
|
||||
note("Input: %s\n", buf);
|
||||
|
@ -1994,8 +1994,7 @@ ipv4addrs(char * buf)
|
|||
do {
|
||||
tmp = strtok(buf, " ");
|
||||
note("got %s\n", tmp);
|
||||
jnk = inet_addr( tmp );
|
||||
if( tmp ) i++;
|
||||
if( tmp && inet_aton(tmp, &jnk) ) i++;
|
||||
buf = NULL;
|
||||
} while( tmp );
|
||||
|
||||
|
|
|
@ -67,5 +67,6 @@ extern DWORD DSQueryHWInfo( PipeSendFunc Send, COMM_DHCP_REQ *Req );
|
|||
extern DWORD DSLeaseIpAddress( PipeSendFunc Send, COMM_DHCP_REQ *Req );
|
||||
extern DWORD DSRenewIpAddressLease( PipeSendFunc Send, COMM_DHCP_REQ *Req );
|
||||
extern DWORD DSReleaseIpAddressLease( PipeSendFunc Send, COMM_DHCP_REQ *Req );
|
||||
extern int inet_aton(const char *s, struct in_addr *addr);
|
||||
int warn( char *format, ... );
|
||||
#endif/*ROSDHCP_H*/
|
||||
|
|
Loading…
Reference in a new issue