summaryrefslogtreecommitdiffstats
path: root/source/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
commit10d72f0b01e5950c667f3f73dff1b4da5b675ea3 (patch)
tree794efcf99cfbd8daef94789e2669cfea2c06627d /source/param
parentee8fd2690a4c8e4ebc5dd3b6e830116806ed5a4b (diff)
downloadsamba-10d72f0b01e5950c667f3f73dff1b4da5b675ea3.tar.gz
samba-10d72f0b01e5950c667f3f73dff1b4da5b675ea3.tar.xz
samba-10d72f0b01e5950c667f3f73dff1b4da5b675ea3.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.
Diffstat (limited to 'source/param')
-rw-r--r--source/param/loadparm.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/param/loadparm.c b/source/param/loadparm.c
index 01e5fb27aaf..c900e99af41 100644
--- a/source/param/loadparm.c
+++ b/source/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;
+}