summaryrefslogtreecommitdiff
path: root/source4/lib/iconv.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2003-11-25 03:15:26 +0000
committerJelmer Vernooij <jelmer@samba.org>2003-11-25 03:15:26 +0000
commita846e592058726b670e40505493a4668bd856186 (patch)
treeef949e82c7bbd5e58dffb11f75ecababcf10d369 /source4/lib/iconv.c
parent97dbe926ecbc71a8b0f423c07b09140f44647598 (diff)
downloadsamba-a846e592058726b670e40505493a4668bd856186.tar.gz
samba-a846e592058726b670e40505493a4668bd856186.tar.bz2
samba-a846e592058726b670e40505493a4668bd856186.zip
CVS: ----------------------------------------------------------------------
CVS: Enter Log. Lines beginning with `CVS:' are removed automatically CVS: CVS: Committing in . CVS: CVS: Modified Files: CVS: Makefile.in configure.in include/includes.h include/ntvfs.h CVS: include/smb.h lib/iconv.c lib/module.c ntvfs/ntvfs_base.c CVS: ntvfs/cifs/vfs_cifs.c ntvfs/ipc/vfs_ipc.c CVS: ntvfs/posix/vfs_posix.c ntvfs/print/vfs_print.c CVS: ntvfs/reference/vfs_ref.c ntvfs/simple/vfs_simple.c CVS: passdb/pdb_interface.c CVS: Added Files: CVS: include/module.h CVS: ---------------------------------------------------------------------- Update to the modules system. Fixed: - get rid of smb_probe_module - merge older updates from 3.0 - introduced register_subsystem() and register_backend() functions - adapt ntvfs and charset to use new register functions - made smb_load_modules() work recursively (e.g. 'preload modules = /usr/lib/samba') - got rid of some old remains Things that still need work: - Did I break tankFS? I don't think so, but I can't test it here :-( - Add 'postload modules = ' (for modules that need to be loaded after fork() in smbd, if applicable) - Convert RPC, auth, passdb, etc to use new register_{subsystem,backend}() functions - Accept wildcards in 'preload modules' option, instead of loading recursively (This used to be commit 7512b9ab1a8b3103f7a6c13f736353c46a26b668)
Diffstat (limited to 'source4/lib/iconv.c')
-rw-r--r--source4/lib/iconv.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source4/lib/iconv.c b/source4/lib/iconv.c
index 8f85e29c2e..2a0b013257 100644
--- a/source4/lib/iconv.c
+++ b/source4/lib/iconv.c
@@ -63,8 +63,9 @@ static struct charset_functions builtin_functions[] = {
static struct charset_functions *charsets = NULL;
-BOOL smb_register_charset(struct charset_functions *funcs)
+static NTSTATUS charset_register_backend(void *_funcs)
{
+ struct charset_functions *funcs = (struct charset_functions *)_funcs;
struct charset_functions *c = charsets;
DEBUG(5, ("Attempting to register new charset %s\n", funcs->name));
@@ -72,7 +73,7 @@ BOOL smb_register_charset(struct charset_functions *funcs)
while(c) {
if(!strcasecmp(c->name, funcs->name)){
DEBUG(2, ("Duplicate charset %s, not registering\n", funcs->name));
- return False;
+ return NT_STATUS_OBJECT_NAME_COLLISION;
}
c = c->next;
}
@@ -80,7 +81,7 @@ BOOL smb_register_charset(struct charset_functions *funcs)
funcs->next = funcs->prev = NULL;
DEBUG(5, ("Registered charset %s\n", funcs->name));
DLIST_ADD(charsets, funcs);
- return True;
+ return NT_STATUS_OK;
}
static void lazy_initialize_iconv(void)
@@ -90,8 +91,10 @@ static void lazy_initialize_iconv(void)
if (!initialized) {
initialized = True;
+ register_subsystem("charset", charset_register_backend);
+
for(i = 0; builtin_functions[i].name; i++)
- smb_register_charset(&builtin_functions[i]);
+ register_backend("charset", &builtin_functions[i]);
}
}