Hylafax Mailing List Archives

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

sendpage: Y2K: HOLD syntax error



Using hylafax-v4.0pl2 and running
    echo hi | sendpage -a 1800 -p me
I get this complaint from the server:
    sendpage: 500 'HOLD 10001042300': Syntax error, bad time specification
      (expecting 10/12 digits, got 11).

I think this is in SNPPClient::setHoldTime around line 1008 in
util/SNPPClient.c++ where tm_year is taken as is.

Does the following patch look reasonable?  It superficially appears to work.

John Sellens
jsellens@generalconcepts.com





*** SNPPClient.c++	2000/01/04 08:39:25	1.1
--- SNPPClient.c++	2000/01/04 08:39:41
***************
*** 1004,1011 ****
  {
      time_t tv = t;
      struct tm* tm = gmtime(&tv);
      return (command("HOLD %02d%02d%02d%02d%02d"
! 	, tm->tm_year
  	, tm->tm_mon+1
  	, tm->tm_mday
  	, tm->tm_hour
--- 1004,1011 ----
  {
      time_t tv = t;
      struct tm* tm = gmtime(&tv);
      return (command("HOLD %02d%02d%02d%02d%02d"
! 	, (tm->tm_year)%100
  	, tm->tm_mon+1
  	, tm->tm_mday
  	, tm->tm_hour



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