HylaFAX The world's most advanced open source fax server

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

Re: mail to fax gateway: mailer died with signal 13



On Tue, Apr 07, 1998 at 12:55:47PM -0500, Edward S. Marshall wrote:
> 
> Yeppers; its probably the exact same problem as I've been seeing here.
> Plain messages seem to work, but faxmail goes into a tailspin when
> it decodes a MIME message (actually, it looks like it translates it just
> fine, but then goes into an infinite loop at the end of the decoding
> process).
> 

Hi!

After some time of debugging the following patch appeared and it seems to fix
the infinite loop problem. 


-MIC

Michael Salzmann
Schlund + Partner GmbH & Co.
Erbprinzenstr. 1                                            Tel.0721/91374-50
76133 Karlsruhe                                             Fax 0721/91374-20
http://www.schlund.de	                                       mic@schlund.de 

--SNIP------------------------------------------------
--- faxmail/faxmail.c++	Sat Feb 14 11:49:50 1998
+++ faxmail.local/faxmail.c++	Thu Apr  9 10:31:08 1998
@@ -448,7 +448,9 @@
 faxMailApp::formatMessage(FILE* fd, MIMEState& mime, MsgFmt& msg)
 {
     if (mime.getSubType() == "rfc822") {	// discard anything else
-	msg.parseHeaders(fd, mime.lineno);	// collect headers
+				// 980316 - mic: new MsgFmt 
+      MsgFmt bodyHdrs(msg);		
+      bodyHdrs.parseHeaders(fd, mime.lineno);
 	/*
 	 * Calculate the amount of space required to format
 	 * the message headers and any required inter-message
@@ -462,11 +464,11 @@
 	     * XXX, hack.  Avoid inserting a digest divider when
 	     * the sub-part is a faxmail prologue or related part.
 	     */
-	    const fxStr* s = msg.findHeader("Content-Type");
+	    const fxStr* s = bodyHdrs.findHeader("Content-Type");
 	    if (!s || !strneq(*s, "application/x-faxmail", 21))
 		divider = msgDivider;
 	}
-	u_int nl = msg.headerCount()		// header lines
+	u_int nl = bodyHdrs.headerCount()		// header lines
 	    + (nl > 0)				// blank line following header
 	    + (divider != NULL)			// digest divider
 	    + 1;				// 1st text line of message
@@ -477,10 +479,10 @@
 	    endLine();
 	}
 	if (nl > 0)
-	    msg.formatHeaders(*this);		// emit formatted headers
+	  bodyHdrs.formatHeaders(*this); // emit formatted headers
 
 	MIMEState subMime(mime);
-	formatMIME(fd, subMime, msg);		// format message body
+	formatMIME(fd, subMime, bodyHdrs);		// format message body
     } else {
 	discardPart(fd, mime);
 	formatDiscarded(mime);




Project hosted by iFAX Solutions