Changelog for HylaFAX
+* session logging improvements (27 Sep 2005)
* add Retransmit-Ignore RTNHandlingMethod (27 Sep 2005)
Changelog for HylaFAX 4.2.2
break;
case ETX:
if (frame.getLength() > 0)
- traceHDLCFrame("-->", frame);
+ traceHDLCFrame("-->", frame, true);
if (frame.getLength() < 5) { // RCP frame size
protoTrace("HDLC frame too short (%u bytes)", frame.getLength());
return (false);
bit = getModemBit(0); // trailing bit on flag
if (!rcpframe) {
if (frame.getLength() > 0)
- traceHDLCFrame("-->", frame);
+ traceHDLCFrame("-->", frame, true);
if (bit) { // should have been zero
protoTrace("Bad HDLC terminating flag received.");
return (false);
* Log an HLDC frame along with a time stamp (secs.10ms).
*/
void
-Class1Modem::traceHDLCFrame(const char* direction, const HDLCFrame& frame)
+Class1Modem::traceHDLCFrame(const char* direction, const HDLCFrame& frame, bool isecm)
{
- if (!getHDLCTracing())
- return;
+ if (!isecm) {
+ if (!getHDLCTracing()) return;
+ } else {
+ if (!getECMTracing()) return;
+ }
const char* hexdigits = "0123456789ABCDEF";
fxStackBuffer buf;
for (u_int i = 0; i < frame.getLength(); i++) {
bool blockFrame(const u_char* bitrev, bool lastframe, u_int ppmcmd, fxStr& emsg);
bool endECMBlock();
void abortReceive();
- void traceHDLCFrame(const char* direction, const HDLCFrame& frame);
+ void traceHDLCFrame(const char* direction, const HDLCFrame& frame, bool isecm = false);
// class 1 command support routines
bool class1Query(const fxStr& queryCmd, Class1Cap caps[]);
bool parseQuery(const char*, Class1Cap caps[]);
ecmframe.put(fcs1); ecmframe.put(fcs2);
blockData(fcs1, false);
blockData(fcs2, false);
- traceHDLCFrame("<--", ecmframe);
+ traceHDLCFrame("<--", ecmframe, true);
protoTrace("SEND send frame number %u", fnum);
if (!useV34) {
blockData(firstframe[i], false);
}
ecmframe.put(firstframe, (frameSize + 6));
- traceHDLCFrame("<--", ecmframe);
+ traceHDLCFrame("<--", ecmframe, true);
protoTrace("SEND send frame number %u", frameRev[firstframe[3]]);
if (!useV34) blockData(0x7e, true);
}
for (u_short k = 0; k < 3; k++) { // three RCP frames
for (u_short j = 0; j < 5; j++)
blockData(rcpframe[j], false);
- traceHDLCFrame("<--", rcpframe);
+ traceHDLCFrame("<--", rcpframe, true);
// separate frames with a 0x7e flag
if (!useV34) blockData(0x7e, true);
bool FaxModem::getHDLCTracing()
{ return (server.getSessionTracing() & FAXTRACE_HDLC) != 0; }
+bool FaxModem::getECMTracing()
+ { return (server.getSessionTracing() & FAXTRACE_ECM) != 0; }
FaxSendStatus
FaxModem::sendSetupParams(TIFF* tif, Class2Params& params,
void tracePPM(const char* dir, u_int ppm);
// server-related stuff
bool getHDLCTracing();
+ bool getECMTracing();
FaxSendStatus sendSetupParams(TIFF*, Class2Params&,
FaxMachineInfo&, fxStr&);
void recvTSI(const fxStr&);
}
}
fax.commid = getCommID(); // set by beginSession
- traceServer("SEND FAX: JOB %s DEST %s COMMID %s DEVICE '%s'"
+ traceServer("SEND FAX: JOB %s DEST %s COMMID %s DEVICE '%s' FROM '%s <%s>' USER %s"
, (const char*) fax.jobid
, (const char*) fax.external
, (const char*) fax.commid
, (const char*) getModemDevice()
+ , (const char*) fax.sender
+ , (const char*) fax.mailaddr
+ , (const char*) fax.owner
);
/* Dispatcher already did setupModem() */
const int FAXTRACE_DIALRULES = 0x10000; // dialstring processing
const int FAXTRACE_DOCREFS = 0x20000; // document reference handling
const int FAXTRACE_TIFF = 0x40000; // TIFF library msgs
+const int FAXTRACE_ECM = 0x80000; // ECM HDLC image data frames
const int FAXTRACE_ANY = 0xffffffff;
const int FAXTRACE_MASK = 0xfffff;
callResolved = false;
advanceRotary = false;
} else {
+ fxStr callid_formatted = "";
+ for (u_int i = 0; i < callid.size(); i++)
+ callid_formatted.append(quote | callid.id(i) | enquote);
+ if (callid_formatted.length()) traceProtocol("CallID:%s", (const char*) callid_formatted);
if (dynamicConfig.length()) {
- fxStr cmd(dynamicConfig | quote | getModemDevice() | enquote);
- for (u_int i = 0; i < callid.size(); i++)
- cmd.append(quote | callid.id(i) | enquote);
+ fxStr cmd(dynamicConfig | quote | getModemDevice() | enquote | callid_formatted);
fxStr localid = "";
int pipefd[2], idlength, status;
char line[1024];
32768 (0x08000) Modem State Transitions modem state changes (down, busy, ready)
65536 (0x10000) Dial Rules dialstring rules parsing and execution
131072 (0x20000) Docq Changes document reference handling
+262144 (0x40000) TIFF library any messages produced by the TIFF library
+524288 (0x80000) ECM Frames binary \s-1T.30-A HDLC\s+1 ECM frames
.sp .5
.fi
For example, to enable tracing of server operations and