From 96b5d5bdfdfe368cb1a84c9b25b2de97c1370af0 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 31 Mar 2003 15:06:34 +0000 Subject: - Support absolute paths in vfs and charset modules - Fix typo in Makefile.in - Fix compatibility with older vfs modules (from patch by metze) - Build some modules shared by default and some static (and fall back to static when dlopen() is not available) (This used to be commit aa36f462d95f8a3a3a81a89c210b98a6f9fd295f) --- source3/lib/iconv.c | 9 ++++++--- source3/lib/module.c | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/iconv.c b/source3/lib/iconv.c index 6a397f2d9e..a37441b9fa 100644 --- a/source3/lib/iconv.c +++ b/source3/lib/iconv.c @@ -66,8 +66,12 @@ static struct charset_functions *charsets = NULL; static struct charset_functions *find_charset_functions(const char *name) { struct charset_functions *c = charsets; + pstring stripped; + + module_path_get_name(name, stripped); + while(c) { - if (strcasecmp(name, c->name) == 0)return c; + if (strequal(stripped, c->name) == 0)return c; c = c->next; } @@ -103,9 +107,8 @@ void lazy_initialize_iconv(void) initialized = True; for(i = 0; builtin_functions[i].name; i++) smb_register_charset(&builtin_functions[i]); + static_init_charset; } - - static_init_charset; } /* if there was an error then reset the internal state, diff --git a/source3/lib/module.c b/source3/lib/module.c index e400945a8b..700de56953 100644 --- a/source3/lib/module.c +++ b/source3/lib/module.c @@ -132,7 +132,7 @@ void module_path_get_name(char *path, pstring name) char *s; /* First, make the path relative */ - s = strrchr_m(path, '/'); + s = strrchr(path, '/'); if(s) pstrcpy(name, s+1); else pstrcpy(name, path); -- cgit