The branch, master has been updated
       via  763fe42 s3:smb2_server: use sconn->ev_ctx instead of 
sconn->smb2.event_ctx
       via  7081d7e s3:smb2_lock: avoid using server_event_context()
       via  e7a1002 s3:smbd/pipes: avoid passing server_event_context() as 
event context to np_{read,write}_send
       via  bf8cce1 s3:smbd/process: avoid using server_event_context() for the 
forked echo handler
       via  16cfc72 s3:smbd/process: avoid using server_event_context() for 
smbd_deferred_open_timer events
       via  68a7be6 s3:smbd/oplock: avoid using server_event_context() in 
add_oplock_timeout_handler()
       via  6811b47 s3:smbd/service: avoid using server_event_context() for 
notify_init()
       via  c7286f1 s3:smbd/ipc: pass 'state' as mem_ctx to np_read_send()
       via  1df1e0f s3:smbd/fileio: avoid usage of server_event_context()
       via  61d8674 s3:smbd/close: avoid usage of server_event_context()
       via  1909cb0 s3:smbd/blocking: avoid usage of server_event_context()
       via  1ce9c0e s3:smbd: remember the event context on 
smbd_server_connection
       via  0b8eeb1 s3:smbd: pass down smbd_server_connection via 
smbd_echo_state
       via  bf35606 s3:smbd: remove references to the global smbd_server_conn
       via  6d84b24 s3:smbd: make struct pending_message_list private
       via  8b2b7d1 s3:smbd: remember the smbd_server_connection on 
pending_message_list
      from  8581f0b HEIMDAL: Supply krb5_context to _krb5_internal_hmac to 
allow logging

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 763fe4216b600f4b1e1db61dbd7e3b7579790970
Author: Stefan Metzmacher <[email protected]>
Date:   Mon Dec 12 14:15:03 2011 +0100

    s3:smb2_server: use sconn->ev_ctx instead of sconn->smb2.event_ctx
    
    metze
    
    Autobuild-User: Stefan Metzmacher <[email protected]>
    Autobuild-Date: Mon Dec 12 16:08:59 CET 2011 on sn-devel-104

commit 7081d7e78fd83acff6bfe743e1cb554fa382c65d
Author: Stefan Metzmacher <[email protected]>
Date:   Mon Dec 12 13:49:29 2011 +0100

    s3:smb2_lock: avoid using server_event_context()
    
    metze

commit e7a100200bf19655f7ebc100ff13ba6d4adfca78
Author: Stefan Metzmacher <[email protected]>
Date:   Mon Dec 12 13:47:56 2011 +0100

    s3:smbd/pipes: avoid passing server_event_context() as event context to 
np_{read,write}_send
    
    metze

commit bf8cce18c6dba9ed254a256ce3e8827e7f1e1827
Author: Stefan Metzmacher <[email protected]>
Date:   Mon Dec 12 13:54:10 2011 +0100

    s3:smbd/process: avoid using server_event_context() for the forked echo 
handler
    
    metze

commit 16cfc7243b733e3dd55595b3c29b052aaf7328ce
Author: Stefan Metzmacher <[email protected]>
Date:   Mon Dec 12 13:53:26 2011 +0100

    s3:smbd/process: avoid using server_event_context() for 
smbd_deferred_open_timer events
    
    metze

commit 68a7be6ab4caf787a0cdd857c9e069210ee5a5bf
Author: Stefan Metzmacher <[email protected]>
Date:   Mon Dec 12 13:51:27 2011 +0100

    s3:smbd/oplock: avoid using server_event_context() in 
add_oplock_timeout_handler()
    
    metze

commit 6811b47c99c4f8b8331f3a5a5d075e1b162d9472
Author: Stefan Metzmacher <[email protected]>
Date:   Mon Dec 12 13:50:51 2011 +0100

    s3:smbd/service: avoid using server_event_context() for notify_init()
    
    metze

commit c7286f159aceba9e10df7b5d73cc90411b4910b7
Author: Stefan Metzmacher <[email protected]>
Date:   Mon Dec 12 13:46:52 2011 +0100

    s3:smbd/ipc: pass 'state' as mem_ctx to np_read_send()
    
    metze

