From: Pierangelo Masarati Date: Thu, 24 Nov 2005 01:49:06 +0000 (+0000) Subject: use time_t for time-related vars X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~712 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8d19d52467bc98192dd8d392eabe19cf631501d0;p=openldap use time_t for time-related vars --- diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index 1e488649e4..3926281812 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -68,7 +68,7 @@ typedef struct query_template_s { CachedQuery* query_last; /* oldest query cached for the template */ int no_of_queries; /* Total number of queries in the template */ - long ttl; /* TTL for the queries of this template */ + time_t ttl; /* TTL for the queries of this template */ ldap_pvt_thread_rdwr_t t_rwlock; /* Rd/wr lock for accessing queries in the template */ } QueryTemplate; @@ -127,7 +127,7 @@ typedef struct cache_manager_s { #define PCACHE_RESPONSE_CB_HEAD 0 #define PCACHE_RESPONSE_CB_TAIL 1 - int cc_period; /* interval between successive consistency checks (sec) */ + time_t cc_period; /* interval between successive consistency checks (sec) */ int cc_paused; void *cc_arg; @@ -1732,7 +1732,7 @@ pc_cf_gen( ConfigArgs *c ) struct berval bv; switch( c->type ) { case PC_MAIN: - bv.bv_len = snprintf( c->msg, sizeof( c->msg ), "%s %d %d %d %d", + bv.bv_len = snprintf( c->msg, sizeof( c->msg ), "%s %d %d %d %ld", cm->db.bd_info->bi_type, cm->max_entries, cm->numattrsets, cm->num_entries_limit, cm->cc_period ); bv.bv_val = c->msg; @@ -1865,7 +1865,7 @@ pc_cf_gen( ConfigArgs *c ) Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->msg, 0 ); return( 1 ); } - cm->cc_period = t; + cm->cc_period = (time_t)t; Debug( LDAP_DEBUG_TRACE, "Total # of attribute sets to be cached = %d.\n", cm->numattrsets, 0, 0 ); @@ -1950,7 +1950,7 @@ pc_cf_gen( ConfigArgs *c ) Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->msg, 0 ); return( 1 ); } - temp->ttl = (long)t; + temp->ttl = (time_t)t; temp->no_of_queries = 0;