s3:smbd/oplock: avoid using server_event_context() in add_oplock_timeout_handler()
authorStefan Metzmacher <metze@samba.org>
Mon, 12 Dec 2011 12:51:27 +0000 (13:51 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 12 Dec 2011 13:35:43 +0000 (14:35 +0100)
metze

source3/smbd/oplock.c

index 2d3ce5feaf3433fbf75efb7bc0a7b4f8006ec5ae..48e8bb5d12b799dcdbc898c303ede6e5c792b340 100644 (file)
@@ -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"));