s3:smbd: move all globals and static variables in globals.[ch]
[samba.git] / source3 / smbd / oplock.c
index 261d8fd6702def7e9dec90b875adaf2dc7832662..3fd5afef22f2352149917d76cd108050bc7ba35d 100644 (file)
 
 #define DBGC_CLASS DBGC_LOCKING
 #include "includes.h"
-
-/* Current number of oplocks we have outstanding. */
-static int32 exclusive_oplocks_open = 0;
-static int32 level_II_oplocks_open = 0;
-bool global_client_failed_oplock_break = False;
-
-extern uint32 global_client_caps;
-
-static struct kernel_oplocks *koplocks;
+#include "smbd/globals.h"
 
 /****************************************************************************
  Get the number of current exclusive oplocks.
@@ -346,7 +338,7 @@ static files_struct *initial_break_processing(struct file_id id, unsigned long f
 
 static void oplock_timeout_handler(struct event_context *ctx,
                                   struct timed_event *te,
-                                  const struct timeval *now,
+                                  struct timeval now,
                                   void *private_data)
 {
        files_struct *fsp = (files_struct *)private_data;
@@ -373,7 +365,6 @@ static void add_oplock_timeout_handler(files_struct *fsp)
        fsp->oplock_timeout =
                event_add_timed(smbd_event_context(), NULL,
                                timeval_current_ofs(OPLOCK_BREAK_TIMEOUT, 0),
-                               "oplock_timeout_handler",
                                oplock_timeout_handler, fsp);
 
        if (fsp->oplock_timeout == NULL) {