pvfs_wait: use struct pvfs_wait * instead of void *
authorStefan Metzmacher <metze@samba.org>
Thu, 21 Feb 2008 08:02:17 +0000 (09:02 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 25 Feb 2008 06:55:09 +0000 (07:55 +0100)
metze
(This used to be commit 3b70331536d2402814db13a9f1f226a39373313a)

source4/ntvfs/posix/pvfs_lock.c
source4/ntvfs/posix/pvfs_notify.c
source4/ntvfs/posix/pvfs_open.c
source4/ntvfs/posix/pvfs_wait.c
source4/ntvfs/posix/vfs_posix.h

index b9bb58c71dee8c7019132c987529252f71a69ecd..df85b2b77526d960b94f9baf5046033129a37091 100644 (file)
@@ -53,7 +53,7 @@ struct pvfs_pending_lock {
        struct pvfs_file *f;
        struct ntvfs_request *req;
        int pending_lock;
-       void *wait_handle;
+       struct pvfs_wait *wait_handle;
        struct timeval end_time;
 };
 
index 210f94939569ee97a1ab4ac6697e91af596b5228..06d2bc8e0c65b16b08a4a4e0e87725f03435ea6b 100644 (file)
@@ -268,9 +268,11 @@ NTSTATUS pvfs_notify(struct ntvfs_module_context *ntvfs,
 
        /* if the buffer is empty then start waiting */
        if (f->notify_buffer->num_changes == 0) {
-               void *wait_handle =
-                       pvfs_wait_message(pvfs, req, -1, timeval_zero(), 
-                                         pvfs_notify_end, f->notify_buffer);
+               struct pvfs_wait *wait_handle;
+               wait_handle = pvfs_wait_message(pvfs, req, -1,
+                                               timeval_zero(),
+                                               pvfs_notify_end,
+                                               f->notify_buffer);
                NT_STATUS_HAVE_NO_MEMORY(wait_handle);
                talloc_steal(req, wait_handle);
                return NT_STATUS_OK;
index 8558f0476a9991632c8d3a8964b79a976e36c802..3ccd239523f9c7a8d0c40315efcd72a64c8168ba 100644 (file)
@@ -756,7 +756,7 @@ struct pvfs_open_retry {
        struct ntvfs_module_context *ntvfs;
        struct ntvfs_request *req;
        union smb_open *io;
-       void *wait_handle;
+       struct pvfs_wait *wait_handle;
        DATA_BLOB odb_locking_key;
 };
 
index 838a801567e351c1175b2288edf5faf19bcf91a9..291250befd2eaf986fec2574674a5f1a1f22ffb6 100644 (file)
@@ -131,12 +131,12 @@ static int pvfs_wait_destructor(struct pvfs_wait *pwait)
   if msg_type == -1 then no message is registered, and it is assumed
   that the caller handles any messaging setup needed
 */
-void *pvfs_wait_message(struct pvfs_state *pvfs, 
-                       struct ntvfs_request *req, 
-                       int msg_type, 
-                       struct timeval end_time,
-                       void (*fn)(void *, enum pvfs_wait_notice),
-                       void *private_data)
+struct pvfs_wait *pvfs_wait_message(struct pvfs_state *pvfs,
+                                   struct ntvfs_request *req,
+                                   int msg_type,
+                                   struct timeval end_time,
+                                   void (*fn)(void *, enum pvfs_wait_notice),
+                                   void *private_data)
 {
        struct pvfs_wait *pwait;
 
index a660da329a98ec2401dffc047fc802ca2d438959..84c456dcfee48f644ed74a6022db7498087d37f0 100644 (file)
@@ -28,6 +28,8 @@
 #include "ntvfs/common/ntvfs_common.h"
 #include "dsdb/samdb/samdb.h"
 
+struct pvfs_wait;
+
 /* this is the private structure for the posix vfs backend. It is used
    to hold per-connection (per tree connect) state information */
 struct pvfs_state {