diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2003-04-24 03:46:17 +0000 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2003-04-24 03:46:17 +0000 |
commit | 1f008c1203b082039a9824c186fa2eda730c6f46 (patch) | |
tree | 4c5bc2f14f34f76a02fd8036161bf229f7d7a152 /source3/include | |
parent | 8f6e88dbb6936abdb62a90a6bb0ef947ec8c9bb6 (diff) | |
download | samba-1f008c1203b082039a9824c186fa2eda730c6f46.tar.gz samba-1f008c1203b082039a9824c186fa2eda730c6f46.tar.bz2 samba-1f008c1203b082039a9824c186fa2eda730c6f46.zip |
Patch from Stephan Metzmacher to add default arguments to lp_parm() smb.conf
parameters. Does not break binary compatibility with older modules.
(This used to be commit 147c4d56d873a20a49194c5b036a3694299b1b48)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/smb_macros.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h index 8efb966d0b..b39c7a0ebc 100644 --- a/source3/include/smb_macros.h +++ b/source3/include/smb_macros.h @@ -98,8 +98,11 @@ #define ERROR_WAS_LOCK_DENIED(status) (NT_STATUS_EQUAL((status), NT_STATUS_LOCK_NOT_GRANTED) || \ NT_STATUS_EQUAL((status), NT_STATUS_FILE_LOCK_CONFLICT) ) +/* the service number for the [globals] defaults */ +#define GLOBAL_SECTION_SNUM (-1) /* translates a connection number into a service number */ -#define SNUM(conn) ((conn)?(conn)->service:-1) +#define SNUM(conn) ((conn)?(conn)->service:GLOBAL_SECTION_SNUM) + /* access various service details */ #define SERVICE(snum) (lp_servicename(snum)) |