From 983dc71c9844675ad364f3ea59ddd04b87857b55 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 17 Aug 1998 06:13:32 +0000 Subject: moved connection_struct handling code into smbd/conn.c and changed it to a linked list with bitmap format. (This used to be commit b7aaab1b6b2d2f72b2bb7c11f5c7bf081a6093d9) --- source3/include/smb.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source3/include/smb.h') diff --git a/source3/include/smb.h b/source3/include/smb.h index 2f2363ba71..c68f88cbdd 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -531,14 +531,14 @@ typedef struct BOOL is_wild; } name_compare_entry; -typedef struct +typedef struct connection_struct { + struct connection_struct *next, *prev; unsigned cnum; /* an index passed over the wire */ int service; BOOL force_user; struct uid_cache uid_cache; void *dirptr; - BOOL open; BOOL printer; BOOL ipc; BOOL read_only; @@ -865,7 +865,6 @@ struct bitmap { /* these are useful macros for checking validity of handles */ #define OPEN_FSP(fsp) ((fsp) && (fsp)->open && !(fsp)->is_directory) -#define VALID_CNUM(cnum) (((cnum) >= 0) && ((cnum) < MAX_CONNECTIONS)) #define OPEN_CONN(conn) ((conn) && (conn)->open) #define IS_IPC(conn) ((conn) && (conn)->ipc) #define IS_PRINT(conn) ((conn) && (conn)->printer) @@ -888,7 +887,7 @@ struct bitmap { #define PRINTCAP (lp_printcapname()) #define PRINTCOMMAND(snum) (lp_printcommand(snum)) #define PRINTERNAME(snum) (lp_printername(snum)) -#define CAN_WRITE(conn) (OPEN_CONN(conn) && !conn->read_only) +#define CAN_WRITE(conn) (!conn->read_only) #define VALID_SNUM(snum) (lp_snum_ok(snum)) #define GUEST_OK(snum) (VALID_SNUM(snum) && lp_guest_ok(snum)) #define GUEST_ONLY(snum) (VALID_SNUM(snum) && lp_guest_only(snum)) -- cgit