s3:smbd: call message_dispatch() before processing incoming PDUs
authorStefan Metzmacher <metze@samba.org>
Sun, 18 Jan 2009 22:01:59 +0000 (23:01 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 19 Jan 2009 23:40:56 +0000 (00:40 +0100)
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

source3/smbd/process.c

index 0c076b3a53555110e0c1bebdc630136d52b574d6..ae115f399114072d2f4ce97276822ca5f23d99fd 100644 (file)
@@ -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(),