commit 1df1e0fb56f64cf2cf2ae115265a48f4968d3066
Author: Stefan Metzmacher <[email protected]>
Date:   Mon Dec 12 13:39:56 2011 +0100

    s3:smbd/fileio: avoid usage of server_event_context()
    
    metze

commit 61d867472771dfbd700e13605d1a3402f99f273b
Author: Stefan Metzmacher <[email protected]>
Date:   Mon Dec 12 13:39:56 2011 +0100

    s3:smbd/close: avoid usage of server_event_context()
    
    metze

commit 1909cb0724cbb981f284305dcc0ace62026dcffa
Author: Stefan Metzmacher <[email protected]>
Date:   Mon Dec 12 13:39:56 2011 +0100

    s3:smbd/blocking: avoid usage of server_event_context()
    
    metze

commit 1ce9c0ea3215eaa0956338972987704608d9d78e
Author: Stefan Metzmacher <[email protected]>
Date:   Mon Dec 12 13:18:59 2011 +0100

    s3:smbd: remember the event context on smbd_server_connection
    
    metze

commit 0b8eeb1edc8ece6538c88c026b90439d2823bd9e
Author: Stefan Metzmacher <[email protected]>
Date:   Mon Dec 12 11:20:06 2011 +0100

    s3:smbd: pass down smbd_server_connection via smbd_echo_state
    
    metze

commit bf35606bbf8bd8146238c50c1e10d583ca0ab443
Author: Stefan Metzmacher <[email protected]>
Date:   Mon Dec 12 11:20:06 2011 +0100

    s3:smbd: remove references to the global smbd_server_conn
    
    metze

commit 6d84b24d766eb5c7c4504d1f51b51dd6c7cb185b
Author: Stefan Metzmacher <[email protected]>
Date:   Mon Dec 12 11:19:05 2011 +0100

    s3:smbd: make struct pending_message_list private
    
    metze

commit 8b2b7d1c87b475b61ef5259cee0ae77afe47a667
Author: Stefan Metzmacher <[email protected]>
Date:   Mon Dec 12 11:11:55 2011 +0100

    s3:smbd: remember the smbd_server_connection on pending_message_list
    
    metze

-----------------------------------------------------------------------

Summary of changes:
 source3/include/smb.h       |   13 ---------
 source3/smbd/blocking.c     |    6 ++--
 source3/smbd/close.c        |    2 +-
 source3/smbd/fileio.c       |    6 ++--
 source3/smbd/globals.c      |    1 +
 source3/smbd/globals.h      |    2 +-
 source3/smbd/ipc.c          |    4 +-
 source3/smbd/oplock.c       |    6 ++--
 source3/smbd/pipes.c        |    6 ++--
 source3/smbd/process.c      |   63 +++++++++++++++++++++++++++---------------
 source3/smbd/service.c      |    2 +-
 source3/smbd/smb2_break.c   |    2 +-
 source3/smbd/smb2_create.c  |    6 ++--
 source3/smbd/smb2_find.c    |    2 +-
 source3/smbd/smb2_flush.c   |    2 +-
 source3/smbd/smb2_getinfo.c |    2 +-
 source3/smbd/smb2_ioctl.c   |    4 +-
 source3/smbd/smb2_lock.c    |    6 ++--
 source3/smbd/smb2_notify.c  |    4 +-
 source3/smbd/smb2_read.c    |    4 +-
 source3/smbd/smb2_server.c  |   16 +++++------
 source3/smbd/smb2_setinfo.c |    2 +-
 source3/smbd/smb2_write.c   |    4 +-
 23 files changed, 84 insertions(+), 81 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/smb.h b/source3/include/smb.h
index d3a27e9..8c521f8 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -528,19 +528,6 @@ struct interface {
        struct sockaddr_storage bcast;
 };
 
-/* Internal message queue for deferred opens. */
-struct pending_message_list {
-       struct pending_message_list *next, *prev;
-       struct timeval request_time; /* When was this first issued? */
-       struct timed_event *te;
-       struct smb_perfcount_data pcd;
-       uint32_t seqnum;
-       bool encrypted;
-       bool processed;
-       DATA_BLOB buf;
-       DATA_BLOB private_data;
-};
-
 #define SHARE_MODE_FLAG_POSIX_OPEN     0x1
 
 #include "librpc/gen_ndr/server_id.h"
diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c
index d9c1fb2..f07a792 100644
--- a/source3/smbd/blocking.c
+++ b/source3/smbd/blocking.c
@@ -139,9 +139,9 @@ static bool recalc_brl_timeout(struct 
smbd_server_connection *sconn)
                    (int)from_now.tv_sec, (int)from_now.tv_usec));
        }
 
-       sconn->smb1.locks.brl_timeout = event_add_timed(server_event_context(),
-                                                       NULL, next_timeout,
-                                                       brl_timeout_fn, sconn);
+       sconn->smb1.locks.brl_timeout = tevent_add_timer(sconn->ev_ctx,
+                                                        NULL, next_timeout,
+                                                        brl_timeout_fn, sconn);
        if (sconn->smb1.locks.brl_timeout == NULL) {
                return False;
        }
diff --git a/source3/smbd/close.c b/source3/smbd/close.c
index b259045..8fd6b1f 100644
--- a/source3/smbd/close.c
+++ b/source3/smbd/close.c
@@ -289,7 +289,7 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp,
 
        /* Ensure any pending write time updates are done. */
        if (fsp->update_write_time_event) {
-               update_write_time_handler(server_event_context(),
+               update_write_time_handler(fsp->conn->sconn->ev_ctx,
                                        fsp->update_write_time_event,
                                        timeval_current(),
                                        (void *)fsp);
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c
index 3b317f9..85d879d 100644
--- a/source3/smbd/fileio.c
+++ b/source3/smbd/fileio.c
@@ -240,9 +240,9 @@ void trigger_write_time_update(struct files_struct *fsp)
 
        /* trigger the update 2 seconds later */
        fsp->update_write_time_event =
-               event_add_timed(server_event_context(), NULL,
-                               timeval_current_ofs_usec(delay),
-                               update_write_time_handler, fsp);
+               tevent_add_timer(fsp->conn->sconn->ev_ctx, NULL,
+                                timeval_current_ofs_usec(delay),
+                                update_write_time_handler, fsp);
 }
 
 void trigger_write_time_update_immediate(struct files_struct *fsp)
diff --git a/source3/smbd/globals.c b/source3/smbd/globals.c
index 043b1da..aa17f69 100644
--- a/source3/smbd/globals.c
+++ b/source3/smbd/globals.c
@@ -174,6 +174,7 @@ void smbd_init_globals(void)
                exit_server("failed to create smbd_server_connection");
        }
 
