summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-04-24 19:23:51 +0000
committerJeremy Allison <jra@samba.org>2000-04-24 19:23:51 +0000
commite82dbfcbe97c79b1c81915ae949bb2b1763970ba (patch)
tree6575dd984ef9bdf74807736d48fe4eee856b96df /source3/include
parentb76e942639ab4d75bbf8103f6ea0822466b7615d (diff)
downloadsamba-e82dbfcbe97c79b1c81915ae949bb2b1763970ba.tar.gz
samba-e82dbfcbe97c79b1c81915ae949bb2b1763970ba.tar.bz2
samba-e82dbfcbe97c79b1c81915ae949bb2b1763970ba.zip
Now that fsp's are created on successful file open, the structure member
fsp->open is no longer needed (if an fsp pointer is valid, then it's open :-). NB for Luke, this patch also did not apply to TNG. TNG is not yet identical w.r.t file serving with HEAD. This makes it impossible for me to help maintain TNG. Please fix asap. lib/substitute.c: Removed unused variable (pidstr). Jeremy. (This used to be commit 389b700a26e8a308a0dff6fc038c38068aa0119a)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h13
-rw-r--r--source3/include/smb.h1
-rw-r--r--source3/include/smb_macros.h4
3 files changed, 11 insertions, 7 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index dfa76b3995..4564ac832c 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -201,9 +201,9 @@ int smbrun(char *cmd,char *outfile,BOOL shared);
/*The following definitions come from lib/substitute.c */
+void standard_sub_basic(char *str);
void standard_sub_conn(connection_struct *conn, char *str);
void standard_sub_snum(int snum, char *str);
-void standard_sub_basic(char *str);
void standard_sub_vuser(char *str, user_struct *vuser);
void standard_sub_vsnum(char *str, user_struct *vuser, int snum);
@@ -355,6 +355,7 @@ void *memdup(void *p, size_t size);
char *myhostname(void);
char *lock_path(char *name);
char *parent_dirname(const char *path);
+int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6);
/*The following definitions come from lib/util_array.c */
@@ -1173,7 +1174,7 @@ void wins_write_database(BOOL background);
/*The following definitions come from nmbd/nmbd_workgroupdb.c */
struct work_record *find_workgroup_on_subnet(struct subnet_record *subrec,
- fstring name);
+ const char *name);
struct work_record *create_workgroup_on_subnet(struct subnet_record *subrec,
fstring name, int ttl);
void update_workgroup_ttl(struct work_record *work, int ttl);
@@ -1579,6 +1580,11 @@ int cups_printername_ok(char *name);
void sysv_printer_fn(void (*fn)(char *, char *));
int sysv_printername_ok(char *name);
+/*The following definitions come from printing/printfsp.c */
+
+files_struct *print_fsp_open(connection_struct *conn,char *jobname);
+void print_fsp_end(files_struct *fsp);
+
/*The following definitions come from printing/printing.c */
BOOL print_backend_init(void);
@@ -1601,8 +1607,6 @@ int print_queue_snum(char *qname);
BOOL print_queue_pause(int snum);
BOOL print_queue_resume(int snum);
BOOL print_queue_purge(int snum);
-files_struct *print_fsp_open(connection_struct *conn,char *jobname);
-void print_fsp_end(files_struct *fsp);
/*The following definitions come from profile/profile.c */
@@ -3019,6 +3023,7 @@ void file_close_conn(connection_struct *conn);
void file_init(void);
void file_close_user(int vuid);
files_struct *file_find_dit(SMB_DEV_T dev, SMB_INO_T inode, struct timeval *tval);
+files_struct *file_find_fsp(files_struct *orig_fsp);
files_struct *file_find_di_first(SMB_DEV_T dev, SMB_INO_T inode);
files_struct *file_find_di_next(files_struct *start_fsp);
files_struct *file_find_print(void);
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 854200e4cb..7fef3f40b7 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -490,7 +490,6 @@ typedef struct files_struct
int oplock_type;
int sent_oplock_break;
unsigned int num_posix_locks;
- BOOL open;
BOOL can_lock;
BOOL can_read;
BOOL can_write;
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index cc9f158af8..e7d05189cd 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -73,7 +73,7 @@
#define SMB_ASSERT_ARRAY(a,n) SMB_ASSERT((sizeof(a)/sizeof((a)[0])) >= (n))
/* these are useful macros for checking validity of handles */
-#define OPEN_FSP(fsp) ((fsp) && (fsp)->open && !(fsp)->is_directory)
+#define OPEN_FSP(fsp) ((fsp) && !(fsp)->is_directory)
#define OPEN_CONN(conn) ((conn) && (conn)->open)
#define IS_IPC(conn) ((conn) && (conn)->ipc)
#define IS_PRINT(conn) ((conn) && (conn)->printer)
@@ -150,7 +150,7 @@
#define CACHE_ERROR(w,c,e) ((w)->wr_errclass = (c), (w)->wr_error = (e), \
w->wr_discard = True, -1)
/* Macro to test if an error has been cached for this fnum */
-#define HAS_CACHED_ERROR(fsp) ((fsp)->open && (fsp)->wbmpx_ptr && \
+#define HAS_CACHED_ERROR(fsp) ((fsp)->wbmpx_ptr && \
(fsp)->wbmpx_ptr->wr_discard)
/* Macro to turn the cached error into an error packet */
#define CACHED_ERROR(fsp) cached_error_packet(inbuf,outbuf,fsp,__LINE__)