s3-torture: Fix cli_errstr() usage (part of bug #7864)
authorBjörn Baumbach <bb@sernet.de>
Mon, 17 Jan 2011 12:03:05 +0000 (13:03 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 25 Jan 2011 19:06:36 +0000 (11:06 -0800)
Convert cli_errstr() to nt_errstr()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 99f8f5e5945c5cd694dbb37fa947c04a24e25957)

source3/torture/locktest.c

index 9c8c6965b1f48e869a63a89ee93511271cd9a2ab..9a47f991ea382834cab3b3615eeef9b269fd9de0 100644 (file)
@@ -233,13 +233,12 @@ static struct cli_state *connect_one(char *share, int snum)
                fstrcpy(username[1], username[0]);
        }
 
-       if (!NT_STATUS_IS_OK(cli_session_setup(c, username[snum], 
-                                              password[snum],
-                                              strlen(password[snum]),
-                                              password[snum],
-                                              strlen(password[snum]),
-                                              lp_workgroup()))) {
-               DEBUG(0,("session setup failed: %s\n", cli_errstr(c)));
+       status = cli_session_setup(c, username[snum],
+                                  password[snum], strlen(password[snum]),
+                                  password[snum], strlen(password[snum]),
+                                  lp_workgroup());
+       if (!NT_STATUS_IS_OK(status)) {
+               DEBUG(0,("session setup failed: %s\n", nt_errstr(status)));
                return NULL;
        }