From 51f20adc6b964bad6e5bfbf69da68e1e6f45b13e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 22 Nov 1997 07:09:12 +0000 Subject: added true enumerated types in loadparm.c. Now we don't need all those "interpret_security" and similar functions. This also means that testparm produces string values for these enumerated types rather than an integer. This was done to make the web interface much cleaner. While I was doing this I found a couple of very nasty bugs in the parm_table code. Someone had added a handle_character_set() function that treated the char** pointer for a P_STRING as an integer! This would have caused memory corruption for anyone using the "character set" option. The loadparm code is delicate - please be careful about using it's more esoteric features! I've also removed the "coding system" global and made it a P_STRING. The integer value was never used anywhere in Samba. (This used to be commit bac6b0daa288e879330e3d585582122bb93a1ffb) --- source3/client/client.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'source3/client/client.c') diff --git a/source3/client/client.c b/source3/client/client.c index 52f4b837a6..4333092b07 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -129,16 +129,10 @@ extern int Client; #define USENMB -extern int coding_system; -static BOOL setup_term_code (char *code) +static BOOL setup_term_code(char *code) { - int new; - new = interpret_coding_system (code, UNKNOWN_CODE); - if (new != UNKNOWN_CODE) { - coding_system = new; + interpret_coding_system(code); return True; - } - return False; } #define CNV_LANG(s) dos2unix_format(s,False) #define CNV_INPUT(s) unix2dos_format(s,True) -- cgit