diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-07-22 11:21:29 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-07-22 17:06:08 +0200 |
commit | 8bea5d64029f4903bf403dc574588af3eace3680 (patch) | |
tree | 1c07411667c32d01ba974333feb04c23811a5873 /source3/winbindd | |
parent | fa42d2e2627dc9669b6fe99eec9a4c22b6963b9a (diff) | |
download | samba-8bea5d64029f4903bf403dc574588af3eace3680.tar.gz samba-8bea5d64029f4903bf403dc574588af3eace3680.tar.bz2 samba-8bea5d64029f4903bf403dc574588af3eace3680.zip |
s3:winbindd_cm: use cli_state_[local|remote]_sockaddr()
metze
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd_cm.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 7df6bf8160..5f2c8c1463 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -1400,8 +1400,6 @@ static void store_current_dc_in_gencache(const char *domain_name, struct cli_state *cli) { char addr[INET6_ADDRSTRLEN]; - const struct sockaddr *sa; - socklen_t sa_len; char *key = NULL; char *value = NULL; @@ -1409,11 +1407,8 @@ static void store_current_dc_in_gencache(const char *domain_name, return; } - sa = (const struct sockaddr *)(void *)&cli->dest_ss; - sa_len = sizeof(cli->dest_ss); - - print_sockaddr_len(addr, sizeof(addr), - sa, sa_len); + print_sockaddr(addr, sizeof(addr), + cli_state_remote_sockaddr(cli)); key = current_dc_key(talloc_tos(), domain_name); if (key == NULL) { @@ -2698,18 +2693,13 @@ void winbind_msg_ip_dropped(struct messaging_context *msg_ctx, for (domain = domain_list(); domain != NULL; domain = domain->next) { char sockaddr[INET6_ADDRSTRLEN]; - const struct sockaddr *sa; - socklen_t sa_len; if (!cli_state_is_connected(domain->conn.cli)) { continue; } - sa = (const struct sockaddr *)(void *)&domain->conn.cli->src_ss; - sa_len = sizeof(domain->conn.cli->src_ss); - - print_sockaddr_len(sockaddr, sizeof(sockaddr), - sa, sa_len); + print_sockaddr(sockaddr, sizeof(sockaddr), + cli_state_local_sockaddr(domain->conn.cli)); if (strequal(sockaddr, addr)) { cli_state_disconnect(domain->conn.cli); |