mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s3:winbindd_cm: make use of cli->src_ss instead of calling getsockname()
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Mon Jul 11 19:31:14 CEST 2011 on sn-devel-104
This commit is contained in:
parent
cf4832d010
commit
7c10b5e033
@ -2742,13 +2742,19 @@ void winbind_msg_ip_dropped(struct messaging_context *msg_ctx,
|
|||||||
|
|
||||||
for (domain = domain_list(); domain != NULL; domain = domain->next) {
|
for (domain = domain_list(); domain != NULL; domain = domain->next) {
|
||||||
char sockaddr[INET6_ADDRSTRLEN];
|
char sockaddr[INET6_ADDRSTRLEN];
|
||||||
|
const struct sockaddr *sa;
|
||||||
|
socklen_t sa_len;
|
||||||
|
|
||||||
if (!cli_state_is_connected(domain->conn.cli)) {
|
if (!cli_state_is_connected(domain->conn.cli)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
client_socket_addr(domain->conn.cli->fd, sockaddr,
|
sa = (const struct sockaddr *)(void *)&domain->conn.cli->src_ss;
|
||||||
sizeof(sockaddr));
|
sa_len = sizeof(domain->conn.cli->src_ss);
|
||||||
|
|
||||||
|
print_sockaddr_len(sockaddr, sizeof(sockaddr),
|
||||||
|
sa, sa_len);
|
||||||
|
|
||||||
if (strequal(sockaddr, addr)) {
|
if (strequal(sockaddr, addr)) {
|
||||||
cli_state_disconnect(domain->conn.cli);
|
cli_state_disconnect(domain->conn.cli);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user