summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-11-08 16:33:56 +0100
committerMichael Adam <obnox@samba.org>2011-11-09 01:02:08 +0100
commit3078c27be1e0d204fe27af0f4f23f425f96b4f29 (patch)
tree4ebc2a8c90ddfae2b5f3b5b5b4bca97f4e1e6e82
parent7f1920801beca3d098c69a9a681e8a88e12f086d (diff)
downloadsamba-3078c27be1e0d204fe27af0f4f23f425f96b4f29.tar.gz
samba-3078c27be1e0d204fe27af0f4f23f425f96b4f29.tar.bz2
samba-3078c27be1e0d204fe27af0f4f23f425f96b4f29.zip
s4:torture:smb2: lease: oplock_level is uint8_t, not uint32_t or int
-rw-r--r--source4/torture/smb2/lease.c8
-rw-r--r--source4/torture/smb2/util.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/source4/torture/smb2/lease.c b/source4/torture/smb2/lease.c
index dca4bd4bb9..007cde5c43 100644
--- a/source4/torture/smb2/lease.c
+++ b/source4/torture/smb2/lease.c
@@ -42,7 +42,7 @@
static void smb2_generic_create(struct smb2_create *io, struct smb2_lease *ls,
bool dir, const char *name, uint32_t disposition,
- uint32_t oplock, uint64_t leasekey,
+ uint8_t oplock, uint64_t leasekey,
uint32_t leasestate)
{
ZERO_STRUCT(*io);
@@ -88,7 +88,7 @@ static void smb2_lease_create(struct smb2_create *io, struct smb2_lease *ls,
}
static void smb2_oplock_create(struct smb2_create *io, const char *name,
- uint32_t oplock)
+ uint8_t oplock)
{
smb2_generic_create(io, NULL, false, name, NTCREATEX_DISP_OPEN_IF,
oplock, 0, 0);
@@ -398,8 +398,8 @@ static struct {
int failures;
struct smb2_handle oplock_handle;
- int held_oplock_level;
- int oplock_level;
+ uint8_t held_oplock_level;
+ uint8_t oplock_level;
int oplock_count;
int oplock_failures;
} break_info;
diff --git a/source4/torture/smb2/util.c b/source4/torture/smb2/util.c
index 85cf0f7fba..4d078adbea 100644
--- a/source4/torture/smb2/util.c
+++ b/source4/torture/smb2/util.c
@@ -544,9 +544,9 @@ uint32_t smb2_util_share_access(const char *sharemode)
return val;
}
-uint32_t smb2_util_oplock_level(const char *op)
+uint8_t smb2_util_oplock_level(const char *op)
{
- uint32_t val = SMB2_OPLOCK_LEVEL_NONE;
+ uint8_t val = SMB2_OPLOCK_LEVEL_NONE;
int i;
for (i = 0; i < strlen(op); i++) {