From d13f5f85feb98b28251045d88435a1af8ce3f3ba Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 24 Apr 2003 03:54:54 +0000 Subject: Patch from Stefan Metzmacher to add default parameters to the lp_parm() smb.conf parameters along with some other small fixes. Binary compatible with older modules. (This used to be commit aa07b12fda732ca19d8dc41cebc7bb09e2549a30) --- source3/include/smb_macros.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source3/include') diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h index 477940445c..8e2cb1c818 100644 --- a/source3/include/smb_macros.h +++ b/source3/include/smb_macros.h @@ -95,8 +95,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)) -- cgit