Commit 1616a620 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

apparently, time_t is unsigned in some systems

parent 843e327a
......@@ -9,6 +9,7 @@ OpenLDAP 2.3.35 Engineering
Fixed slapd-meta/slapo-rwm filter mapping
Fixed slapd-sql subtree shortcut (ITS#4856)
Fixed slapo-refint config message (ITS#4853)
Fixed libldap time_t signedness
Fixed libldap_r tpool reset (ITS#4855)
OpenLDAP 2.3.34 Release (2007/02/16)
......
......@@ -369,13 +369,18 @@ wait4msg(
}
if ( rc == LDAP_MSG_X_KEEP_LOOKING && tvp != NULL ) {
time_t delta_time;
tmp_time = time( NULL );
tv0.tv_sec -= ( tmp_time - start_time );
if ( tv0.tv_sec <= 0 ) {
delta_time = tmp_time - start_time;
/* do not assume time_t is signed */
if ( tv0.tv_sec <= delta_time ) {
rc = 0; /* timed out */
ld->ld_errno = LDAP_TIMEOUT;
break;
}
tv0.tv_sec -= delta_time;
tv.tv_sec = tv0.tv_sec;
Debug( LDAP_DEBUG_TRACE, "wait4msg ld %p %ld secs to go\n",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment