s3-smbclient: Fix cli_errstr() usage (part of bug #7864)
authorBjörn Baumbach <bb@sernet.de>
Thu, 20 Jan 2011 13:38:30 +0000 (14:38 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 25 Jan 2011 10:41:53 +0000 (11:41 +0100)
Convert cli_errstr() to nt_errstr()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jan 25 11:41:53 CET 2011 on sn-devel-104

source3/client/client.c

index cd9150d27725e8a0b9e1cbfaaa1a73cb39778838..3e48b010798f8631dc13958ced0a1adb388bbae5 100644 (file)
@@ -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 ",