summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-01-08 00:46:56 +0000
committerJeremy Allison <jra@samba.org>2002-01-08 00:46:56 +0000
commit4702494dce15d4158fd17720d843ff5211ce1715 (patch)
tree46516cb4cabadff3f3a8234a193bc94252903f6a /source3/param
parent43b27771f50d5feba995c6ede961fdb4e73354f9 (diff)
downloadsamba-4702494dce15d4158fd17720d843ff5211ce1715.tar.gz
samba-4702494dce15d4158fd17720d843ff5211ce1715.tar.bz2
samba-4702494dce15d4158fd17720d843ff5211ce1715.zip
Added get_called_name() function, which replaces global_myname in printing
code (one less global, hurrah !) - to allow NetBIOS aliasing to be used with point and print. Jeremy. (This used to be commit 10d72f0b01e5950c667f3f73dff1b4da5b675ea3)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 01e5fb27aa..c900e99af4 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -3892,3 +3892,13 @@ void lp_set_logfile(const char *name)
pstrcpy(Globals.szLogFile, name);
pstrcpy(debugf, name);
}
+
+/*******************************************************************
+ Return the NetBIOS called name.
+********************************************************************/
+
+const char *get_called_name(void)
+{
+ extern fstring local_machine;
+ return (*local_machine) ? local_machine : global_myname;
+}