![]() |
Hi HylaFAX devolpers, thanks a lot for your new release (4.1beta3)! There are some problems in compiling HylaFAX-4.1beta3 on Linux (glibc-2.1.2, gcc-2.95.2) with utmpx support: diff -ur hylafax-4.1beta3.ORIG/faxd/GettySysV.c++ hylafax-4.1beta3/faxd/GettySysV.c++ --- hylafax-4.1beta3.ORIG/faxd/GettySysV.c++ Mon Aug 23 13:19:33 1999 +++ hylafax-4.1beta3/faxd/GettySysV.c++ Thu Feb 22 12:21:58 2001 @@ -30,7 +30,6 @@ #include <termios.h> #include <sys/ioctl.h> extern "C" { -#include <utmp.h> #if HAS_UTMPX #if !HAS_EXIT_STATUS /* workaround SVR4.0.3 header braindamage */ @@ -39,7 +38,9 @@ short e_exit; /* Process exit status */ }; #endif /* !HAS_EXIT_STATUS */ +#define __USE_GNU #include <utmpx.h> +#undef __USE_GNU #define utmp utmpx #undef ut_time @@ -51,6 +52,8 @@ #define pututline pututxline #define setutent setutxent #define endutent endutxent +#else +#include <utmp.h> #endif /* HAS_UTMPX */ } With utmpx support enabled, it would be better to include 'utmpx.h' alone, not 'utmp.h' too. Otherwise you'll get a problem with 'struct exit_status' The '#define __USE_GNU' is required to switch on the declaration of 'updwtmpx' in 'utmpx.h'. Linux with glibc-2.1.2 doesn't have a member 'ut_time' in 'struct utmpx', instead there is a member 'ut_tv' with type 'struct timeval': @@ -169,7 +172,9 @@ ut.ut_exit.e_exit = 0; ut.ut_exit.e_termination = 0; #endif - ut.ut_time = Sys::now(); +// ut.ut_time = Sys::now(); + ut.ut_tv.tv_sec = Sys::now(); + ut.ut_tv.tv_usec = 0; // mark utmp entry as a login strncpy(ut.ut_user, "LOGIN", sizeof (ut.ut_user)); /* @@ -212,7 +217,9 @@ ut->ut_exit.e_exit = (exitStatus >> 8) & 0xff; // XXX ut->ut_exit.e_termination = exitStatus & 0xff; // XXX #endif - ut->ut_time = Sys::now(); +// ut->ut_time = Sys::now(); + ut->ut_tv.tv_sec = Sys::now(); + ut->ut_tv.tv_usec = 0; pututline(ut); writeWtmp(ut); break; There is a very small problem in 'config.site' but it's there for several years: #LOCKS="ansi" should be #LOCKS="ascii" I have found that it would be appropriate to raise the value of IXO_XMITTIMEOUT to 45 seconds as in the UCP protocol specification: diff -ur hylafax-4.1beta3.ORIG/faxd/ixo.h hylafax-4.1beta3/faxd/ixo.h --- hylafax-4.1beta3.ORIG/faxd/ixo.h Mon Oct 12 22:47:49 1998 +++ hylafax-4.1beta3/faxd/ixo.h Thu Feb 22 10:09:14 2001 @@ -41,7 +41,7 @@ #define IXO_LOGINTIMEOUT 15 // timeout on login response #define IXO_GATIMEOUT 30 // timeout waiting for go-ahead msg #define IXO_XMITRETRIES 3 // 3 attempts to send message block -#define IXO_XMITTIMEOUT 15 // timeout for message block xmit resp +#define IXO_XMITTIMEOUT 45 // timeout for message block xmit resp #define IXO_ACKTIMEOUT 30 // timeout waiting for transaction ack The charcter ETX should be discarded too in receiving SMS responses: diff -ur hylafax-4.1beta3.ORIG/faxd/pageSendApp.c++ hylafax-4.1beta3/faxd/pageSendApp.c++ --- hylafax-4.1beta3.ORIG/faxd/pageSendApp.c++ Mon Aug 23 13:19:35 1999 +++ hylafax-4.1beta3/faxd/pageSendApp.c++ Thu Feb 22 10:08:51 2001 @@ -416,7 +416,7 @@ int c = getModemChar(0); if (c == EOF) break; - if (c == '\r') { + if (c == '\r' || c == '\003') { if (buf.getLength() > 0) // discard leading \r's break; } else if (c != '\n') // discard all \n's Thanks again and many greetings from the Cologne Carneval Ado -- ------------------------------------------------------------------------ Heinz-Ado Arnolds Ado.Arnolds@dhm-systems.de DHM GmbH & Co. KG +49 2234 18400 (voice) Max-Planck-Strasse 2, 50858 Koeln, Germany +49 2234 184040 (fax) ____________________ HylaFAX(tm) Users Mailing List _______________________ To unsub: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null