summaryrefslogtreecommitdiffstats
path: root/source/param/loadparm.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-01-08 00:47:26 +0000
committerJeremy Allison <jra@samba.org>2002-01-08 00:47:26 +0000
commit3f26d9f9fc11e556574cc433bd571bb9855271e5 (patch)
treead1fcb8713b656cd1dc2063342b3067981534606 /source/param/loadparm.c
parent25c0c06458af1dab6c797a0b3eb2927225b21570 (diff)
downloadsamba-3f26d9f9fc11e556574cc433bd571bb9855271e5.tar.gz
samba-3f26d9f9fc11e556574cc433bd571bb9855271e5.tar.xz
samba-3f26d9f9fc11e556574cc433bd571bb9855271e5.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/loadparm.c')
-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 41bf490acd0..7b5291b9e91 100644
--- a/source/param/loadparm.c
+++ b/source/param/loadparm.c
@@ -3760,3 +3760,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;
+}