From c5fbb6f23c2d399c7510bc552cdb1a27b1ef66a8 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 4 Aug 2004 13:23:35 +0000 Subject: r1654: rename cli_ -> smbcli_ rename CLI_ -> SMBCLI_ metze (This used to be commit 8441750fd9427dd6fe477f27e603821b4026f038) --- source4/torture/locktest2.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'source4/torture/locktest2.c') diff --git a/source4/torture/locktest2.c b/source4/torture/locktest2.c index 40227d29979..63f71f20045 100644 --- a/source4/torture/locktest2.c +++ b/source4/torture/locktest2.c @@ -60,13 +60,13 @@ struct record { static struct record *recorded; -static int try_open(struct cli_state *c, char *nfs, int fstype, const char *fname, int flags) +static int try_open(struct smbcli_state *c, char *nfs, int fstype, const char *fname, int flags) { pstring path; switch (fstype) { case FSTYPE_SMB: - return cli_open(c, fname, flags, DENY_NONE); + return smbcli_open(c, fname, flags, DENY_NONE); case FSTYPE_NFS: slprintf(path, sizeof(path), "%s%s", nfs, fname); @@ -77,11 +77,11 @@ static int try_open(struct cli_state *c, char *nfs, int fstype, const char *fnam return -1; } -static BOOL try_close(struct cli_state *c, int fstype, int fd) +static BOOL try_close(struct smbcli_state *c, int fstype, int fd) { switch (fstype) { case FSTYPE_SMB: - return cli_close(c, fd); + return smbcli_close(c, fd); case FSTYPE_NFS: return close(fd) == 0; @@ -90,7 +90,7 @@ static BOOL try_close(struct cli_state *c, int fstype, int fd) return False; } -static BOOL try_lock(struct cli_state *c, int fstype, +static BOOL try_lock(struct smbcli_state *c, int fstype, int fd, uint_t start, uint_t len, enum brl_type op) { @@ -98,7 +98,7 @@ static BOOL try_lock(struct cli_state *c, int fstype, switch (fstype) { case FSTYPE_SMB: - return cli_lock(c, fd, start, len, LOCK_TIMEOUT, op); + return smbcli_lock(c, fd, start, len, LOCK_TIMEOUT, op); case FSTYPE_NFS: lock.l_type = (op==READ_LOCK) ? F_RDLCK:F_WRLCK; @@ -112,14 +112,14 @@ static BOOL try_lock(struct cli_state *c, int fstype, return False; } -static BOOL try_unlock(struct cli_state *c, int fstype, +static BOOL try_unlock(struct smbcli_state *c, int fstype, int fd, uint_t start, uint_t len) { struct flock lock; switch (fstype) { case FSTYPE_SMB: - return cli_unlock(c, fd, start, len); + return smbcli_unlock(c, fd, start, len); case FSTYPE_NFS: lock.l_type = F_UNLCK; @@ -147,9 +147,9 @@ static void print_brl(SMB_DEV_T dev, SMB_INO_T ino, int pid, /***************************************************** return a connection to a server *******************************************************/ -static struct cli_state *connect_one(char *share) +static struct smbcli_state *connect_one(char *share) { - struct cli_state *c; + struct smbcli_state *c; char *server_n; fstring server; fstring myname; @@ -173,12 +173,12 @@ static struct cli_state *connect_one(char *share) slprintf(myname,sizeof(myname), "lock-%u-%u", getpid(), count++); - nt_status = cli_full_connection(&c, myname, server_n, NULL, 0, share, "?????", + nt_status = smbcli_full_connection(&c, myname, server_n, NULL, 0, share, "?????", username, lp_workgroup(), password, 0, NULL); if (!NT_STATUS_IS_OK(nt_status)) { - DEBUG(0, ("cli_full_connection failed with error %s\n", nt_errstr(nt_status))); + DEBUG(0, ("smbcli_full_connection failed with error %s\n", nt_errstr(nt_status))); return NULL; } @@ -188,7 +188,7 @@ static struct cli_state *connect_one(char *share) } -static void reconnect(struct cli_state *cli[NSERVERS][NCONNECTIONS], +static void reconnect(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], char *nfs[NSERVERS], int fnum[NSERVERS][NUMFSTYPES][NCONNECTIONS][NFILES], char *share1, char *share2) @@ -204,10 +204,10 @@ static void reconnect(struct cli_state *cli[NSERVERS][NCONNECTIONS], for (conn=0;conn