diff options
author | Jeremy Allison <jra@samba.org> | 1997-09-04 20:26:07 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1997-09-04 20:26:07 +0000 |
commit | 99080705a2d0adcb25e1eecbe517a2fac2779baa (patch) | |
tree | 60c5709706351f2e24a13741bfc5ba3e3fb52a41 /source/lib | |
parent | fa1305d1894a28331ba80d9de038ebf31ba902d6 (diff) | |
download | samba-99080705a2d0adcb25e1eecbe517a2fac2779baa.tar.gz |
Fixed up determination of client type for PROTOCOL_NT1. Uses client
capabilities bits in session_setup_and_X to decide. Made remote_arch
an enum as well as a string, for easier use.
Jeremy (jallison@whistle.com)
Diffstat (limited to 'source/lib')
-rw-r--r-- | source/lib/util.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/source/lib/util.c b/source/lib/util.c index 3b4453dd5b4..7f922def7e3 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -68,6 +68,7 @@ BOOL case_mangle; fstring remote_machine=""; fstring local_machine=""; fstring remote_arch="UNKNOWN"; +static enum remote_arch_types ra_type = RA_UNKNOWN; fstring remote_proto="UNKNOWN"; pstring myhostname=""; pstring user_socket_options=""; @@ -3868,3 +3869,41 @@ BOOL is_myname(const char *s) DEBUG(8, ("is_myname(\"%s\") returns %d\n", s, ret)); return(ret); } + +/******************************************************************* +set the horrid remote_arch string based on an enum. +********************************************************************/ +void set_remote_arch(enum remote_arch_types type) +{ + ra_type = type; + switch( type ) + { + case RA_WFWG: + strcpy(remote_arch, "WfWg"); + return; + case RA_OS2: + strcpy(remote_arch, "OS2"); + return; + case RA_WIN95: + strcpy(remote_arch, "Win95"); + return; + case RA_WINNT: + strcpy(remote_arch, "WinNT"); + return; + case RA_SAMBA: + strcpy(remote_arch,"Samba"); + return; + default: + ra_type = RA_UNKNOWN; + strcpy(remote_arch, "UNKNOWN"); + break; + } +} + +/******************************************************************* + Get the remote_arch type. +********************************************************************/ +enum remote_arch_types get_remote_arch() +{ + return ra_type; +} |