Bug#457407: mailping: incorrectly calculates mail latency
Package: mailping Version: 0.0.4-1~abg+7 Severity: important In some cases mailping can store more than 6 digits for the "microseconds" value in a Maildir filename. When the delivery time is calculated it calculates this as the seconds part of the filename + the microseconds part (multiplied by 1e-6).This can convert the microseconds to a value > 1, and consequently make the latency calculation inaccurate by several seconds. -- System Information: Debian Release: 4.0 APT prefers stable APT policy: (900, 'stable'), (700, 'testing') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.22-3-686 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages mailping depends on: ii adduser 3.102 Add and remove users and groups ii munin-node1.2.5-1network-wide graphing framework (n ii python2.4.4-2An interactive high-level object-o ii python-support0.5.6 automated rebuilding support for p mailping recommends no packages. -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#457407: corrections
This was tested against 0.0.4-1 from lenny (installed on etch), although I had an internal testing package derived from this package installed when I filed the original bug report. I apologize for the confusion, this was my first bug report. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#457407: corrections
Roberto C. Sánchez wrote: So, should the bug be closed? No, the bug report is against the debian package. It was specifically encountered in the mailping 0.0.4-1 package from lenny, but also appears to affects etch (0.0.4-0.1) package as well.I've attached a patch that seems to address the problem. diff -Nur mailping-0.0.4/MailPing/maildir.py mailping-0.0.4.new/MailPing/maildir.py --- mailping-0.0.4/MailPing/maildir.py 2004-04-16 12:26:25.0 -0500 +++ mailping-0.0.4.new/MailPing/maildir.py 2007-12-21 23:56:12.0 -0600 @@ -1,4 +1,4 @@ -import os, errno, time, socket +import os, errno, time, socket, string def _mkdir(*a, **kw): try: @@ -64,7 +64,7 @@ except ValueError: pass else: -return float(seconds + microseconds * 1e-6) +return string.atof("%s.%s" % (seconds, microseconds)) return int(seconds)