LCDproc development and user support list

Text archives Help


[Lcdproc] Big bug in server/main.c


Chronological Thread 
  • From: Mark.Vallevand at UNISYS.com (Vallevand, Mark K)
  • Subject: [Lcdproc] Big bug in server/main.c
  • Date: Thu, 29 Jan 2009 09:05:45 -0600

While testing with my embedded Linux and also on SUSE 11 Linux, I found
that if time goes backwards, LCDd will stall until time catches up. Try
it. Set the time back 2 minutes. For 2 minutes LCDd does nothing.
Here's the fix.



server/main.c

813c813

< if ((t_diff + 1) > (LONG_MAX / 1e6)) {

---

> if ( ((t_diff + 1) > (LONG_MAX / 1e6)) ||
(t_diff<0) ) {

If someone has the time, this really should be rewritten to use
something not based on the time and date of Linux. But, this fix
suffices and we are now using it.

Regards.
Mark K Vallevand

"I got free checking at Bear Stearns!"

THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.



-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.omnipotent.net/pipermail/lcdproc/attachments/20090129/841ddc65/attachment.htm>



  • [Lcdproc] Big bug in server/main.c, Vallevand, Mark K, 01/29/2009

Archive powered by MHonArc 2.6.18.

Top of page