summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2003-04-24 03:54:54 +0000
committerJelmer Vernooij <jelmer@samba.org>2003-04-24 03:54:54 +0000
commitd13f5f85feb98b28251045d88435a1af8ce3f3ba (patch)
tree5cac6506e7cc01b728f8f68566870c865c5b7be2 /source3/include
parentc0960be217bbf1107843b510bb0829e9c6593e85 (diff)
downloadsamba-d13f5f85feb98b28251045d88435a1af8ce3f3ba.tar.gz
samba-d13f5f85feb98b28251045d88435a1af8ce3f3ba.tar.bz2
samba-d13f5f85feb98b28251045d88435a1af8ce3f3ba.zip
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)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/smb_macros.h5
1 files changed, 4 insertions, 1 deletions
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))