summaryrefslogtreecommitdiff
path: root/source4/include/smb_macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'source4/include/smb_macros.h')
-rw-r--r--source4/include/smb_macros.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/include/smb_macros.h b/source4/include/smb_macros.h
index 602df80671..6f8ecd6c21 100644
--- a/source4/include/smb_macros.h
+++ b/source4/include/smb_macros.h
@@ -73,8 +73,11 @@
#define SMB_ASSERT_ARRAY(a,n) SMB_ASSERT((sizeof(a)/sizeof((a)[0])) >= (n))
+/* 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))