progress
This commit is contained in:
parent
b7d8c716ac
commit
463e7a6eaa
@ -81,8 +81,14 @@ int answ_system(e_session type, char *connstr, int inetd)
|
|||||||
logerr("can't get client address");
|
logerr("can't get client address");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef IPV6
|
||||||
|
>char addr_str[INET6_ADDRSTRLEN+1];
|
||||||
|
state.peername = (char*)xstrcpy(inet_ntop(AF_INET6, client.sin6_addr, addr_str, INET6_ADDRSTRLEN));
|
||||||
|
state.peerport = (long)ntohs(client.sin6_port);
|
||||||
|
#else
|
||||||
state.peername = (char*)xstrcpy(inet_ntoa(client.sin_addr));
|
state.peername = (char*)xstrcpy(inet_ntoa(client.sin_addr));
|
||||||
state.peerport = (long)ntohs(client.sin_port);
|
state.peerport = (long)ntohs(client.sin_port);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,8 +254,14 @@ int call_system_quiet(const char *connstr, bool inet)
|
|||||||
logerr("can't get client address");
|
logerr("can't get client address");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef IPV6
|
||||||
|
char addr_str[INET6_ADDRSTRLEN+1];
|
||||||
|
state.peername = (char*)xstrcpy(inet_ntop(AF_INET6, client.sin6_addr, addr_str, INET6_ADDRSTRLEN));
|
||||||
|
state.peerport = (long)ntohs(client.sin6_port);
|
||||||
|
#else
|
||||||
state.peername = (char*)xstrcpy(inet_ntoa(client.sin_addr));
|
state.peername = (char*)xstrcpy(inet_ntoa(client.sin_addr));
|
||||||
state.peerport = (long)ntohs(client.sin_port);
|
state.peerport = (long)ntohs(client.sin_port);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user