param: rename lp function and variable from 'lockdir' to 'lock_directory'
[samba.git] / source3 / smbd / oplock_irix.c
index 2097945b975d83ac6d032bbb9db60e42e4f0514b..75f34df1c2059a0d53b0e509254d744b6a1fe391 100644 (file)
@@ -30,7 +30,7 @@ struct irix_oplocks_context {
        struct smbd_server_connection *sconn;
        int write_fd;
        int read_fd;
-       struct fd_event *read_fde;
+       struct tevent_fd *read_fde;
        bool pending;
 };
 
@@ -49,7 +49,7 @@ static bool irix_oplocks_available(void)
 
        tmpname = talloc_asprintf(ctx,
                                "%s/koplock.%d",
-                               lp_lockdir(),
+                               lp_lock_directory(),
                                (int)getpid());
        if (!tmpname) {
                TALLOC_FREE(ctx);
@@ -64,7 +64,7 @@ static bool irix_oplocks_available(void)
                return False;
        }
 
-       if((fd = sys_open(tmpname, O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0600)) < 0) {
+       if((fd = open(tmpname, O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0600)) < 0) {
                DEBUG(0,("check_kernel_oplocks: Unable to open temp test file "
                         "%s. Error was %s\n",
                         tmpname, strerror(errno) ));
@@ -276,8 +276,8 @@ static void irix_release_kernel_oplock(struct kernel_oplocks *_ctx,
        }
 }
 
-static void irix_oplocks_read_fde_handler(struct event_context *ev,
-                                         struct fd_event *fde,
+static void irix_oplocks_read_fde_handler(struct tevent_context *ev,
+                                         struct tevent_fd *fde,
                                          uint16_t flags,
                                          void *private_data)
 {
@@ -334,10 +334,10 @@ struct kernel_oplocks *irix_init_kernel_oplocks(struct smbd_server_connection *s
        ctx->read_fd = pfd[0];
        ctx->write_fd = pfd[1];
 
-       ctx->read_fde = event_add_fd(sconn->ev_ctx,
+       ctx->read_fde = tevent_add_fd(sconn->ev_ctx,
                                     ctx,
                                     ctx->read_fd,
-                                    EVENT_FD_READ,
+                                    TEVENT_FD_READ,
                                     irix_oplocks_read_fde_handler,
                                     ctx);
        return _ctx;