HylaFAX The world's most advanced open source fax server

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

Re: [hylafax-users] receiving: logic of RTN negative followed by MPS

Giulio Orsero wrote:

Is there a function I can add in HylaFAX\Class1Recv.c++

                  protoTrace("RECV: begin page");
                   pageGood = recvPageData(tif, emsg);
                   protoTrace("RECV: end page");
       if (! pageGood) AbortCompletely()         <========= I'll add it here

That will just drop the phone line (don't care if not send proper
error to sending side) but that will clean the HylaFAX side of
connection (send proper error through functions chain so faxq knows it
failed, and the modem is hung-up properly)?

I need a quick way to be sure not to say "ok".

There's not a nice function like that which can be used at that point, I don't think.

Try the attached patch. It causes the DCN signal to be sent instead of RTN, and that should cause the sender to hang up or send DCN in reply, and the received but poor-quality page will get saved by virtue of SaveUnconfirmedPages... I hope.

diff -Nru hylafax.orig/faxd/Class1Recv.c++ hylafax/faxd/Class1Recv.c++
--- hylafax.orig/faxd/Class1Recv.c++	2006-04-25 13:40:10.964264496 -0700
+++ hylafax/faxd/Class1Recv.c++	2006-04-25 13:40:50.923189816 -0700
@@ -835,8 +835,8 @@
 			emsg = "Failure to receive silence.";
 			return (false);
-		    (void) transmitFrame(FCF_RTN|FCF_RCVR);
-		    tracePPR("RECV send", FCF_RTN);
+		    (void) transmitFrame(FCF_DCN|FCF_RCVR);
+		    tracePPR("RECV send", FCF_DCN);
 		     * Reset the TIFF-related state so that subsequent
 		     * writes will overwrite the previous data.

Project hosted by iFAX Solutions