diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2002-11-24 22:12:48 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2002-11-24 22:12:48 +0000 |
commit | 2c46f6bcd1624290c3c1af0df97756d3a81bd02d (patch) | |
tree | fe804df4efd7c77c5046af2cc939e177c239ab1c /libsieve | |
parent | 29c8fa5307ac8424cd1c3a75ffe7858531ac0e62 (diff) | |
download | mailutils-2c46f6bcd1624290c3c1af0df97756d3a81bd02d.tar.gz mailutils-2c46f6bcd1624290c3c1af0df97756d3a81bd02d.tar.bz2 |
Removed debugging hacks. Always call lt_dlinit
and add a call to lt_dlexit to the destructor.
Diffstat (limited to 'libsieve')
-rw-r--r-- | libsieve/load.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/libsieve/load.c b/libsieve/load.c index bba0c6b3e..bb5de75cb 100644 --- a/libsieve/load.c +++ b/libsieve/load.c @@ -29,30 +29,21 @@ typedef int (*sieve_module_init_t) __PMT((sieve_machine_t mach)); -static int inited = 0; - static void _free_loaded_module (void *data) { lt_dlclose ((lt_dlhandle)data); + lt_dlexit (); } -int wd () -{ - int volatile _s=0; - while (!_s); -} - static lt_dlhandle load_module (sieve_machine_t mach, const char *name) { lt_dlhandle handle; - if (!inited) - { - if (lt_dlinit ()) - return NULL; - inited++; - } + + if (lt_dlinit ()) + return NULL; + handle = lt_dlopenext (name); if (handle) { @@ -74,6 +65,7 @@ load_module (sieve_machine_t mach, const char *name) if (!handle) { sieve_error (mach, "%s", lt_dlerror ()); + lt_dlexit (); } return handle; } |