+       smbd_server_conn->ev_ctx = server_event_context();
        smbd_server_conn->smb1.echo_handler.trusted_fd = -1;
        smbd_server_conn->smb1.echo_handler.socket_lock_fd = -1;
 }
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index a02988a..0e4e9e8 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -451,6 +451,7 @@ struct smbd_server_connection {
        const struct tsocket_address *local_address;
        const struct tsocket_address *remote_address;
        const char *remote_hostname;
+       struct tevent_context *ev_ctx;
        struct messaging_context *msg_ctx;
        struct {
                bool got_session;
@@ -583,7 +584,6 @@ struct smbd_server_connection {
                } locks;
        } smb1;
        struct {
-               struct tevent_context *event_ctx;
                struct tevent_queue *recv_queue;
                struct tevent_queue *send_queue;
                struct tstream_context *stream;
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c
index 669e28e..36c2916 100644
--- a/source3/smbd/ipc.c
+++ b/source3/smbd/ipc.c
@@ -268,7 +268,7 @@ static void api_dcerpc_cmd(connection_struct *conn, struct 
smb_request *req,
        state->num_data = length;
        state->max_read = max_read;
 
-       subreq = np_write_send(state, server_event_context(), state->handle,
+       subreq = np_write_send(state, req->sconn->ev_ctx, state->handle,
                               state->data, length);
        if (subreq == NULL) {
                TALLOC_FREE(state);
@@ -305,7 +305,7 @@ static void api_dcerpc_cmd_write_done(struct tevent_req 
*subreq)
                goto send;
        }
 
-       subreq = np_read_send(req->conn, server_event_context(),
+       subreq = np_read_send(state, req->sconn->ev_ctx,
                              state->handle, state->data, state->max_read);
        if (subreq == NULL) {
                reply_nterror(req, NT_STATUS_NO_MEMORY);
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c
index 2d3ce5f..48e8bb5 100644
--- a/source3/smbd/oplock.c
+++ b/source3/smbd/oplock.c
@@ -354,9 +354,9 @@ static void add_oplock_timeout_handler(files_struct *fsp)
        }
 
        fsp->oplock_timeout =
-               event_add_timed(server_event_context(), fsp,
-                               timeval_current_ofs(OPLOCK_BREAK_TIMEOUT, 0),
-                               oplock_timeout_handler, fsp);
+               tevent_add_timer(fsp->conn->sconn->ev_ctx, fsp,
+                                timeval_current_ofs(OPLOCK_BREAK_TIMEOUT, 0),
+                                oplock_timeout_handler, fsp);
 
        if (fsp->oplock_timeout == NULL) {
                DEBUG(0, ("Could not add oplock timeout handler\n"));
diff --git a/source3/smbd/pipes.c b/source3/smbd/pipes.c
index 2ff3779..b680087 100644
--- a/source3/smbd/pipes.c
+++ b/source3/smbd/pipes.c
@@ -202,7 +202,7 @@ void reply_pipe_write(struct smb_request *req)
        DEBUG(6, ("reply_pipe_write: %x name: %s len: %d\n", (int)fsp->fnum,
                  fsp_str_dbg(fsp), (int)state->numtowrite));
 
-       subreq = np_write_send(state, server_event_context(),
+       subreq = np_write_send(state, req->sconn->ev_ctx,
                               fsp->fake_file_handle, data, state->numtowrite);
        if (subreq == NULL) {
                TALLOC_FREE(state);
@@ -318,7 +318,7 @@ void reply_pipe_write_and_X(struct smb_request *req)
                state->numtowrite -= 2;
        }
 
-       subreq = np_write_send(state, server_event_context(),
+       subreq = np_write_send(state, req->sconn->ev_ctx,
                               fsp->fake_file_handle, data, state->numtowrite);
        if (subreq == NULL) {
                TALLOC_FREE(state);
@@ -425,7 +425,7 @@ void reply_pipe_read_and_X(struct smb_request *req)
        state->outbuf = req->outbuf;
        req->outbuf = NULL;
 
-       subreq = np_read_send(state, server_event_context(),
+       subreq = np_read_send(state, req->sconn->ev_ctx,
                              fsp->fake_file_handle, data,
                              state->smb_maxcnt);
        if (subreq == NULL) {
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 073ee39..64dec52 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -39,6 +39,20 @@
 
 extern bool global_machine_password_needs_changing;
 
+/* Internal message queue for deferred opens. */
+struct pending_message_list {
+       struct pending_message_list *next, *prev;
+       struct timeval request_time; /* When was this first issued? */
+       struct smbd_server_connection *sconn;
+       struct timed_event *te;
+       struct smb_perfcount_data pcd;
+       uint32_t seqnum;
+       bool encrypted;
+       bool processed;
+       DATA_BLOB buf;
+       DATA_BLOB private_data;
+};
+
 static void construct_reply_common(struct smb_request *req, const char *inbuf,
                                   char *outbuf);
 static struct pending_message_list *get_deferred_open_message_smb(
@@ -558,6 +572,7 @@ static void smbd_deferred_open_timer(struct event_context 
*ev,
 {
        struct pending_message_list *msg = talloc_get_type(private_data,
                                           struct pending_message_list);
+       struct smbd_server_connection *sconn = msg->sconn;
        TALLOC_CTX *mem_ctx = talloc_tos();
        uint64_t mid = (uint64_t)SVAL(msg->buf.data,smb_mid);
        uint8_t *inbuf;
@@ -578,14 +593,14 @@ static void smbd_deferred_open_timer(struct event_context 
*ev,
         * re-processed in error. */
        msg->processed = true;
 
-       process_smb(smbd_server_conn, inbuf,
+       process_smb(sconn, inbuf,
                    msg->buf.length, 0,
                    msg->seqnum, msg->encrypted, &msg->pcd);
 
        /* If it's still there and was processed, remove it. */
-       msg = get_deferred_open_message_smb(smbd_server_conn, mid);
+       msg = get_deferred_open_message_smb(sconn, mid);
        if (msg && msg->processed) {
-               remove_deferred_open_message_smb(smbd_server_conn, mid);
+               remove_deferred_open_message_smb(sconn, mid);
        }
 }
 
@@ -608,6 +623,7 @@ static bool push_queued_message(struct smb_request *req,
                DEBUG(0,("push_message: malloc fail (1)\n"));
                return False;
        }
+       msg->sconn = req->sconn;
 
        msg->buf = data_blob_talloc(msg, req->inbuf, msg_len);
        if(msg->buf.data == NULL) {
@@ -632,11 +648,11 @@ static bool push_queued_message(struct smb_request *req,
                }
        }
 
-       msg->te = event_add_timed(server_event_context(),
-                                 msg,
-                                 end_time,
-                                 smbd_deferred_open_timer,
-                                 msg);
+       msg->te = tevent_add_timer(msg->sconn->ev_ctx,
+                                  msg,
+                                  end_time,
+                                  smbd_deferred_open_timer,
+                                  msg);
        if (!msg->te) {
                DEBUG(0,("push_message: event_add_timed failed\n"));
                TALLOC_FREE(msg);
@@ -719,11 +735,11 @@ void schedule_deferred_open_message_smb(struct 
smbd_server_connection *sconn,
                                "scheduling mid %llu\n",
                                (unsigned long long)mid ));
 
-                       te = event_add_timed(server_event_context(),
-                                            pml,
-                                            timeval_zero(),
-                                            smbd_deferred_open_timer,
-                                            pml);
+                       te = tevent_add_timer(pml->sconn->ev_ctx,
+                                             pml,
+                                             timeval_zero(),
+                                             smbd_deferred_open_timer,
+                                             pml);
                        if (!te) {
                                DEBUG(10,("schedule_deferred_open_message_smb: "
                                        "event_add_timed() failed, "
@@ -790,7 +806,7 @@ bool get_deferred_open_message_state(struct smb_request 
*smbreq,
 {
        struct pending_message_list *pml;
 
-       if (smbd_server_conn->using_smb2) {
+       if (smbreq->sconn->using_smb2) {
                return get_deferred_open_message_state_smb2(smbreq->smb2req,
                                        p_request_time,
                                        pp_state);
@@ -2366,9 +2382,9 @@ static bool keepalive_fn(const struct timeval *now, void 
*private_data)
                return false;
        }
 
-       smbd_lock_socket(smbd_server_conn);
+       smbd_lock_socket(sconn);
        ret = send_keepalive(sconn->sock);
-       smbd_unlock_socket(smbd_server_conn);
+       smbd_unlock_socket(sconn);
 
        if (!ret) {
                char addr[INET6_ADDRSTRLEN];
@@ -2648,7 +2664,8 @@ static void smbd_echo_writer_done(struct tevent_req *req)
        smbd_echo_activate_writer(state);
 }
 
-static bool smbd_echo_reply(uint8_t *inbuf, size_t inbuf_len,
+static bool smbd_echo_reply(struct smbd_echo_state *state,
+                           uint8_t *inbuf, size_t inbuf_len,
                            uint32_t seqnum)
 {
        struct smb_request req;
@@ -2669,12 +2686,12 @@ static bool smbd_echo_reply(uint8_t *inbuf, size_t 
inbuf_len,
                DEBUG(10, ("Got short packet: %d bytes\n", (int)inbuf_len));
                return false;
        }
-       if (!valid_smb_header(smbd_server_conn, inbuf)) {
+       if (!valid_smb_header(state->sconn, inbuf)) {
                DEBUG(10, ("Got invalid SMB header\n"));
                return false;
        }
 
-       if (!init_smb_request(&req, smbd_server_conn, inbuf, 0, false,
+       if (!init_smb_request(&req, state->sconn, inbuf, 0, false,
                              seqnum)) {
                return false;
        }
@@ -2798,7 +2815,7 @@ static void smbd_echo_got_packet(struct tevent_req *req)
                exit(1);
        }
 
-       reply = smbd_echo_reply((uint8_t *)buf, buflen, seqnum);
+       reply = smbd_echo_reply(state, (uint8_t *)buf, buflen, seqnum);
        if (!reply) {
                size_t num_pending;
                struct iovec *tmp;
@@ -2868,7 +2885,7 @@ bool fork_echo_handler(struct smbd_server_connection 
*sconn)
                set_blocking(listener_pipe[1], false);
 
                status = reinit_after_fork(sconn->msg_ctx,
-                                          server_event_context(),
+                                          sconn->ev_ctx,
                                           procid_self(), false);
                if (!NT_STATUS_IS_OK(status)) {
                        DEBUG(1, ("reinit_after_fork failed: %s\n",
@@ -2888,10 +2905,10 @@ bool fork_echo_handler(struct smbd_server_connection 
*sconn)
         * Without smb signing this is the same as the normal smbd
         * listener. This needs to change once signing comes in.
         */
-       sconn->smb1.echo_handler.trusted_fde = 
event_add_fd(server_event_context(),
+       sconn->smb1.echo_handler.trusted_fde = tevent_add_fd(sconn->ev_ctx,
                                        sconn,
                                        sconn->smb1.echo_handler.trusted_fd,
-                                       EVENT_FD_READ,
+                                       TEVENT_FD_READ,
                                        smbd_server_echo_handler,
                                        sconn);
        if (sconn->smb1.echo_handler.trusted_fde == NULL) {
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index f41bdb5..bd762c7 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -718,7 +718,7 @@ connection_struct *make_connection_snum(struct 
smbd_server_connection *sconn,
                conn->notify_ctx = notify_init(conn,
                                               sconn_server_id(sconn),
                                               sconn->msg_ctx,
-                                              server_event_context(),
+                                              sconn->ev_ctx,
                                               conn);
        }
 
diff --git a/source3/smbd/smb2_break.c b/source3/smbd/smb2_break.c
index 9899d92..310b24b 100644
--- a/source3/smbd/smb2_break.c
+++ b/source3/smbd/smb2_break.c
@@ -69,7 +69,7 @@ NTSTATUS smbd_smb2_request_process_break(struct 
smbd_smb2_request *req)
        }
 
        subreq = smbd_smb2_oplock_break_send(req,
-                                            req->sconn->smb2.event_ctx,
+                                            req->sconn->ev_ctx,
                                             req,
                                             in_oplock_level,
                                             in_file_id_volatile);
diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c
index 6d7d4ac..302cfd7 100644
--- a/source3/smbd/smb2_create.c
+++ b/source3/smbd/smb2_create.c
@@ -227,7 +227,7 @@ NTSTATUS smbd_smb2_request_process_create(struct 
smbd_smb2_request *smb2req)
        }
 
        tsubreq = smbd_smb2_create_send(smb2req,
-                                      smb2req->sconn->smb2.event_ctx,
+                                      smb2req->sconn->ev_ctx,
                                       smb2req,
                                       in_oplock_level,
                                       in_impersonation_level,
@@ -1095,7 +1095,7 @@ void schedule_deferred_open_message_smb2(
                (unsigned long long)mid ));
 
        tevent_schedule_immediate(state->im,
-                       smb2req->sconn->smb2.event_ctx,
+                       smb2req->sconn->ev_ctx,
                        smbd_smb2_create_request_dispatch_immediate,
                        smb2req);
 }
@@ -1215,7 +1215,7 @@ bool push_deferred_open_message_smb2(struct 
smbd_smb2_request *smb2req,
                                &end_time,
                                true) ));
 
-       state->te = event_add_timed(smb2req->sconn->smb2.event_ctx,
+       state->te = tevent_add_timer(smb2req->sconn->ev_ctx,
                                state,
                                end_time,
                                smb2_deferred_open_timer,
diff --git a/source3/smbd/smb2_find.c b/source3/smbd/smb2_find.c
index 9b1179f..671b5f5 100644
--- a/source3/smbd/smb2_find.c
+++ b/source3/smbd/smb2_find.c
@@ -122,7 +122,7 @@ NTSTATUS smbd_smb2_request_process_find(struct 
smbd_smb2_request *req)
        }
 
        subreq = smbd_smb2_find_send(req,
-                                    req->sconn->smb2.event_ctx,
+                                    req->sconn->ev_ctx,
                                     req,
                                     in_file_info_class,
                                     in_flags,
diff --git a/source3/smbd/smb2_flush.c b/source3/smbd/smb2_flush.c
index 3464c58..fecce45 100644
--- a/source3/smbd/smb2_flush.c
+++ b/source3/smbd/smb2_flush.c
@@ -56,7 +56,7 @@ NTSTATUS smbd_smb2_request_process_flush(struct 
smbd_smb2_request *req)
        }
 
        subreq = smbd_smb2_flush_send(req,
-                                     req->sconn->smb2.event_ctx,
+                                     req->sconn->ev_ctx,
                                      req,
                                      in_file_id_volatile);
        if (subreq == NULL) {
diff --git a/source3/smbd/smb2_getinfo.c b/source3/smbd/smb2_getinfo.c
index 81d781a..340130e 100644
--- a/source3/smbd/smb2_getinfo.c
+++ b/source3/smbd/smb2_getinfo.c
@@ -104,7 +104,7 @@ NTSTATUS smbd_smb2_request_process_getinfo(struct 
smbd_smb2_request *req)
        }
 
        subreq = smbd_smb2_getinfo_send(req,
-                                       req->sconn->smb2.event_ctx,
+                                       req->sconn->ev_ctx,
                                        req,
                                        in_info_type,
                                        in_file_info_class,
diff --git a/source3/smbd/smb2_ioctl.c b/source3/smbd/smb2_ioctl.c
index b7b4592..56d9a32 100644
--- a/source3/smbd/smb2_ioctl.c
+++ b/source3/smbd/smb2_ioctl.c
@@ -98,7 +98,7 @@ NTSTATUS smbd_smb2_request_process_ioctl(struct 
smbd_smb2_request *req)
        }
 
        subreq = smbd_smb2_ioctl_send(req,
-                                     req->sconn->smb2.event_ctx,
+                                     req->sconn->ev_ctx,
                                      req,
                                      in_ctl_code,
                                      in_file_id_volatile,
@@ -555,7 +555,7 @@ static void smbd_smb2_ioctl_pipe_write_done(struct 
tevent_req *subreq)
 
        TALLOC_FREE(subreq);
        subreq = np_read_send(state->smbreq->conn,
-                             state->smb2req->sconn->smb2.event_ctx,
+                             state->smb2req->sconn->ev_ctx,
                              state->fsp->fake_file_handle,
                              state->out_output.data,
                              state->out_output.length);
diff --git a/source3/smbd/smb2_lock.c b/source3/smbd/smb2_lock.c
index 4f88bb8..8f4df3d 100644
--- a/source3/smbd/smb2_lock.c
+++ b/source3/smbd/smb2_lock.c
@@ -122,7 +122,7 @@ NTSTATUS smbd_smb2_request_process_lock(struct 
smbd_smb2_request *req)
        }
 
        subreq = smbd_smb2_lock_send(req,
-                                    req->sconn->smb2.event_ctx,
+                                    req->sconn->ev_ctx,
                                     req,
                                     in_smbpid,
                                     in_file_id_volatile,
@@ -561,8 +561,8 @@ static bool recalc_smb2_brl_timeout(struct 
smbd_server_connection *sconn)
                        (int)from_now.tv_sec, (int)from_now.tv_usec));
        }
 
-       sconn->smb2.locks.brl_timeout = event_add_timed(
-                               server_event_context(),
+       sconn->smb2.locks.brl_timeout = tevent_add_timer(
+                               sconn->ev_ctx,
                                NULL,
                                next_timeout,
                                brl_timeout_fn,
diff --git a/source3/smbd/smb2_notify.c b/source3/smbd/smb2_notify.c
index 5375e21..0ea0b09 100644
--- a/source3/smbd/smb2_notify.c
+++ b/source3/smbd/smb2_notify.c
@@ -84,7 +84,7 @@ NTSTATUS smbd_smb2_request_process_notify(struct 
smbd_smb2_request *req)
        }
 
        subreq = smbd_smb2_notify_send(req,
-                                      req->sconn->smb2.event_ctx,
+                                      req->sconn->ev_ctx,
                                       req,
                                       in_flags,
                                       in_output_buffer_length,
@@ -347,7 +347,7 @@ static void smbd_smb2_notify_reply(struct smb_request 
*smbreq,
         * being arround after calling this function


-- 
Samba Shared Repository

Reply via email to