Hylafax Mailing List Archives

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

TimeOfDay bug in hylafax-v4.0pl1 plus patch



There is a bug in hylafax-v4.0pl1.  In the destctrls file, time of day
strings such as:

	TimeOfDay = "Wk0200-0750,Saturday0200-0750,Sunday0200-1200"

are interpreted as:

	TimeOfDay = "Wk0200-0750,Sat,Sun"
	
In other words, after the specification of a day of the week, the time
specification is ignored.  The patch at the end of this email fixes
this problem.

Thanks for hylafax
Stuart

PS.  The problem is fairly easy to see.  The "for" loop in following
code eats all nonalpha characters after the specification of a day of
the week.  This includes the time specification.

*** hylafax-v4.0pl1/util/TimeOfDay.c++.stuart	Wed Nov 27 00:20:44 1996
--- hylafax-v4.0pl1/util/TimeOfDay.c++	Sun Aug 24 20:52:08 1997
***************
*** 136,142 ****
  		}
  		days |= BIT(i>>2);
  		cp += (cp[2] == dayNames[i+2] ? 3 : 2);
! 		for (; !isalpha(*cp) && *cp != ',' && *cp; cp++)
  		    ;
  	    } while (isalpha(*cp));
  	} else
--- 136,142 ----
  		}
  		days |= BIT(i>>2);
  		cp += (cp[2] == dayNames[i+2] ? 3 : 2);
! 		for (; !isalnum(*cp) && *cp != ',' && *cp; cp++)
  		    ;
  	    } while (isalpha(*cp));
  	} else



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services