From e4cd57a7aa824291261af059a9ab0b13e2bb63a7 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Sun, 1 Jul 2007 14:15:17 +0000 Subject: [PATCH] ITS#5035 - in St_read(), don't pass time_t* (st_data[i]->last) to lutil_atol(). --- servers/slurpd/st.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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; } -- 2.47.2