summaryrefslogtreecommitdiff
path: root/source3/smbd/process.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-06-26 01:04:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:04 -0500
commit3e0f586298125bbda80b8edcced49d5bbb424b0d (patch)
treea0032b90f42f735c1fcfaaf99f3f6e5ee22236cd /source3/smbd/process.c
parent7f05a7d0c85fd3deaf5e3e263cf8b0f05d4a7f01 (diff)
downloadsamba-3e0f586298125bbda80b8edcced49d5bbb424b0d.tar.gz
samba-3e0f586298125bbda80b8edcced49d5bbb424b0d.tar.bz2
samba-3e0f586298125bbda80b8edcced49d5bbb424b0d.zip
r1263: Make "defer sharing violations" a global parameter.
Jeremy. (This used to be commit 42cdeccc36dc5f4bd133b84d4eaeb76f42f8043b)
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r--source3/smbd/process.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 72a604811b..60ce1499e8 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -151,6 +151,10 @@ void remove_sharing_violation_open_smb_message(uint16 mid)
{
struct pending_message_list *pml;
+ if (!lp_defer_sharing_violations()) {
+ return;
+ }
+
for (pml = smb_sharing_violation_queue; pml; pml = pml->next) {
if (mid == SVAL(pml->buf.data,smb_mid)) {
DEBUG(10,("remove_sharing_violation_open_smb_message: deleting mid %u len %u\n",
@@ -172,6 +176,10 @@ void schedule_sharing_violation_open_smb_message(uint16 mid)
struct pending_message_list *pml;
int i = 0;
+ if (!lp_defer_sharing_violations()) {
+ return;
+ }
+
for (pml = smb_sharing_violation_queue; pml; pml = pml->next) {
uint16 msg_mid = SVAL(pml->buf.data,smb_mid);
DEBUG(10,("schedule_sharing_violation_open_smb_message: [%d] msg_mid = %u\n", i++,
@@ -197,6 +205,11 @@ void schedule_sharing_violation_open_smb_message(uint16 mid)
BOOL open_was_deferred(uint16 mid)
{
struct pending_message_list *pml;
+
+ if (!lp_defer_sharing_violations()) {
+ return False;
+ }
+
for (pml = smb_sharing_violation_queue; pml; pml = pml->next) {
if (SVAL(pml->buf.data,smb_mid) == mid) {
return True;
@@ -212,6 +225,11 @@ BOOL open_was_deferred(uint16 mid)
struct pending_message_list *get_open_deferred_message(uint16 mid)
{
struct pending_message_list *pml;
+
+ if (!lp_defer_sharing_violations()) {
+ return NULL;
+ }
+
for (pml = smb_sharing_violation_queue; pml; pml = pml->next) {
if (SVAL(pml->buf.data,smb_mid) == mid) {
return pml;
@@ -231,6 +249,10 @@ BOOL push_sharing_violation_open_smb_message(struct timeval *ptv, char *private,
struct timeval tv;
SMB_BIG_INT tdif;
+ if (!lp_defer_sharing_violations()) {
+ return True;
+ }
+
tv = *ptv;
tdif = tv.tv_sec;
tdif *= 1000000;