diff options
author | Noriko Hosoi <nhosoi@redhat.com> | 2006-10-05 21:14:02 +0000 |
---|---|---|
committer | Noriko Hosoi <nhosoi@redhat.com> | 2006-10-05 21:14:02 +0000 |
commit | 27ea94caa86d283fd64625d36e46d5370a15fc3a (patch) | |
tree | c4cf9ce3b239d5a92d51ba74c1e1c66523b9ad75 | |
parent | 1f2f6bf58dd9e6a5064960fb334e0f022baf4ff5 (diff) | |
download | ds-27ea94caa86d283fd64625d36e46d5370a15fc3a.tar.gz ds-27ea94caa86d283fd64625d36e46d5370a15fc3a.tar.xz ds-27ea94caa86d283fd64625d36e46d5370a15fc3a.zip |
[204808] spurious search timeouts
Fixed a problem that ldapsearch reports random timeouts on 64-bit machine.
-rw-r--r-- | ldap/servers/plugins/chainingdb/cb_search.c | 7 | ||||
-rw-r--r-- | ldap/servers/slapd/back-ldif/search.c | 2 | ||||
-rw-r--r-- | ldap/servers/slapd/pblock.c | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/ldap/servers/plugins/chainingdb/cb_search.c b/ldap/servers/plugins/chainingdb/cb_search.c index 0d898a39..5facadc2 100644 --- a/ldap/servers/plugins/chainingdb/cb_search.c +++ b/ldap/servers/plugins/chainingdb/cb_search.c @@ -179,7 +179,7 @@ chainingdb_build_candidate_list ( Slapi_PBlock *pb ) slapi_pblock_set( pb, SLAPI_SEARCH_RESULT_ENTRY, NULL ); return 1; } - timeout.tv_sec=timelimit-(now-optime); + timeout.tv_sec=(time_t)timelimit-(now-optime); timeout.tv_usec=0; } @@ -414,7 +414,10 @@ chainingdb_next_search_entry ( Slapi_PBlock *pb ) { char *target; - int sizelimit,timelimit, rc, parse_rc, optime,i,retcode, attrsonly; + int sizelimit, timelimit; + int rc, parse_rc, retcode; + int i, attrsonly; + time_t optime; LDAPMessage *res=NULL; char *matched_msg,*error_msg; cb_searchContext *ctx=NULL; diff --git a/ldap/servers/slapd/back-ldif/search.c b/ldap/servers/slapd/back-ldif/search.c index e93cd85c..f66b4c97 100644 --- a/ldap/servers/slapd/back-ldif/search.c +++ b/ldap/servers/slapd/back-ldif/search.c @@ -143,7 +143,7 @@ ldif_back_search( Slapi_PBlock *pb ) /*Make sure we're not exceeding our time limit...*/ currtime = time(&dummy); - if ((tlimit > 0) && ((currtime - optime) > tlimit)){ + if ((tlimit > 0) && ((currtime - optime) > (time_t)tlimit)){ slapi_send_ldap_result( pb, LDAP_TIMELIMIT_EXCEEDED, NULL, NULL, nentries, NULL); /*We "hit" the cache*/ diff --git a/ldap/servers/slapd/pblock.c b/ldap/servers/slapd/pblock.c index 4a6bbca6..48e9f998 100644 --- a/ldap/servers/slapd/pblock.c +++ b/ldap/servers/slapd/pblock.c @@ -348,7 +348,7 @@ slapi_pblock_get( Slapi_PBlock *pblock, int arg, void *value ) (*(int *)value) = pblock->pb_op->o_params.operation_type; break; case SLAPI_OPINITIATED_TIME: - (*(int *)value) = pblock->pb_op->o_time; + (*(time_t *)value) = pblock->pb_op->o_time; break; case SLAPI_REQUESTOR_ISROOT: (*(int *)value) = pblock->pb_requestor_isroot; |