]> sourceware.org Git - dm.git/commitdiff
o load_lock_syms doesn't need args
authorAJ Lewis <alewis@redhat.com>
Wed, 4 May 2005 19:02:27 +0000 (19:02 +0000)
committerAJ Lewis <alewis@redhat.com>
Wed, 4 May 2005 19:02:27 +0000 (19:02 +0000)
 o clear lock fxn pointers when dlclosing the lock lib

multilog/libmultilog.c

index dd0c970a34869bdbe62676a253702f175b80643d..33020e0d27c4064240bfef21eb3f4a5ae0e67c01 100644 (file)
@@ -91,7 +91,7 @@ static void destroy_nop_lock(void *handle)
        return;
 }
 
-static int load_lock_syms(struct log_data *data)
+static int load_lock_syms(void)
 {
        void *dlh;
 
@@ -209,7 +209,7 @@ int multilog_add_type(enum log_type type, struct log_data *data)
        /* FIXME: Potential race here */
        /* attempt to load locking protocol */
        if(!init_lock_fn) {
-               if(!load_lock_syms(data)) {
+               if(!load_lock_syms()) {
                        fprintf(stderr, "Unalbe to load locking\n");
                        return 0;
                }
@@ -313,7 +313,14 @@ void multilog_clear_logging(void)
        }
        /* FIXME: Not sure the destroy_lock call is really necessary */
        destroy_lock(lock_handle);
-       dlclose(lock_dlh);
+
+       if(lock_dlh) {
+               dlclose(lock_dlh);
+               init_lock_fn = NULL;
+               lock_fn = NULL;
+               unlock_fn = NULL;
+               destroy_lock_fn = NULL;
+       }
 
 }
 
This page took 0.026584 seconds and 5 git commands to generate.