s3: Remove smbd_messaging_context() from send_stat_cache_delete_message()
authorVolker Lendecke <vl@samba.org>
Tue, 6 Jul 2010 20:43:14 +0000 (22:43 +0200)
committerVolker Lendecke <vl@samba.org>
Sat, 7 Aug 2010 11:16:48 +0000 (13:16 +0200)
source3/include/proto.h
source3/lib/dummysmbd.c
source3/locking/locking.c
source3/smbd/close.c
source3/smbd/statcache.c

index 7e56f7db228e8a83423cd25c0d9292714fac6f83..060776fa6232cb957ca0611c5998ed0a153cdd14 100644 (file)
@@ -5838,7 +5838,8 @@ bool stat_cache_lookup(connection_struct *conn,
                        char **pp_dirpath,
                        char **pp_start,
                        SMB_STRUCT_STAT *pst);
                        char **pp_dirpath,
                        char **pp_start,
                        SMB_STRUCT_STAT *pst);
-void send_stat_cache_delete_message(const char *name);
+void send_stat_cache_delete_message(struct messaging_context *msg_ctx,
+                                   const char *name);
 void stat_cache_delete(const char *name);
 unsigned int fast_string_hash(TDB_DATA *key);
 bool reset_stat_cache( void );
 void stat_cache_delete(const char *name);
 unsigned int fast_string_hash(TDB_DATA *key);
 bool reset_stat_cache( void );
index 01a55633068e66658c1bda670225c5f08639f430..c79e080882c619380c6a511ffac0601a2a3a4261 100644 (file)
@@ -44,7 +44,8 @@ void cancel_pending_lock_requests_by_fid(files_struct *fsp,
 {
 }
 
 {
 }
 
-void send_stat_cache_delete_message(const char *name)
+void send_stat_cache_delete_message(struct messaging_context *msg_ctx,
+                                   const char *name)
 {
 }
 
 {
 }
 
index a9b13d61a118108dfd8fbfa287810ed76315ebe0..24998ab58894a6d91fb5ae2c9fa09aad38bc07c5 100644 (file)
@@ -1457,7 +1457,8 @@ bool set_delete_on_close(files_struct *fsp, bool delete_on_close, const UNIX_USE
 
        if (fsp->is_directory) {
                SMB_ASSERT(!is_ntfs_stream_smb_fname(fsp->fsp_name));
 
        if (fsp->is_directory) {
                SMB_ASSERT(!is_ntfs_stream_smb_fname(fsp->fsp_name));
-               send_stat_cache_delete_message(fsp->fsp_name->base_name);
+               send_stat_cache_delete_message(fsp->conn->sconn->msg_ctx,
+                                              fsp->fsp_name->base_name);
        }
 
        TALLOC_FREE(lck);
        }
 
        TALLOC_FREE(lck);
index fb0e20647e2676cc168d37950b52fab75576a6ff..fad960149142eb66b2c642492485be5011e112ff 100644 (file)
@@ -961,7 +961,8 @@ static NTSTATUS close_directory(struct smb_request *req, files_struct *fsp,
                        become_user(fsp->conn, fsp->vuid);
                        became_user = True;
                }
                        become_user(fsp->conn, fsp->vuid);
                        became_user = True;
                }
-               send_stat_cache_delete_message(fsp->fsp_name->base_name);
+               send_stat_cache_delete_message(fsp->conn->sconn->msg_ctx,
+                                              fsp->fsp_name->base_name);
                set_delete_on_close_lck(lck, True, get_current_utok(fsp->conn));
                fsp->delete_on_close = true;
                if (became_user) {
                set_delete_on_close_lck(lck, True, get_current_utok(fsp->conn));
                fsp->delete_on_close = true;
                if (became_user) {
index 88cb97e6a6d19bae23aae72327a539185d84936a..cea27d442cab152f705c448a6c2fd2ece79d38cc 100644 (file)
@@ -336,10 +336,11 @@ bool stat_cache_lookup(connection_struct *conn,
  Tell all smbd's to delete an entry.
 **************************************************************************/
 
  Tell all smbd's to delete an entry.
 **************************************************************************/
 
-void send_stat_cache_delete_message(const char *name)
+void send_stat_cache_delete_message(struct messaging_context *msg_ctx,
+                                   const char *name)
 {
 #ifdef DEVELOPER
 {
 #ifdef DEVELOPER
-       message_send_all(smbd_messaging_context(),
+       message_send_all(msg_ctx,
                        MSG_SMB_STAT_CACHE_DELETE,
                        name,
                        strlen(name)+1,
                        MSG_SMB_STAT_CACHE_DELETE,
                        name,
                        strlen(name)+1,