Author: metze
Date: 2007-05-22 09:25:58 +0000 (Tue, 22 May 2007)
New Revision: 23067

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23067

Log:
use 'const union smb_search_data *file' also in the server code to get rid
of compiler warnings in the cifs backend

metze
Modified:
   branches/SAMBA_4_0/source/ntvfs/cifs/vfs_cifs.c
   branches/SAMBA_4_0/source/ntvfs/cifs_posix_cli/vfs_cifs_posix.c
   branches/SAMBA_4_0/source/ntvfs/ipc/vfs_ipc.c
   branches/SAMBA_4_0/source/ntvfs/nbench/vfs_nbench.c
   branches/SAMBA_4_0/source/ntvfs/ntvfs.h
   branches/SAMBA_4_0/source/ntvfs/ntvfs_interface.c
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_search.c
   branches/SAMBA_4_0/source/ntvfs/simple/vfs_simple.c
   branches/SAMBA_4_0/source/ntvfs/unixuid/vfs_unixuid.c
   branches/SAMBA_4_0/source/smb_server/blob.c
   branches/SAMBA_4_0/source/smb_server/smb/search.c
   branches/SAMBA_4_0/source/smb_server/smb/trans2.c
   branches/SAMBA_4_0/source/smb_server/smb2/find.c


Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/cifs/vfs_cifs.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/cifs/vfs_cifs.c     2007-05-22 09:02:16 UTC 
(rev 23066)
+++ branches/SAMBA_4_0/source/ntvfs/cifs/vfs_cifs.c     2007-05-22 09:25:58 UTC 
(rev 23067)
@@ -920,7 +920,7 @@
 static NTSTATUS cvfs_search_first(struct ntvfs_module_context *ntvfs, 
                                  struct ntvfs_request *req, union 
smb_search_first *io, 
                                  void *search_private, 
-                                 BOOL (*callback)(void *, union 
smb_search_data *))
+                                 BOOL (*callback)(void *, const union 
smb_search_data *))
 {
        struct cvfs_private *private = ntvfs->private_data;
 
@@ -933,7 +933,7 @@
 static NTSTATUS cvfs_search_next(struct ntvfs_module_context *ntvfs, 
                                 struct ntvfs_request *req, union 
smb_search_next *io, 
                                 void *search_private, 
-                                BOOL (*callback)(void *, union smb_search_data 
*))
+                                BOOL (*callback)(void *, const union 
smb_search_data *))
 {
        struct cvfs_private *private = ntvfs->private_data;
 

Modified: branches/SAMBA_4_0/source/ntvfs/cifs_posix_cli/vfs_cifs_posix.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/cifs_posix_cli/vfs_cifs_posix.c     
2007-05-22 09:02:16 UTC (rev 23066)
+++ branches/SAMBA_4_0/source/ntvfs/cifs_posix_cli/vfs_cifs_posix.c     
2007-05-22 09:25:58 UTC (rev 23067)
@@ -830,7 +830,7 @@
 static NTSTATUS cifspsx_search_first(struct ntvfs_module_context *ntvfs,
                                  struct ntvfs_request *req, union 
smb_search_first *io, 
                                  void *search_private, 
-                                 BOOL (*callback)(void *, union 
smb_search_data *))
+                                 BOOL (*callback)(void *, const union 
smb_search_data *))
 {
        struct cifspsx_dir *dir;
        int i;
@@ -904,7 +904,7 @@
 static NTSTATUS cifspsx_search_next(struct ntvfs_module_context *ntvfs,
                                 struct ntvfs_request *req, union 
smb_search_next *io, 
                                 void *search_private, 
-                                BOOL (*callback)(void *, union smb_search_data 
*))
+                                BOOL (*callback)(void *, const union 
smb_search_data *))
 {
        struct cifspsx_dir *dir;
        int i;

Modified: branches/SAMBA_4_0/source/ntvfs/ipc/vfs_ipc.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/ipc/vfs_ipc.c       2007-05-22 09:02:16 UTC 
(rev 23066)
+++ branches/SAMBA_4_0/source/ntvfs/ipc/vfs_ipc.c       2007-05-22 09:25:58 UTC 
(rev 23067)
@@ -669,7 +669,7 @@
 static NTSTATUS ipc_search_first(struct ntvfs_module_context *ntvfs,
                          struct ntvfs_request *req, union smb_search_first *io,
                          void *search_private, 
-                         BOOL (*callback)(void *, union smb_search_data *))
+                         BOOL (*callback)(void *, const union smb_search_data 
*))
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -680,7 +680,7 @@
 static NTSTATUS ipc_search_next(struct ntvfs_module_context *ntvfs,
                         struct ntvfs_request *req, union smb_search_next *io,
                         void *search_private, 
-                        BOOL (*callback)(void *, union smb_search_data *))
+                        BOOL (*callback)(void *, const union smb_search_data 
*))
 {
        return NT_STATUS_ACCESS_DENIED;
 }

Modified: branches/SAMBA_4_0/source/ntvfs/nbench/vfs_nbench.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/nbench/vfs_nbench.c 2007-05-22 09:02:16 UTC 
(rev 23066)
+++ branches/SAMBA_4_0/source/ntvfs/nbench/vfs_nbench.c 2007-05-22 09:25:58 UTC 
(rev 23067)
@@ -842,7 +842,7 @@
 static NTSTATUS nbench_search_first(struct ntvfs_module_context *ntvfs,
                                    struct ntvfs_request *req, union 
smb_search_first *io, 
                                    void *search_private, 
-                                   BOOL (*callback)(void *, union 
smb_search_data *))
+                                   BOOL (*callback)(void *, const union 
smb_search_data *))
 {
        NTSTATUS status;
 
@@ -864,7 +864,7 @@
 static NTSTATUS nbench_search_next(struct ntvfs_module_context *ntvfs,
                                   struct ntvfs_request *req, union 
smb_search_next *io, 
                                   void *search_private, 
-                                  BOOL (*callback)(void *, union 
smb_search_data *))
+                                  BOOL (*callback)(void *, const union 
smb_search_data *))
 {
        NTSTATUS status;
 

Modified: branches/SAMBA_4_0/source/ntvfs/ntvfs.h
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/ntvfs.h     2007-05-22 09:02:16 UTC (rev 
23066)
+++ branches/SAMBA_4_0/source/ntvfs/ntvfs.h     2007-05-22 09:25:58 UTC (rev 
23067)
@@ -92,11 +92,11 @@
        NTSTATUS (*search_first)(struct ntvfs_module_context *ntvfs,
                                 struct ntvfs_request *req,
                                 union smb_search_first *io, void *private,
-                                BOOL (*callback)(void *private, union 
smb_search_data *file));
+                                BOOL (*callback)(void *private, const union 
smb_search_data *file));
        NTSTATUS (*search_next)(struct ntvfs_module_context *ntvfs,
                                struct ntvfs_request *req,
                                union smb_search_next *io, void *private,
-                               BOOL (*callback)(void *private, union 
smb_search_data *file));
+                               BOOL (*callback)(void *private, const union 
smb_search_data *file));
        NTSTATUS (*search_close)(struct ntvfs_module_context *ntvfs,
                                 struct ntvfs_request *req,
                                 union smb_search_close *io);

Modified: branches/SAMBA_4_0/source/ntvfs/ntvfs_interface.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/ntvfs_interface.c   2007-05-22 09:02:16 UTC 
(rev 23066)
+++ branches/SAMBA_4_0/source/ntvfs/ntvfs_interface.c   2007-05-22 09:25:58 UTC 
(rev 23067)
@@ -150,7 +150,7 @@
 
 /* directory search */
 _PUBLIC_ NTSTATUS ntvfs_search_first(struct ntvfs_request *req, union 
smb_search_first *io, void *private,
-                                    BOOL ntvfs_callback(void *private, union 
smb_search_data *file))
+                                    BOOL ntvfs_callback(void *private, const 
union smb_search_data *file))
 {
        struct ntvfs_module_context *ntvfs = req->ctx->modules;
        if (!ntvfs->ops->search_first) {
@@ -160,7 +160,7 @@
 }
 
 _PUBLIC_ NTSTATUS ntvfs_search_next(struct ntvfs_request *req, union 
smb_search_next *io, void *private,
-                                   BOOL ntvfs_callback(void *private, union 
smb_search_data *file))
+                                   BOOL ntvfs_callback(void *private, const 
union smb_search_data *file))
 {
        struct ntvfs_module_context *ntvfs = req->ctx->modules;
        if (!ntvfs->ops->search_next) {
@@ -470,7 +470,7 @@
 _PUBLIC_ NTSTATUS ntvfs_next_search_first(struct ntvfs_module_context *ntvfs, 
                                          struct ntvfs_request *req,
                                          union smb_search_first *io, void 
*private,
-                                         BOOL (*callback)(void *private, union 
smb_search_data *file))
+                                         BOOL (*callback)(void *private, const 
union smb_search_data *file))
 {
        if (!ntvfs->next || !ntvfs->next->ops->search_first) {
                return NT_STATUS_NOT_IMPLEMENTED;
@@ -481,7 +481,7 @@
 _PUBLIC_ NTSTATUS ntvfs_next_search_next(struct ntvfs_module_context *ntvfs, 
                                         struct ntvfs_request *req,
                                         union smb_search_next *io, void 
*private,
-                                        BOOL (*callback)(void *private, union 
smb_search_data *file))
+                                        BOOL (*callback)(void *private, const 
union smb_search_data *file))
 {
        if (!ntvfs->next || !ntvfs->next->ops->search_next) {
                return NT_STATUS_NOT_IMPLEMENTED;

Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_search.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_search.c 2007-05-22 09:02:16 UTC 
(rev 23066)
+++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_search.c 2007-05-22 09:25:58 UTC 
(rev 23067)
@@ -238,7 +238,7 @@
                                 enum smb_search_data_level level,
                                 uint_t *reply_count,
                                 void *search_private, 
-                                BOOL (*callback)(void *, union smb_search_data 
*))
+                                BOOL (*callback)(void *, const union 
smb_search_data *))
 {
        struct pvfs_dir *dir = search->dir;
        NTSTATUS status;
@@ -314,7 +314,7 @@
 static NTSTATUS pvfs_search_first_old(struct ntvfs_module_context *ntvfs,
                                      struct ntvfs_request *req, union 
smb_search_first *io, 
                                      void *search_private, 
-                                     BOOL (*callback)(void *, union 
smb_search_data *))
+                                     BOOL (*callback)(void *, const union 
smb_search_data *))
 {
        struct pvfs_dir *dir;
        struct pvfs_state *pvfs = ntvfs->private_data;
@@ -404,7 +404,7 @@
 static NTSTATUS pvfs_search_next_old(struct ntvfs_module_context *ntvfs,
                                     struct ntvfs_request *req, union 
smb_search_next *io, 
                                     void *search_private, 
-                                    BOOL (*callback)(void *, union 
smb_search_data *))
+                                    BOOL (*callback)(void *, const union 
smb_search_data *))
 {
        struct pvfs_state *pvfs = ntvfs->private_data;
        struct pvfs_search_state *search;
@@ -453,7 +453,7 @@
 static NTSTATUS pvfs_search_first_trans2(struct ntvfs_module_context *ntvfs,
                                         struct ntvfs_request *req, union 
smb_search_first *io, 
                                         void *search_private, 
-                                        BOOL (*callback)(void *, union 
smb_search_data *))
+                                        BOOL (*callback)(void *, const union 
smb_search_data *))
 {
        struct pvfs_dir *dir;
        struct pvfs_state *pvfs = ntvfs->private_data;
@@ -549,7 +549,7 @@
 static NTSTATUS pvfs_search_next_trans2(struct ntvfs_module_context *ntvfs,
                                        struct ntvfs_request *req, union 
smb_search_next *io, 
                                        void *search_private, 
-                                       BOOL (*callback)(void *, union 
smb_search_data *))
+                                       BOOL (*callback)(void *, const union 
smb_search_data *))
 {
        struct pvfs_state *pvfs = ntvfs->private_data;
        struct pvfs_search_state *search;
@@ -610,7 +610,7 @@
 static NTSTATUS pvfs_search_first_smb2(struct ntvfs_module_context *ntvfs,
                                       struct ntvfs_request *req, const struct 
smb2_find *io, 
                                       void *search_private, 
-                                      BOOL (*callback)(void *, union 
smb_search_data *))
+                                      BOOL (*callback)(void *, const union 
smb_search_data *))
 {
        struct pvfs_dir *dir;
        struct pvfs_state *pvfs = ntvfs->private_data;
@@ -713,7 +713,7 @@
 static NTSTATUS pvfs_search_next_smb2(struct ntvfs_module_context *ntvfs,
                                      struct ntvfs_request *req, const struct 
smb2_find *io, 
                                      void *search_private, 
-                                     BOOL (*callback)(void *, union 
smb_search_data *))
+                                     BOOL (*callback)(void *, const union 
smb_search_data *))
 {
        struct pvfs_state *pvfs = ntvfs->private_data;
        struct pvfs_search_state *search;
@@ -766,7 +766,7 @@
 NTSTATUS pvfs_search_first(struct ntvfs_module_context *ntvfs,
                           struct ntvfs_request *req, union smb_search_first 
*io, 
                           void *search_private, 
-                          BOOL (*callback)(void *, union smb_search_data *))
+                          BOOL (*callback)(void *, const union smb_search_data 
*))
 {
        switch (io->generic.level) {
        case RAW_SEARCH_SEARCH:
@@ -788,7 +788,7 @@
 NTSTATUS pvfs_search_next(struct ntvfs_module_context *ntvfs,
                          struct ntvfs_request *req, union smb_search_next *io, 
                          void *search_private, 
-                         BOOL (*callback)(void *, union smb_search_data *))
+                         BOOL (*callback)(void *, const union smb_search_data 
*))
 {
        switch (io->generic.level) {
        case RAW_SEARCH_SEARCH:

Modified: branches/SAMBA_4_0/source/ntvfs/simple/vfs_simple.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/simple/vfs_simple.c 2007-05-22 09:02:16 UTC 
(rev 23066)
+++ branches/SAMBA_4_0/source/ntvfs/simple/vfs_simple.c 2007-05-22 09:25:58 UTC 
(rev 23067)
@@ -827,7 +827,7 @@
 static NTSTATUS svfs_search_first(struct ntvfs_module_context *ntvfs,
                                  struct ntvfs_request *req, union 
smb_search_first *io, 
                                  void *search_private, 
-                                 BOOL (*callback)(void *, union 
smb_search_data *))
+                                 BOOL (*callback)(void *, const union 
smb_search_data *))
 {
        struct svfs_dir *dir;
        int i;
@@ -901,7 +901,7 @@
 static NTSTATUS svfs_search_next(struct ntvfs_module_context *ntvfs,
                                 struct ntvfs_request *req, union 
smb_search_next *io, 
                                 void *search_private, 
-                                BOOL (*callback)(void *, union smb_search_data 
*))
+                                BOOL (*callback)(void *, const union 
smb_search_data *))
 {
        struct svfs_dir *dir;
        int i;

Modified: branches/SAMBA_4_0/source/ntvfs/unixuid/vfs_unixuid.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/unixuid/vfs_unixuid.c       2007-05-22 
09:02:16 UTC (rev 23066)
+++ branches/SAMBA_4_0/source/ntvfs/unixuid/vfs_unixuid.c       2007-05-22 
09:25:58 UTC (rev 23067)
@@ -592,7 +592,7 @@
 static NTSTATUS unixuid_search_first(struct ntvfs_module_context *ntvfs,
                                    struct ntvfs_request *req, union 
smb_search_first *io, 
                                    void *search_private, 
-                                   BOOL (*callback)(void *, union 
smb_search_data *))
+                                   BOOL (*callback)(void *, const union 
smb_search_data *))
 {
        NTSTATUS status;
 
@@ -605,7 +605,7 @@
 static NTSTATUS unixuid_search_next(struct ntvfs_module_context *ntvfs,
                                   struct ntvfs_request *req, union 
smb_search_next *io, 
                                   void *search_private, 
-                                  BOOL (*callback)(void *, union 
smb_search_data *))
+                                  BOOL (*callback)(void *, const union 
smb_search_data *))
 {
        NTSTATUS status;
 

Modified: branches/SAMBA_4_0/source/smb_server/blob.c
===================================================================
--- branches/SAMBA_4_0/source/smb_server/blob.c 2007-05-22 09:02:16 UTC (rev 
23066)
+++ branches/SAMBA_4_0/source/smb_server/blob.c 2007-05-22 09:25:58 UTC (rev 
23067)
@@ -604,7 +604,7 @@
 NTSTATUS smbsrv_push_passthru_search(TALLOC_CTX *mem_ctx,
                                     DATA_BLOB *blob,
                                     enum smb_search_data_level level,
-                                    union smb_search_data *file,
+                                    const union smb_search_data *file,
                                     int default_str_flags)
 {
        uint8_t *data;

Modified: branches/SAMBA_4_0/source/smb_server/smb/search.c
===================================================================
--- branches/SAMBA_4_0/source/smb_server/smb/search.c   2007-05-22 09:02:16 UTC 
(rev 23066)
+++ branches/SAMBA_4_0/source/smb_server/smb/search.c   2007-05-22 09:25:58 UTC 
(rev 23067)
@@ -39,7 +39,7 @@
   fill a single entry in a search find reply 
 */
 static BOOL find_fill_info(struct smbsrv_request *req,
-                          union smb_search_data *file)
+                          const union smb_search_data *file)
 {
        uint8_t *p;
 
@@ -66,7 +66,7 @@
 }
 
 /* callback function for search first/next */
-static BOOL find_callback(void *private, union smb_search_data *file)
+static BOOL find_callback(void *private, const union smb_search_data *file)
 {
        struct search_state *state = (struct search_state *)private;
 

Modified: branches/SAMBA_4_0/source/smb_server/smb/trans2.c
===================================================================
--- branches/SAMBA_4_0/source/smb_server/smb/trans2.c   2007-05-22 09:02:16 UTC 
(rev 23066)
+++ branches/SAMBA_4_0/source/smb_server/smb/trans2.c   2007-05-22 09:25:58 UTC 
(rev 23067)
@@ -695,7 +695,7 @@
   fill a single entry in a trans2 find reply 
 */
 static NTSTATUS find_fill_info(struct find_state *state,
-                              union smb_search_data *file)
+                              const union smb_search_data *file)
 {
        struct smbsrv_request *req = state->op->req;
        struct smb_trans2 *trans = state->op->trans;
@@ -791,7 +791,7 @@
 }
 
 /* callback function for trans2 findfirst/findnext */
-static BOOL find_callback(void *private, union smb_search_data *file)
+static BOOL find_callback(void *private, const union smb_search_data *file)
 {
        struct find_state *state = talloc_get_type(private, struct find_state);
        struct smb_trans2 *trans = state->op->trans;

Modified: branches/SAMBA_4_0/source/smb_server/smb2/find.c
===================================================================
--- branches/SAMBA_4_0/source/smb_server/smb2/find.c    2007-05-22 09:02:16 UTC 
(rev 23066)
+++ branches/SAMBA_4_0/source/smb_server/smb2/find.c    2007-05-22 09:25:58 UTC 
(rev 23067)
@@ -41,7 +41,7 @@
 };
 
 /* callback function for SMB2 Find */
-static BOOL smb2srv_find_callback(void *private, union smb_search_data *file)
+static BOOL smb2srv_find_callback(void *private, const union smb_search_data 
*file)
 {
        struct smb2srv_find_state *state = talloc_get_type(private, struct 
smb2srv_find_state);
        struct smb2_find *info = state->info;

Reply via email to