]> git.sur5r.net Git - openldap/commitdiff
don't bother about unregistering stuff during shutdown
authorPierangelo Masarati <ando@openldap.org>
Sat, 9 Sep 2006 16:25:32 +0000 (16:25 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 9 Sep 2006 16:25:32 +0000 (16:25 +0000)
servers/slapd/back-monitor/cache.c
servers/slapd/back-monitor/init.c

index 3639dd11a6cc52c8deed40e8a6123bdf047f8cab..9c96c0c154adaa7b1515f38f04ca17b8a5f69ac2 100644 (file)
@@ -264,7 +264,10 @@ retry:;
                        }
 
                }
-               monitor_cache_release( mi, mc->mc_e );
+
+               if ( mc ) {
+                       monitor_cache_release( mi, mc->mc_e );
+               }
        }
 
        ldap_pvt_thread_mutex_unlock( &mi->mi_cache_mutex );
index 008ce40c96f1b31922b7dc50cffbdfe5ade8bc75..3f6bb03dbcacb941217bae6cd38c83c885efee26 100644 (file)
@@ -1028,6 +1028,12 @@ monitor_back_unregister_entry(
                return -1;
        }
 
+       /* entry will be regularly freed, and resources released
+        * according to callbacks */
+       if ( slapd_shutdown ) {
+               return 0;
+       }
+
        mi = ( monitor_info_t * )be_monitor->be_private;
 
        assert( mi != NULL );
@@ -1124,6 +1130,12 @@ monitor_back_unregister_entry_parent(
                return -1;
        }
 
+       /* entry will be regularly freed, and resources released
+        * according to callbacks */
+       if ( slapd_shutdown ) {
+               return 0;
+       }
+
        mi = ( monitor_info_t * )be_monitor->be_private;
 
        assert( mi != NULL );
@@ -1264,6 +1276,12 @@ monitor_back_unregister_entry_attrs(
                return -1;
        }
 
+       /* entry will be regularly freed, and resources released
+        * according to callbacks */
+       if ( slapd_shutdown ) {
+               return 0;
+       }
+
        mi = ( monitor_info_t * )be_monitor->be_private;
 
        assert( mi != NULL );