logic fix

This commit is contained in:
Nikos Kouremenos 2005-08-16 11:59:53 +00:00
parent c3be096bc3
commit ac4bb8b675
1 changed files with 15 additions and 12 deletions

View File

@ -757,7 +757,9 @@ timestamp, contact):
pos = pos + 1
# line is [] if log file for jid is not a file (does not exist or dir)
if line != []:
if line == []:
break
if (now - float(line[0][0]))/60 >= time_out:
# stop looking for messages if we found something too old
break
@ -769,6 +771,7 @@ timestamp, contact):
lines.append(line[0])
size = size + 1
if lines != []:
lines.reverse()
for msg in lines: