[Pcsclite-cvs-commit] r2745 - /trunk/PCSC/src/debuglog.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Thu Jan 17 12:51:01 UTC 2008
Author: rousseau
Date: Thu Jan 17 12:50:57 2008
New Revision: 2745
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=2745
Log:
do not display dela times of more than 100 seconds to avoid overflows.
The magic value 99999999 is used instead
Modified:
trunk/PCSC/src/debuglog.c
Modified: trunk/PCSC/src/debuglog.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/debuglog.c?rev=2745&op=diff
==============================================================================
--- trunk/PCSC/src/debuglog.c (original)
+++ trunk/PCSC/src/debuglog.c Thu Jan 17 12:50:57 2008
@@ -123,7 +123,10 @@
tmp.tv_sec--;
tmp.tv_usec += 1000000;
}
- delta = tmp.tv_sec * 1000000 + tmp.tv_usec;
+ if (tmp.tv_sec < 100)
+ delta = tmp.tv_sec * 1000000 + tmp.tv_usec;
+ else
+ delta = 99999999;
fprintf(stderr, "%s%.8d%s %s%s%s\n", time_pfx, delta, time_sfx,
color_pfx, DebugBuffer, color_sfx);
More information about the Pcsclite-cvs-commit
mailing list