summaryrefslogtreecommitdiff
path: root/source3/libsmb/clierror.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-09-22 21:09:00 +0200
committerStefan Metzmacher <metze@samba.org>2011-11-24 19:02:31 +0100
commit9ebdee281712dd6c89e406aa0e374e12c4dd8eb4 (patch)
tree244935ca18588a3464f0302c8bd315c4f4e906d1 /source3/libsmb/clierror.c
parentbda3d491b416f780f63841e9f3a92b9a94c2aadc (diff)
downloadsamba-9ebdee281712dd6c89e406aa0e374e12c4dd8eb4.tar.gz
samba-9ebdee281712dd6c89e406aa0e374e12c4dd8eb4.tar.bz2
samba-9ebdee281712dd6c89e406aa0e374e12c4dd8eb4.zip
s3:libsmb: implement cli_state based functions on top of smbXcli_conn/smbXcli_req
metze
Diffstat (limited to 'source3/libsmb/clierror.c')
-rw-r--r--source3/libsmb/clierror.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/source3/libsmb/clierror.c b/source3/libsmb/clierror.c
index 4ff5d9193b..4997d41fdf 100644
--- a/source3/libsmb/clierror.c
+++ b/source3/libsmb/clierror.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "libsmb/libsmb.h"
+#include "../libcli/smb/smbXcli_base.h"
/***************************************************************************
Return an error message - either an NT error, SMB error or a RAP error.
@@ -187,17 +188,14 @@ bool cli_state_is_connected(struct cli_state *cli)
return false;
}
- if (cli->conn.fd == -1) {
- return false;
- }
-
- return true;
+ return smbXcli_conn_is_connected(cli->conn);
}
void cli_state_disconnect(struct cli_state *cli)
{
- if (cli->conn.fd != -1) {
- close(cli->conn.fd);
- }
- cli->conn.fd = -1;
+ /*
+ * passing NT_STATUS_OK means the caller will not
+ * be notified, which matches the old behavior
+ */
+ smbXcli_conn_disconnect(cli->conn, NT_STATUS_OK);
}