diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-08-17 03:52:05 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-08-17 03:52:05 +0000 |
commit | 8978aae69699ccab76fdf95037948b1cc7e7c286 (patch) | |
tree | 19d2fdbc1da4d4353d226a81960f500ac06c0359 /source3/include | |
parent | f2d538a105a61ce6d2852700fc328e15ac158827 (diff) | |
download | samba-8978aae69699ccab76fdf95037948b1cc7e7c286.tar.gz samba-8978aae69699ccab76fdf95037948b1cc7e7c286.tar.bz2 samba-8978aae69699ccab76fdf95037948b1cc7e7c286.zip |
much cleaner chain pointer handling for both files and pipes.
the chain pointer is now stored as a static and is set whenever a
handle is created or extracted. This also makes the code less error
prone.
(This used to be commit 068a862982bea726e8d7b1b4065d510b9840a272)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/proto.h | 6 | ||||
-rw-r--r-- | source3/include/smb.h | 5 |
2 files changed, 3 insertions, 8 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index cda824c7d0..e00ddbb79d 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1857,10 +1857,9 @@ BOOL api_netlog_rpc(pipes_struct *p, prs_struct *data); /*The following definitions come from rpc_server/srv_pipe_hnd.c */ void reset_chain_p(void); -void set_chain_p(pipes_struct *new_p); void init_rpc_pipe_hnd(void); pipes_struct *open_rpc_pipe_p(char *pipe_name, - connection_struct *conn, uint16 vuid); + connection_struct *conn, uint16 vuid); int read_pipe(pipes_struct *p, char *data, uint32 pos, int n); char *get_rpc_pipe_hnd_name(pipes_struct *p); BOOL set_rpc_pipe_hnd_state(pipes_struct *p, uint16 device_state); @@ -1957,12 +1956,13 @@ file_fd_struct *fd_get_already_open(struct stat *sbuf); file_fd_struct *fd_get_new(void); void file_close_conn(connection_struct *conn); void file_init(void); -files_struct *file_fsp(int fnum); void file_close_user(int vuid); files_struct *file_find_dit(int dev, int inode, struct timeval *tval); files_struct *file_find_print(void); void file_sync_all(connection_struct *conn); void file_free(files_struct *fsp); +files_struct *file_fsp(char *buf, int where); +void file_chain_reset(void); /*The following definitions come from smbd/groupname.c */ diff --git a/source3/include/smb.h b/source3/include/smb.h index e99eb30023..2f2363ba71 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -602,11 +602,6 @@ typedef struct files_struct char *fsp_name; } files_struct; -/* this macro should always be used to extract an fnum (smb_fid) from - a packet to ensure chaining works correctly */ -#define GETFSP(buf,where) (chain_fsp?chain_fsp:file_fsp(SVAL(buf,where))) - - /* Domain controller authentication protocol info */ struct dcinfo { |