s3-talloc Change TALLOC_ARRAY() to talloc_array()
[samba.git] / source3 / smbd / oplock.c
index f87c6667a1a89c78492eeef08d089632e7890988..8482a00f641a0fe30cddf280e89f06952ebec373 100644 (file)
@@ -23,7 +23,6 @@
 #include "includes.h"
 #include "smbd/smbd.h"
 #include "smbd/globals.h"
-#include "librpc/gen_ndr/messaging.h"
 #include "messages.h"
 
 /****************************************************************************
@@ -225,7 +224,7 @@ bool should_notify_deferred_opens()
 static char *new_break_message_smb1(TALLOC_CTX *mem_ctx,
                                   files_struct *fsp, int cmd)
 {
-       char *result = TALLOC_ARRAY(mem_ctx, char, smb_size + 8*2 + 0);
+       char *result = talloc_array(mem_ctx, char, smb_size + 8*2 + 0);
 
        if (result == NULL) {
                DEBUG(0, ("talloc failed\n"));
@@ -354,7 +353,7 @@ static void add_oplock_timeout_handler(files_struct *fsp)
        }
 
        fsp->oplock_timeout =
-               event_add_timed(smbd_event_context(), fsp,
+               event_add_timed(server_event_context(), fsp,
                                timeval_current_ofs(OPLOCK_BREAK_TIMEOUT, 0),
                                oplock_timeout_handler, fsp);