From: Hallvard Furuseth Date: Sun, 1 Jul 2007 14:15:17 +0000 (+0000) Subject: ITS#5035 - in St_read(), don't pass time_t* (st_data[i]->last) to lutil_atol(). X-Git-Tag: OPENLDAP_REL_ENG_2_3_37~13 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e4cd57a7aa824291261af059a9ab0b13e2bb63a7;p=openldap ITS#5035 - in St_read(), don't pass time_t* (st_data[i]->last) to lutil_atol(). --- diff --git a/servers/slurpd/st.c b/servers/slurpd/st.c index c4d9dde801..88fab12889 100644 --- a/servers/slurpd/st.c +++ b/servers/slurpd/st.c @@ -180,6 +180,7 @@ St_read( int rc; char *hostname, *port, *timestamp, *seq, *p, *t; int found; + long last; if ( st == NULL ) { return -1; @@ -235,11 +236,11 @@ St_read( if ( !strcmp( hostname, sglob->st->st_data[ i ]->hostname ) && lutil_atoi( &p, port ) == 0 && p == sglob->st->st_data[ i ]->port ) { - found = 1; - if ( lutil_atol( &sglob->st->st_data[ i ]->last, timestamp ) != 0 - || lutil_atoi( &sglob->st->st_data[ i ]->seq, seq ) != 0 ) - { - found = 0; + found = (lutil_atol( &last, timestamp ) == 0); + if ( found ) { + sglob->st->st_data[i]->last = last; + if ( lutil_atoi( &sglob->st->st_data[i]->seq, seq ) != 0 ) + found = 0; } break; }