]> git.sur5r.net Git - openldap/commitdiff
Cleanup task declarations
authorHoward Chu <hyc@openldap.org>
Fri, 6 Jan 2006 04:06:18 +0000 (04:06 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 6 Jan 2006 04:06:18 +0000 (04:06 +0000)
servers/slapd/back-bdb/back-bdb.h
servers/slapd/back-bdb/cache.c

index 3e52ed01c36f625b09c398a55e7e24b9bf963be7..4405d82f50e2a796eb33a100260c300238848235 100644 (file)
@@ -150,6 +150,9 @@ struct bdb_db_info {
        DB                      *bdi_db;
 };
 
+/* From ldap_rq.h */
+struct re_s;
+
 struct bdb_info {
        DB_ENV          *bi_dbenv;
 
@@ -175,9 +178,9 @@ struct bdb_info {
        int                     bi_txn_cp;
        u_int32_t       bi_txn_cp_min;
        u_int32_t       bi_txn_cp_kbyte;
-       void            *bi_txn_cp_task;
-       void            *bi_index_task;
-       void            *bi_cache_task;
+       struct re_s             *bi_txn_cp_task;
+       struct re_s             *bi_index_task;
+       struct re_s             *bi_cache_task;
 
        int                     bi_lock_detect;
        long            bi_shm_key;
index e66836af61da8e28ef9f3c535282aa23d0cae40e..30959448d377c26ea240f8c7f77252de5c7e8133 100644 (file)
@@ -644,14 +644,12 @@ bdb_cache_lru_add(
                        if ( bdb->bi_cache_task ) {
                                if ( !ldap_pvt_runqueue_isrunning( &slapd_rq,
                                        bdb->bi_cache_task )) {
-                                       struct re_s *task = bdb->bi_cache_task;
-
                                        /* We want it to start right now */
-                                       task->interval.tv_sec = 0;
+                                       bdb->bi_cache_task->interval.tv_sec = 0;
                                        ldap_pvt_runqueue_resched( &slapd_rq, bdb->bi_cache_task,
                                                0 );
                                        /* But don't try to reschedule it while it's running */
-                                       task->interval.tv_sec = 3600;
+                                       bdb->bi_cache_task->interval.tv_sec = 3600;
                                }
                        } else {
                                bdb->bi_cache_task = ldap_pvt_runqueue_insert( &slapd_rq, 3600,