diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-07-29 23:25:12 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-07-31 09:34:21 +0200 |
commit | 13de233fc6a562387791281b3b0cc1bcbe56b9ef (patch) | |
tree | 197a02fe338abde2ae768ec622107142eb0e224e /source3/smbd | |
parent | ec69eb41bf1e32bec1d2d6e40bcfbd635ca505d2 (diff) | |
download | samba-13de233fc6a562387791281b3b0cc1bcbe56b9ef.tar.gz samba-13de233fc6a562387791281b3b0cc1bcbe56b9ef.tar.bz2 samba-13de233fc6a562387791281b3b0cc1bcbe56b9ef.zip |
s3:smbd: move smbd_register_ips() next to release_ip()
metze
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/process.c | 50 |
1 files changed, 23 insertions, 27 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index adb773d749..f09150d19c 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -2491,6 +2491,29 @@ static void release_ip(const char *ip, void *priv) } } +static NTSTATUS smbd_register_ips(struct smbd_server_connection *sconn, + struct sockaddr_storage *srv, + struct sockaddr_storage *clnt) +{ + struct ctdbd_connection *cconn; + char tmp_addr[INET6_ADDRSTRLEN]; + char *addr; + + cconn = messaging_ctdbd_connection(); + if (cconn == NULL) { + return NT_STATUS_NO_MEMORY; + } + + if (client_socket_addr(sconn->sock, tmp_addr, sizeof(tmp_addr)) == NULL) { + return NT_STATUS_NO_MEMORY; + } + addr = talloc_strdup(cconn, tmp_addr); + if (addr == NULL) { + return NT_STATUS_NO_MEMORY; + } + return ctdbd_register_ips(cconn, srv, clnt, release_ip, addr); +} + static int client_get_tcp_info(int sock, struct sockaddr_storage *server, struct sockaddr_storage *client) { @@ -3067,33 +3090,6 @@ fail: return false; } -#if CLUSTER_SUPPORT - -static NTSTATUS smbd_register_ips(struct smbd_server_connection *sconn, - struct sockaddr_storage *srv, - struct sockaddr_storage *clnt) -{ - struct ctdbd_connection *cconn; - char tmp_addr[INET6_ADDRSTRLEN]; - char *addr; - - cconn = messaging_ctdbd_connection(); - if (cconn == NULL) { - return NT_STATUS_NO_MEMORY; - } - - if (client_socket_addr(sconn->sock, tmp_addr, sizeof(tmp_addr)) == NULL) { - return NT_STATUS_NO_MEMORY; - } - addr = talloc_strdup(cconn, tmp_addr); - if (addr == NULL) { - return NT_STATUS_NO_MEMORY; - } - return ctdbd_register_ips(cconn, srv, clnt, release_ip, addr); -} - -#endif - static bool uid_in_use(const struct user_struct *user, uid_t uid) { while (user) { |