From 07ccc2905dc5d0d74dc688ff830f504ea9665029 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Baumbach?= Date: Thu, 20 Jan 2011 14:38:30 +0100 Subject: [PATCH] s3-smbclient: Fix cli_errstr() usage (part of bug #7864) Convert cli_errstr() to nt_errstr() Signed-off-by: Stefan Metzmacher Autobuild-User: Stefan Metzmacher Autobuild-Date: Tue Jan 25 11:41:53 CET 2011 on sn-devel-104 --- source3/client/client.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/source3/client/client.c b/source3/client/client.c index cd9150d2772..3e48b010798 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -1108,13 +1108,15 @@ static int do_get(const char *rname, const char *lname_in, bool reget) } - if (!NT_STATUS_IS_OK(cli_qfileinfo_basic( - targetcli, fnum, &attr, &size, NULL, NULL, - NULL, NULL, NULL)) && - !NT_STATUS_IS_OK(cli_getattrE(targetcli, fnum, - &attr, &size, NULL, NULL, NULL))) { - d_printf("getattrib: %s\n",cli_errstr(targetcli)); - return 1; + status = cli_qfileinfo_basic(targetcli, fnum, &attr, &size, NULL, NULL, + NULL, NULL, NULL); + if (!NT_STATUS_IS_OK(status)) { + status = cli_getattrE(targetcli, fnum, &attr, &size, NULL, NULL, + NULL); + if(!NT_STATUS_IS_OK(status)) { + d_printf("getattrib: %s\n", nt_errstr(status)); + return 1; + } } DEBUG(1,("getting file %s of size %.0f as %s ", -- 2.11.4.GIT