diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-07-11 14:15:21 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-07-11 18:18:27 +0200 |
commit | a2e248f27084fd81631dd3dc6614e078d8f99924 (patch) | |
tree | e2eabc0925911924dff85a08a4a8c8916a7983d2 | |
parent | e7c9319cacab287cb5772e38f30e9492afc82e8d (diff) | |
download | samba-a2e248f27084fd81631dd3dc6614e078d8f99924.tar.gz samba-a2e248f27084fd81631dd3dc6614e078d8f99924.tar.bz2 samba-a2e248f27084fd81631dd3dc6614e078d8f99924.zip |
s3:libsmbclient: use cli_state_is_connected() in SMBC_check_server()
metze
-rw-r--r-- | source3/libsmb/libsmb_server.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c index b3551374ed..49018a8320 100644 --- a/source3/libsmb/libsmb_server.c +++ b/source3/libsmb/libsmb_server.c @@ -44,11 +44,11 @@ int SMBC_check_server(SMBCCTX * context, SMBCSRV * server) { - socklen_t size; - struct sockaddr addr; + if (!cli_state_is_connected(server->cli)) { + return 1; + } - size = sizeof(addr); - return (getpeername(server->cli->fd, &addr, &size) == -1); + return 0; } /* |