summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-01-18 23:01:59 +0100
committerStefan Metzmacher <metze@samba.org>2009-01-20 00:40:56 +0100
commitfcf9f72e042ca97ede28a3d39c3ce406a3808b18 (patch)
tree1c9acb01f19f41a01f16c9d9ba951840d14f2c7e
parent3347ed7e6e416b0534777a73663a353c12cfece7 (diff)
downloadsamba-fcf9f72e042ca97ede28a3d39c3ce406a3808b18.tar.gz
samba-fcf9f72e042ca97ede28a3d39c3ce406a3808b18.tar.bz2
samba-fcf9f72e042ca97ede28a3d39c3ce406a3808b18.zip
s3:smbd: call message_dispatch() before processing incoming PDUs
This is a hack to fix races which happen with the RAW-RENAME and RAW-OPLOCK tests. We should try to remove it later. metze
-rw-r--r--source3/smbd/process.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 0c076b3a53..ae115f3991 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -407,6 +407,9 @@ static void smbd_deferred_open_timer(struct event_context *ev,
TALLOC_CTX *mem_ctx = talloc_tos();
uint8_t *inbuf;
+ /* TODO: remove this hack */
+ message_dispatch(smbd_messaging_context());
+
inbuf = (uint8_t *)talloc_memdup(mem_ctx, msg->buf.data,
msg->buf.length);
if (inbuf == NULL) {
@@ -1907,6 +1910,9 @@ static void smbd_server_connection_read_handler(struct smbd_server_connection *c
TALLOC_CTX *mem_ctx = talloc_tos();
NTSTATUS status;
+ /* TODO: remove this hack */
+ message_dispatch(smbd_messaging_context());
+
/* TODO: make this completely nonblocking */
status = receive_smb_talloc(mem_ctx, smbd_server_fd(),