summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-07-11 14:15:21 +0200
committerStefan Metzmacher <metze@samba.org>2011-07-11 18:18:27 +0200
commita2e248f27084fd81631dd3dc6614e078d8f99924 (patch)
treee2eabc0925911924dff85a08a4a8c8916a7983d2 /source3
parente7c9319cacab287cb5772e38f30e9492afc82e8d (diff)
downloadsamba-a2e248f27084fd81631dd3dc6614e078d8f99924.tar.gz
samba-a2e248f27084fd81631dd3dc6614e078d8f99924.tar.bz2
samba-a2e248f27084fd81631dd3dc6614e078d8f99924.zip
s3:libsmbclient: use cli_state_is_connected() in SMBC_check_server()
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/libsmb_server.c8
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;
}
/*