Hylafax Mailing List Archives

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

[hylafax-users] Re: "No response to MPS or EOP" problem?



Folks,

recently the FreeBSD port was upgraded to hylafax 4.1beta2. I upgraded
and ran into this well-known problem. It turned out that the UUCP lock
files are not being properly written, so that faxgetty thought the line
was free while in fact there was a fax being sent out. Faxgetty jumped
right into the ongoing conversation, like in the following log fragment:

Jun 29 17:32:30.39: [49268]: <-- data [256]
Jun 29 17:32:30.39: [49268]: SENT 4351 bytes of data
Jun 29 17:32:30.39: [49268]: SEND 2D RTC
Jun 29 17:32:30.39: [49268]: <-- data [30]
Jun 29 17:32:30.39: [49268]: <-- data [2]
Jun 29 17:32:30.39: [49268]: SEND end page
Jun 29 17:32:37.65: [49268]: --> [14:ATE0V1Q0S0=0H0]          <---- EEEEK!!!!
Jun 29 17:32:37.65: [49268]: --> [2:OK]
Jun 29 17:32:37.65: [49268]: DELAY 95 ms
Jun 29 17:32:37.76: [49268]: SEND send EOP (no more pages or documents)
Jun 29 17:32:37.76: [49268]: <-- [9:AT+FTH=3\r]
Jun 29 17:32:40.32: [49268]: --> [0:]
Jun 29 17:32:40.32: [49268]: SEND send EOP (no more pages or documents)
Jun 29 17:32:40.32: [49268]: <-- [9:AT+FTH=3\r]
Jun 29 17:32:40.35: [49268]: --> [5:ERROR]

At one instance I observed a lockfile containing exactly:

     59\0\0\0\0

(that is, five spaces, '5', '9', and four NUL characters). The size was
right (11 characters), but the contents was nonsense. This tiny patch
cured the problem:

--------------------------------------------------------------------------------
--- faxd/UUCPLock.c++.ORIG	Wed Jun 28 22:13:29 2000
+++ faxd/UUCPLock.c++	Thu Jun 29 18:38:41 2000
@@ -315,7 +315,7 @@
 AsciiUUCPLock::setPID(pid_t pid)
 {
     // XXX should this be %d or %ld? depends on pid_t
-    snprintf((char*) data, sizeof(data), "%*d\n", UUCP_PIDDIGITS, pid);
+    snprintf((char*) data, UUCP_PIDDIGITS+2, "%*d\n", UUCP_PIDDIGITS, pid);
 }
 
 bool
--------------------------------------------------------------------------------

Hope this is of help for somebody.

Regards,
Helge

N.B. hylafax 4.0PL2 does *not* show this behaviour as it doesn't use
snprintf but sprintf. So if you still use 4.0, this isn't for you.


____________________ HylaFAX(tm) Users Mailing List _______________________
 To unsub: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null



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