#ifdef HAVE_TLS
int is_tls = op->o_conn->c_is_tls;
#endif /* HAVE_TLS */
+ time_t lc_time = (time_t)(-1);
assert( lcp != NULL );
if ( rs->sr_err != LDAP_SUCCESS ) {
ldap_unbind_ext( ld, NULL, NULL );
goto error_return;
+
+ } else if ( li->li_idle_timeout ) {
+ /* only touch when activity actually took place... */
+ lc_time = op->o_time;
}
#endif /* HAVE_TLS */
} else {
LDAP_BACK_CONN_ISTLS_CLEAR( *lcp );
}
+ if ( lc_time != (time_t)(-1) ) {
+ (*lcp)->lc_time = lc_time;
+ }
#endif /* HAVE_TLS */
error_return:;
#ifdef HAVE_TLS
done:;
#endif /* HAVE_TLS */
- if ( li->li_idle_timeout && lc ) {
- lc->lc_time = op->o_time;
- }
return lc;
}
* structure (this includes
* LDAP_COMPARE_{TRUE|FALSE}) */
default:
+ /* only touch when activity actually took place... */
+ if ( li->li_idle_timeout && lc ) {
+ lc->lc_time = op->o_time;
+ }
+
rc = ldap_parse_result( lc->lc_ld, res, &rs->sr_err,
&match, &text, &refs, &ctrls, 1 );
rs->sr_text = text;
rs->sr_err = rc;
} else {
+ /* only touch when activity actually took place... */
+ if ( li->li_idle_timeout && lc ) {
+ lc->lc_time = op->o_time;
+ }
+
/* sigh. parse twice, because parse_passwd
* doesn't give us the err / match / msg info.
*/
rs->sr_err = rc;
} else {
+ /* only touch when activity actually took place... */
+ if ( li->li_idle_timeout && lc ) {
+ lc->lc_time = op->o_time;
+ }
+
/* sigh. parse twice, because parse_passwd
* doesn't give us the err / match / msg info.
*/
continue;
} else {
+ /* only touch when activity actually took place... */
+ if ( li->li_idle_timeout && lc ) {
+ lc->lc_time = op->o_time;
+ }
+
/* don't retry any more */
dont_retry = 1;
}